| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_POLICY_H__ | 5 #ifndef CHROME_BROWSER_SSL_POLICY_H__ |
| 6 #define CHROME_BROWSER_SSL_POLICY_H__ | 6 #define CHROME_BROWSER_SSL_POLICY_H__ |
| 7 | 7 |
| 8 #include "chrome/browser/ssl/ssl_blocking_page.h" | 8 #include "chrome/browser/ssl/ssl_blocking_page.h" |
| 9 #include "chrome/browser/ssl/ssl_manager.h" | 9 #include "chrome/browser/ssl/ssl_manager.h" |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 NOTREACHED(); | 34 NOTREACHED(); |
| 35 } | 35 } |
| 36 | 36 |
| 37 virtual void OnRequestStarted(SSLManager* manager, | 37 virtual void OnRequestStarted(SSLManager* manager, |
| 38 const GURL& url, | 38 const GURL& url, |
| 39 ResourceType::Type resource_type, | 39 ResourceType::Type resource_type, |
| 40 int ssl_cert_id, | 40 int ssl_cert_id, |
| 41 int ssl_cert_status); | 41 int ssl_cert_status); |
| 42 virtual SecurityStyle GetDefaultStyle(const GURL& url); | 42 virtual SecurityStyle GetDefaultStyle(const GURL& url); |
| 43 | 43 |
| 44 // This method is static because it is called from both the UI and the IO |
| 45 // threads. |
| 46 static bool IsMixedContent(const GURL& url, |
| 47 ResourceType::Type resource_type, |
| 48 const std::string& main_frame_origin); |
| 49 |
| 44 // SSLBlockingPage::Delegate methods. | 50 // SSLBlockingPage::Delegate methods. |
| 45 virtual SSLErrorInfo GetSSLErrorInfo(SSLManager::CertError* error); | 51 virtual SSLErrorInfo GetSSLErrorInfo(SSLManager::CertError* error); |
| 46 virtual void OnDenyCertificate(SSLManager::CertError* error); | 52 virtual void OnDenyCertificate(SSLManager::CertError* error); |
| 47 virtual void OnAllowCertificate(SSLManager::CertError* error); | 53 virtual void OnAllowCertificate(SSLManager::CertError* error); |
| 48 | 54 |
| 49 protected: | 55 protected: |
| 50 // Allow our subclasses to construct us. | 56 // Allow our subclasses to construct us. |
| 51 SSLPolicy(); | 57 SSLPolicy(); |
| 52 | 58 |
| 53 // Helper method for derived classes handling certificate errors that can be | 59 // Helper method for derived classes handling certificate errors that can be |
| 54 // overridden by the user. | 60 // overridden by the user. |
| 55 // Show a blocking page and let the user continue or cancel the request. | 61 // Show a blocking page and let the user continue or cancel the request. |
| 56 void OnOverridableCertError(const GURL& main_frame_url, | 62 void OnOverridableCertError(const GURL& main_frame_url, |
| 57 SSLManager::CertError* error); | 63 SSLManager::CertError* error); |
| 58 | 64 |
| 59 // Helper method for derived classes handling fatal certificate errors. | 65 // Helper method for derived classes handling fatal certificate errors. |
| 60 // Cancel the request and show an error page. | 66 // Cancel the request and show an error page. |
| 61 void OnFatalCertError(const GURL& main_frame_url, | 67 void OnFatalCertError(const GURL& main_frame_url, |
| 62 SSLManager::CertError* error); | 68 SSLManager::CertError* error); |
| 63 | 69 |
| 64 private: | 70 private: |
| 65 DISALLOW_EVIL_CONSTRUCTORS(SSLPolicy); | 71 DISALLOW_EVIL_CONSTRUCTORS(SSLPolicy); |
| 66 }; | 72 }; |
| 67 | 73 |
| 68 #endif // CHROME_BROWSER_SSL_POLICY_H__ | 74 #endif // CHROME_BROWSER_SSL_POLICY_H__ |
| OLD | NEW |