Index: chrome/browser/ssl/ssl_error_handler.h |
diff --git a/chrome/browser/ssl/ssl_error_handler.h b/chrome/browser/ssl/ssl_error_handler.h |
index 49f0c35e7cce28dec9d9ef5058ee572f06282ab0..f52981694820593aa1b2aa1ddc2e92aca66faee6 100644 |
--- a/chrome/browser/ssl/ssl_error_handler.h |
+++ b/chrome/browser/ssl/ssl_error_handler.h |
@@ -11,6 +11,8 @@ |
#include "base/macros.h" |
#include "base/timer/timer.h" |
#include "chrome/browser/chrome_notification_types.h" |
+#include "chrome/browser/profiles/profile.h" |
+#include "chrome/browser/ssl/common_name_mismatch_handler.h" |
#include "chrome/browser/ssl/ssl_cert_reporter.h" |
#include "content/public/browser/notification_observer.h" |
#include "content/public/browser/notification_registrar.h" |
@@ -61,6 +63,11 @@ class SSLErrorHandler : public content::WebContentsUserData<SSLErrorHandler>, |
static void SetInterstitialTimerStartedCallbackForTest( |
TimerStartedCallback* callback); |
+ // Gets the result of whether the suggested URL is valid. Displays |
+ // common name mismatch interstitial or ssl interstitial accordingly. |
+ void CommonNameMismatchHandlerCallback( |
+ const CommonNameMismatchHandler::Results& results); |
+ |
protected: |
SSLErrorHandler(content::WebContents* web_contents, |
int cert_error, |
@@ -88,7 +95,10 @@ class SSLErrorHandler : public content::WebContentsUserData<SSLErrorHandler>, |
// These are virtual for tests: |
virtual void CheckForCaptivePortal(); |
virtual void ShowCaptivePortalInterstitial(const GURL& landing_url); |
- virtual void ShowSSLInterstitial(); |
+ virtual void ShowSSLInterstitial(const GURL& suggested_url); |
+ virtual bool GetSuggestedUrl(const std::vector<std::string>& dns_names, |
+ GURL* suggested_url) const; |
+ virtual void CheckSuggestedUrl(const GURL& suggested_url); |
// content::NotificationObserver: |
void Observe( |
@@ -107,10 +117,13 @@ class SSLErrorHandler : public content::WebContentsUserData<SSLErrorHandler>, |
const GURL request_url_; |
const int options_mask_; |
base::Callback<void(bool)> callback_; |
+ Profile* const profile_; |
content::NotificationRegistrar registrar_; |
base::OneShotTimer<SSLErrorHandler> timer_; |
+ scoped_ptr<CommonNameMismatchHandler> common_name_mismatch_handler_; |
+ |
scoped_ptr<SSLCertReporter> ssl_cert_reporter_; |
DISALLOW_COPY_AND_ASSIGN(SSLErrorHandler); |