| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_ERROR_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_SSL_SSL_ERROR_HANDLER_H_ |
| 6 #define CHROME_BROWSER_SSL_SSL_ERROR_HANDLER_H_ | 6 #define CHROME_BROWSER_SSL_SSL_ERROR_HANDLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 int options_mask, | 79 int options_mask, |
| 80 scoped_ptr<SSLCertReporter> ssl_cert_reporter, | 80 scoped_ptr<SSLCertReporter> ssl_cert_reporter, |
| 81 const base::Callback<void(bool)>& callback); | 81 const base::Callback<void(bool)>& callback); |
| 82 | 82 |
| 83 ~SSLErrorHandler() override; | 83 ~SSLErrorHandler() override; |
| 84 | 84 |
| 85 // Called when an SSL cert error is encountered. Triggers a captive portal | 85 // Called when an SSL cert error is encountered. Triggers a captive portal |
| 86 // check and fires a one shot timer to wait for a "captive portal detected" | 86 // check and fires a one shot timer to wait for a "captive portal detected" |
| 87 // result to arrive. | 87 // result to arrive. |
| 88 void StartHandlingError(); | 88 void StartHandlingError(); |
| 89 const base::OneShotTimer<SSLErrorHandler>& get_timer() const { | 89 const base::OneShotTimer& get_timer() const { return timer_; } |
| 90 return timer_; | |
| 91 } | |
| 92 | 90 |
| 93 // These are virtual for tests: | 91 // These are virtual for tests: |
| 94 virtual void CheckForCaptivePortal(); | 92 virtual void CheckForCaptivePortal(); |
| 95 virtual bool GetSuggestedUrl(const std::vector<std::string>& dns_names, | 93 virtual bool GetSuggestedUrl(const std::vector<std::string>& dns_names, |
| 96 GURL* suggested_url) const; | 94 GURL* suggested_url) const; |
| 97 virtual void CheckSuggestedUrl(const GURL& suggested_url); | 95 virtual void CheckSuggestedUrl(const GURL& suggested_url); |
| 98 virtual void NavigateToSuggestedURL(const GURL& suggested_url); | 96 virtual void NavigateToSuggestedURL(const GURL& suggested_url); |
| 99 virtual bool IsErrorOverridable() const; | 97 virtual bool IsErrorOverridable() const; |
| 100 virtual void ShowCaptivePortalInterstitial(const GURL& landing_url); | 98 virtual void ShowCaptivePortalInterstitial(const GURL& landing_url); |
| 101 virtual void ShowSSLInterstitial(); | 99 virtual void ShowSSLInterstitial(); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 129 | 127 |
| 130 content::WebContents* web_contents_; | 128 content::WebContents* web_contents_; |
| 131 const int cert_error_; | 129 const int cert_error_; |
| 132 const net::SSLInfo ssl_info_; | 130 const net::SSLInfo ssl_info_; |
| 133 const GURL request_url_; | 131 const GURL request_url_; |
| 134 const int options_mask_; | 132 const int options_mask_; |
| 135 base::Callback<void(bool)> callback_; | 133 base::Callback<void(bool)> callback_; |
| 136 Profile* const profile_; | 134 Profile* const profile_; |
| 137 | 135 |
| 138 content::NotificationRegistrar registrar_; | 136 content::NotificationRegistrar registrar_; |
| 139 base::OneShotTimer<SSLErrorHandler> timer_; | 137 base::OneShotTimer timer_; |
| 140 | 138 |
| 141 scoped_ptr<CommonNameMismatchHandler> common_name_mismatch_handler_; | 139 scoped_ptr<CommonNameMismatchHandler> common_name_mismatch_handler_; |
| 142 | 140 |
| 143 scoped_ptr<SSLCertReporter> ssl_cert_reporter_; | 141 scoped_ptr<SSLCertReporter> ssl_cert_reporter_; |
| 144 | 142 |
| 145 DISALLOW_COPY_AND_ASSIGN(SSLErrorHandler); | 143 DISALLOW_COPY_AND_ASSIGN(SSLErrorHandler); |
| 146 }; | 144 }; |
| 147 | 145 |
| 148 #endif // CHROME_BROWSER_SSL_SSL_ERROR_HANDLER_H_ | 146 #endif // CHROME_BROWSER_SSL_SSL_ERROR_HANDLER_H_ |
| OLD | NEW |