| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_BROWSER_SSL_SSL_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_SSL_SSL_MANAGER_H_ |
| 6 #define CHROME_BROWSER_SSL_SSL_MANAGER_H_ | 6 #define CHROME_BROWSER_SSL_SSL_MANAGER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 // | 35 // |
| 36 // There is one SSLManager per tab. | 36 // There is one SSLManager per tab. |
| 37 // The security state (secure/insecure) is stored in the navigation entry. | 37 // The security state (secure/insecure) is stored in the navigation entry. |
| 38 // Along with it are stored any SSL error code and the associated cert. | 38 // Along with it are stored any SSL error code and the associated cert. |
| 39 | 39 |
| 40 class SSLManager : public NotificationObserver { | 40 class SSLManager : public NotificationObserver { |
| 41 public: | 41 public: |
| 42 // Entry point for SSLCertificateErrors. This function begins the process | 42 // Entry point for SSLCertificateErrors. This function begins the process |
| 43 // of resolving a certificate error during an SSL connection. SSLManager | 43 // of resolving a certificate error during an SSL connection. SSLManager |
| 44 // will adjust the security UI and either call |Cancel| or | 44 // will adjust the security UI and either call |Cancel| or |
| 45 // |ContinueDespiteLastError| on the URLRequest. | 45 // |ContinueDespiteLastError| on the net::URLRequest. |
| 46 // | 46 // |
| 47 // Called on the IO thread. | 47 // Called on the IO thread. |
| 48 static void OnSSLCertificateError(ResourceDispatcherHost* resource_dispatcher, | 48 static void OnSSLCertificateError(ResourceDispatcherHost* resource_dispatcher, |
| 49 net::URLRequest* request, | 49 net::URLRequest* request, |
| 50 int cert_error, | 50 int cert_error, |
| 51 net::X509Certificate* cert); | 51 net::X509Certificate* cert); |
| 52 | 52 |
| 53 // Called when SSL state for a host or tab changes. Broadcasts the | 53 // Called when SSL state for a host or tab changes. Broadcasts the |
| 54 // SSL_INTERNAL_STATE_CHANGED notification. | 54 // SSL_INTERNAL_STATE_CHANGED notification. |
| 55 static void NotifySSLInternalStateChanged(); | 55 static void NotifySSLInternalStateChanged(); |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 // for the security UI of this tab. | 122 // for the security UI of this tab. |
| 123 NavigationController* controller_; | 123 NavigationController* controller_; |
| 124 | 124 |
| 125 // Handles registering notifications with the NotificationService. | 125 // Handles registering notifications with the NotificationService. |
| 126 NotificationRegistrar registrar_; | 126 NotificationRegistrar registrar_; |
| 127 | 127 |
| 128 DISALLOW_COPY_AND_ASSIGN(SSLManager); | 128 DISALLOW_COPY_AND_ASSIGN(SSLManager); |
| 129 }; | 129 }; |
| 130 | 130 |
| 131 #endif // CHROME_BROWSER_SSL_SSL_MANAGER_H_ | 131 #endif // CHROME_BROWSER_SSL_SSL_MANAGER_H_ |
| OLD | NEW |