| 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 <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 | 80 |
| 81 // The navigation controller associated with this SSLManager. The | 81 // The navigation controller associated with this SSLManager. The |
| 82 // NavigationController is guaranteed to outlive the SSLManager. | 82 // NavigationController is guaranteed to outlive the SSLManager. |
| 83 NavigationControllerImpl* controller() { return controller_; } | 83 NavigationControllerImpl* controller() { return controller_; } |
| 84 | 84 |
| 85 void DidCommitProvisionalLoad(const LoadCommittedDetails& details); | 85 void DidCommitProvisionalLoad(const LoadCommittedDetails& details); |
| 86 void DidLoadFromMemoryCache(const LoadFromMemoryCacheDetails& details); | 86 void DidLoadFromMemoryCache(const LoadFromMemoryCacheDetails& details); |
| 87 void DidStartResourceResponse(const ResourceRequestDetails& details); | 87 void DidStartResourceResponse(const ResourceRequestDetails& details); |
| 88 void DidReceiveResourceRedirect(const ResourceRedirectDetails& details); | 88 void DidReceiveResourceRedirect(const ResourceRedirectDetails& details); |
| 89 | 89 |
| 90 // Insecure content entry point. | 90 // Notifies SSLPolicy that the given |security_origin| has run content |
| 91 // loaded over HTTP. |
| 91 void DidRunInsecureContent(const GURL& security_origin); | 92 void DidRunInsecureContent(const GURL& security_origin); |
| 92 | 93 |
| 94 // Notifies SSLPolicy that the given |security_origin| has run content |
| 95 // loaded over HTTPS with certificate errors. |
| 96 void DidRunContentWithCertificateErrors(const GURL& security_origin); |
| 97 |
| 93 private: | 98 private: |
| 94 // Updates the NavigationEntry with our current state. This will | 99 // Updates the NavigationEntry with our current state. This will |
| 95 // notify the WebContents of an SSL state change if a change was | 100 // notify the WebContents of an SSL state change if a change was |
| 96 // actually made. | 101 // actually made. |
| 97 void UpdateEntry(NavigationEntryImpl* entry); | 102 void UpdateEntry(NavigationEntryImpl* entry); |
| 98 | 103 |
| 99 // Notifies the WebContents that the SSL state changed. | 104 // Notifies the WebContents that the SSL state changed. |
| 100 void NotifyDidChangeVisibleSSLState(); | 105 void NotifyDidChangeVisibleSSLState(); |
| 101 | 106 |
| 102 // The backend for the SSLPolicy to actuate its decisions. | 107 // The backend for the SSLPolicy to actuate its decisions. |
| 103 SSLPolicyBackend backend_; | 108 SSLPolicyBackend backend_; |
| 104 | 109 |
| 105 // The SSLPolicy instance for this manager. | 110 // The SSLPolicy instance for this manager. |
| 106 std::unique_ptr<SSLPolicy> policy_; | 111 std::unique_ptr<SSLPolicy> policy_; |
| 107 | 112 |
| 108 // The NavigationController that owns this SSLManager. We are responsible | 113 // The NavigationController that owns this SSLManager. We are responsible |
| 109 // for the security UI of this tab. | 114 // for the security UI of this tab. |
| 110 NavigationControllerImpl* controller_; | 115 NavigationControllerImpl* controller_; |
| 111 | 116 |
| 112 DISALLOW_COPY_AND_ASSIGN(SSLManager); | 117 DISALLOW_COPY_AND_ASSIGN(SSLManager); |
| 113 }; | 118 }; |
| 114 | 119 |
| 115 } // namespace content | 120 } // namespace content |
| 116 | 121 |
| 117 #endif // CONTENT_BROWSER_SSL_SSL_MANAGER_H_ | 122 #endif // CONTENT_BROWSER_SSL_SSL_MANAGER_H_ |
| OLD | NEW |