| OLD | NEW | 
|    1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |    1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 
|    2 // Use of this source code is governed by a BSD-style license that can be |    2 // Use of this source code is governed by a BSD-style license that can be | 
|    3 // found in the LICENSE file. |    3 // found in the LICENSE file. | 
|    4  |    4  | 
|    5 #ifndef CONTENT_BROWSER_SSL_SSL_MANAGER_H_ |    5 #ifndef CONTENT_BROWSER_SSL_SSL_MANAGER_H_ | 
|    6 #define CONTENT_BROWSER_SSL_SSL_MANAGER_H_ |    6 #define CONTENT_BROWSER_SSL_SSL_MANAGER_H_ | 
|    7  |    7  | 
|    8 #include <string> |    8 #include <string> | 
|    9  |    9  | 
|   10 #include "base/basictypes.h" |   10 #include "base/basictypes.h" | 
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   50   // Called on the IO thread. |   50   // Called on the IO thread. | 
|   51   static void OnSSLCertificateError( |   51   static void OnSSLCertificateError( | 
|   52       const base::WeakPtr<SSLErrorHandler::Delegate>& delegate, |   52       const base::WeakPtr<SSLErrorHandler::Delegate>& delegate, | 
|   53       ResourceType resource_type, |   53       ResourceType resource_type, | 
|   54       const GURL& url, |   54       const GURL& url, | 
|   55       int render_process_id, |   55       int render_process_id, | 
|   56       int render_frame_id, |   56       int render_frame_id, | 
|   57       const net::SSLInfo& ssl_info, |   57       const net::SSLInfo& ssl_info, | 
|   58       bool fatal); |   58       bool fatal); | 
|   59  |   59  | 
 |   60   // Called before an HTTP basic auth dialog is displayed. | 
 |   61   static void OnAuthDialog(int render_process_id, | 
 |   62                            int render_frame_id, | 
 |   63                            const std::string& serialized_security_info, | 
 |   64                            bool is_main_frame); | 
 |   65  | 
|   60   // Called when SSL state for a host or tab changes. |   66   // Called when SSL state for a host or tab changes. | 
|   61   static void NotifySSLInternalStateChanged(BrowserContext* context); |   67   static void NotifySSLInternalStateChanged(BrowserContext* context); | 
|   62  |   68  | 
|   63   // Construct an SSLManager for the specified tab. |   69   // Construct an SSLManager for the specified tab. | 
|   64   // If |delegate| is NULL, SSLPolicy::GetDefaultPolicy() is used. |   70   // If |delegate| is NULL, SSLPolicy::GetDefaultPolicy() is used. | 
|   65   explicit SSLManager(NavigationControllerImpl* controller); |   71   explicit SSLManager(NavigationControllerImpl* controller); | 
|   66   virtual ~SSLManager(); |   72   virtual ~SSLManager(); | 
|   67  |   73  | 
|   68   SSLPolicy* policy() { return policy_.get(); } |   74   SSLPolicy* policy() { return policy_.get(); } | 
|   69   SSLPolicyBackend* backend() { return &backend_; } |   75   SSLPolicyBackend* backend() { return &backend_; } | 
|   70  |   76  | 
|   71   // The navigation controller associated with this SSLManager.  The |   77   // The navigation controller associated with this SSLManager.  The | 
|   72   // NavigationController is guaranteed to outlive the SSLManager. |   78   // NavigationController is guaranteed to outlive the SSLManager. | 
|   73   NavigationControllerImpl* controller() { return controller_; } |   79   NavigationControllerImpl* controller() { return controller_; } | 
|   74  |   80  | 
|   75   void DidCommitProvisionalLoad(const LoadCommittedDetails& details); |   81   void DidCommitProvisionalLoad(const LoadCommittedDetails& details); | 
|   76   void DidLoadFromMemoryCache(const LoadFromMemoryCacheDetails& details); |   82   void DidLoadFromMemoryCache(const LoadFromMemoryCacheDetails& details); | 
|   77   void DidStartResourceResponse(const ResourceRequestDetails& details); |   83   void DidStartResourceResponse(const ResourceRequestDetails& details); | 
|   78   void DidReceiveResourceRedirect(const ResourceRedirectDetails& details); |   84   void DidReceiveResourceRedirect(const ResourceRedirectDetails& details); | 
|   79  |   85  | 
|   80   // Insecure content entry point. |   86   // Insecure content entry point. | 
|   81   void DidDisplayInsecureContent(); |   87   void DidDisplayInsecureContent(); | 
|   82   void DidRunInsecureContent(const std::string& security_origin); |   88   void DidRunInsecureContent(const std::string& security_origin); | 
|   83  |   89  | 
|   84  private: |   90  private: | 
|   85   // Update the NavigationEntry with our current state. |   91   // Update the NavigationEntry with our current state. | 
|   86   void UpdateEntry(NavigationEntryImpl* entry); |   92   void UpdateEntry(NavigationEntryImpl* entry); | 
 |   93   void UpdateEntry(const std::string& serialized_security_info, | 
 |   94                    bool is_main_frame, | 
 |   95                    NavigationEntryImpl* entry); | 
|   87  |   96  | 
|   88   // The backend for the SSLPolicy to actuate its decisions. |   97   // The backend for the SSLPolicy to actuate its decisions. | 
|   89   SSLPolicyBackend backend_; |   98   SSLPolicyBackend backend_; | 
|   90  |   99  | 
|   91   // The SSLPolicy instance for this manager. |  100   // The SSLPolicy instance for this manager. | 
|   92   scoped_ptr<SSLPolicy> policy_; |  101   scoped_ptr<SSLPolicy> policy_; | 
|   93  |  102  | 
|   94   // The NavigationController that owns this SSLManager.  We are responsible |  103   // The NavigationController that owns this SSLManager.  We are responsible | 
|   95   // for the security UI of this tab. |  104   // for the security UI of this tab. | 
|   96   NavigationControllerImpl* controller_; |  105   NavigationControllerImpl* controller_; | 
|   97  |  106  | 
|   98   DISALLOW_COPY_AND_ASSIGN(SSLManager); |  107   DISALLOW_COPY_AND_ASSIGN(SSLManager); | 
|   99 }; |  108 }; | 
|  100  |  109  | 
|  101 }  // namespace content |  110 }  // namespace content | 
|  102  |  111  | 
|  103 #endif  // CONTENT_BROWSER_SSL_SSL_MANAGER_H_ |  112 #endif  // CONTENT_BROWSER_SSL_SSL_MANAGER_H_ | 
| OLD | NEW |