diff options
Diffstat (limited to 'chrome/browser/ssl/ssl_error_handler.cc')
-rw-r--r-- | chrome/browser/ssl/ssl_error_handler.cc | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/chrome/browser/ssl/ssl_error_handler.cc b/chrome/browser/ssl/ssl_error_handler.cc index 6e0cd4d..25e4b6a 100644 --- a/chrome/browser/ssl/ssl_error_handler.cc +++ b/chrome/browser/ssl/ssl_error_handler.cc @@ -9,8 +9,8 @@ #include "base/metrics/histogram.h" #include "base/time/time.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/browser/safe_browsing/ui_manager.h" #include "chrome/browser/ssl/ssl_blocking_page.h" +#include "chrome/browser/ssl/ssl_cert_reporter.h" #include "content/public/browser/notification_service.h" #include "content/public/browser/notification_source.h" #include "content/public/browser/web_contents.h" @@ -90,7 +90,7 @@ void SSLErrorHandler::HandleSSLError( const net::SSLInfo& ssl_info, const GURL& request_url, int options_mask, - SafeBrowsingUIManager* safe_browsing_ui_manager, + scoped_ptr<SSLCertReporter> ssl_cert_reporter, const base::Callback<void(bool)>& callback) { #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) CaptivePortalTabHelper* captive_portal_tab_helper = @@ -103,7 +103,7 @@ void SSLErrorHandler::HandleSSLError( web_contents->SetUserData( UserDataKey(), new SSLErrorHandler(web_contents, cert_error, ssl_info, request_url, - options_mask, safe_browsing_ui_manager, callback)); + options_mask, ssl_cert_reporter.Pass(), callback)); SSLErrorHandler* error_handler = SSLErrorHandler::FromWebContents(web_contents); @@ -123,14 +123,13 @@ void SSLErrorHandler::SetInterstitialTimerStartedCallbackForTest( g_timer_started_callback = callback; } -SSLErrorHandler::SSLErrorHandler( - content::WebContents* web_contents, - int cert_error, - const net::SSLInfo& ssl_info, - const GURL& request_url, - int options_mask, - SafeBrowsingUIManager* safe_browsing_ui_manager, - const base::Callback<void(bool)>& callback) +SSLErrorHandler::SSLErrorHandler(content::WebContents* web_contents, + int cert_error, + const net::SSLInfo& ssl_info, + const GURL& request_url, + int options_mask, + scoped_ptr<SSLCertReporter> ssl_cert_reporter, + const base::Callback<void(bool)>& callback) : content::WebContentsObserver(web_contents), web_contents_(web_contents), cert_error_(cert_error), @@ -138,7 +137,7 @@ SSLErrorHandler::SSLErrorHandler( request_url_(request_url), options_mask_(options_mask), callback_(callback), - safe_browsing_ui_manager_(safe_browsing_ui_manager) { + ssl_cert_reporter_(ssl_cert_reporter.Pass()) { #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) Profile* profile = Profile::FromBrowserContext( web_contents->GetBrowserContext()); @@ -208,7 +207,7 @@ void SSLErrorHandler::ShowSSLInterstitial() { SHOW_SSL_INTERSTITIAL_NONOVERRIDABLE); (new SSLBlockingPage(web_contents_, cert_error_, ssl_info_, request_url_, options_mask_, base::Time::NowFromSystemTime(), - safe_browsing_ui_manager_, callback_))->Show(); + ssl_cert_reporter_.Pass(), callback_))->Show(); // Once an interstitial is displayed, no need to keep the handler around. // This is the equivalent of "delete this". web_contents_->RemoveUserData(UserDataKey()); |