Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(254)

Unified Diff: chrome/browser/ssl/ssl_error_handler.h

Issue 1223233002: Common Name Mismatch Handler For WWW Subdomain Mismatch case (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolving comments Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ssl/ssl_error_classification.cc ('k') | chrome/browser/ssl/ssl_error_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 601baf00ed5c5d4f04a0c42bfd247511cf5ea0fd..025eb1bdfe4f3c674388fa049d6769c85468cb61 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"
@@ -19,6 +21,9 @@
#include "net/ssl/ssl_info.h"
#include "url/gurl.h"
+class Profile;
+class CommonNameMismatchHandler;
+
namespace content {
class RenderViewHost;
class WebContents;
@@ -61,6 +66,12 @@ 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::SuggestedUrlCheckResult& result,
+ const GURL& suggested_url);
+
protected:
SSLErrorHandler(content::WebContents* web_contents,
int cert_error,
@@ -89,6 +100,10 @@ class SSLErrorHandler : public content::WebContentsUserData<SSLErrorHandler>,
virtual void CheckForCaptivePortal();
virtual void ShowCaptivePortalInterstitial(const GURL& landing_url);
virtual void ShowSSLInterstitial();
+ virtual bool GetSuggestedUrl(const std::vector<std::string>& dns_names,
+ GURL* suggested_url) const;
+ virtual void CheckSuggestedUrl(const GURL& suggested_url);
+ virtual void NavigateToSuggestedURL(const GURL& suggested_url);
// content::NotificationObserver:
void Observe(
@@ -114,10 +129,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);
« no previous file with comments | « chrome/browser/ssl/ssl_error_classification.cc ('k') | chrome/browser/ssl/ssl_error_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698