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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
45 // Entry point for SSLCertificateErrors. This function begins the process | 45 // Entry point for SSLCertificateErrors. This function begins the process |
46 // of resolving a certificate error during an SSL connection. SSLManager | 46 // of resolving a certificate error during an SSL connection. SSLManager |
47 // will adjust the security UI and either call |CancelSSLRequest| or | 47 // will adjust the security UI and either call |CancelSSLRequest| or |
48 // |ContinueSSLRequest| of |delegate|. | 48 // |ContinueSSLRequest| of |delegate|. |
49 // | 49 // |
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 const base::Callback<WebContents*(void)>& web_contents_getter, | |
56 const net::SSLInfo& ssl_info, | |
57 bool fatal); | |
58 | |
59 // Same as the above, and only works for subresources. Prefer using | |
60 // OnSSLCertificateError whenever possible (ie when you have access to the | |
61 // WebContents). | |
62 static void OnSSLCertificateSubresourceError( | |
clamy
2015/11/23 16:44:09
This is called by WebSocketHost, which happens to
| |
63 const base::WeakPtr<SSLErrorHandler::Delegate>& delegate, | |
64 const GURL& url, | |
55 int render_process_id, | 65 int render_process_id, |
56 int render_frame_id, | 66 int render_frame_id, |
57 const net::SSLInfo& ssl_info, | 67 const net::SSLInfo& ssl_info, |
58 bool fatal); | 68 bool fatal); |
59 | 69 |
60 // Called when SSL state for a host or tab changes. | 70 // Called when SSL state for a host or tab changes. |
61 static void NotifySSLInternalStateChanged(BrowserContext* context); | 71 static void NotifySSLInternalStateChanged(BrowserContext* context); |
62 | 72 |
63 // Construct an SSLManager for the specified tab. | 73 // Construct an SSLManager for the specified tab. |
64 // If |delegate| is NULL, SSLPolicy::GetDefaultPolicy() is used. | 74 // If |delegate| is NULL, SSLPolicy::GetDefaultPolicy() is used. |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
99 // The NavigationController that owns this SSLManager. We are responsible | 109 // The NavigationController that owns this SSLManager. We are responsible |
100 // for the security UI of this tab. | 110 // for the security UI of this tab. |
101 NavigationControllerImpl* controller_; | 111 NavigationControllerImpl* controller_; |
102 | 112 |
103 DISALLOW_COPY_AND_ASSIGN(SSLManager); | 113 DISALLOW_COPY_AND_ASSIGN(SSLManager); |
104 }; | 114 }; |
105 | 115 |
106 } // namespace content | 116 } // namespace content |
107 | 117 |
108 #endif // CONTENT_BROWSER_SSL_SSL_MANAGER_H_ | 118 #endif // CONTENT_BROWSER_SSL_SSL_MANAGER_H_ |
OLD | NEW |