Logo Search packages:      
Sourcecode: chromium-browser version File versions  Download package


// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.


#include <string>

#include "chrome/browser/ssl/ssl_error_handler.h"
#include "net/base/ssl_info.h"
#include "net/base/x509_certificate.h"

// A CertError represents an error that occurred with the certificate in an
// SSL session.  A CertError object exists both on the IO thread and on the UI
// thread and allows us to cancel/continue a request it is associated with.
class SSLCertErrorHandler : public SSLErrorHandler {
  // Construct on the IO thread.
  SSLCertErrorHandler(ResourceDispatcherHost* rdh,
                      URLRequest* request,
                      ResourceType::Type resource_type,
                      const std::string& frame_origin,
                      const std::string& main_frame_origin,
                      int cert_error,
                      net::X509Certificate* cert);

  virtual SSLCertErrorHandler* AsSSLCertErrorHandler() { return this; }

  // These accessors are available on either thread
  const net::SSLInfo& ssl_info() const { return ssl_info_; }
  int cert_error() const { return cert_error_; }

  // SSLErrorHandler methods
  virtual void OnDispatchFailed();
  virtual void OnDispatched();

  ~SSLCertErrorHandler() {}

  // These read-only members may be accessed on any thread.
  net::SSLInfo ssl_info_;
  const int cert_error_;  // The error we represent.



Generated by  Doxygen 1.6.0   Back to index