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

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

Issue 2303413002: Simplify security_interstitials::ControllerClient and other related classes (Closed)
Patch Set: Jialiu comments Created 4 years, 3 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/captive_portal_blocking_page.cc ('k') | chrome/browser/ssl/ssl_blocking_page.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ssl/ssl_blocking_page.h
diff --git a/chrome/browser/ssl/ssl_blocking_page.h b/chrome/browser/ssl/ssl_blocking_page.h
index feb7966f001337a57569c74e394185f9cde8f871..084343c78484728d74b499c0a8a77a1179cf222f 100644
--- a/chrome/browser/ssl/ssl_blocking_page.h
+++ b/chrome/browser/ssl/ssl_blocking_page.h
@@ -37,6 +37,7 @@ class SSLErrorUI;
class CertReportHelper;
class SSLUITest;
+class ChromeMetricsHelper;
// This class is responsible for showing/hiding the interstitial page that is
// shown when a certificate error happens.
@@ -52,15 +53,18 @@ class SSLBlockingPage : public SecurityInterstitialPage {
// is responsible for cleaning up the blocking page, otherwise the
// interstitial takes ownership when shown. |options_mask| must be a bitwise
// mask of SSLErrorUI::SSLErrorOptionsMask values.
- SSLBlockingPage(content::WebContents* web_contents,
- int cert_error,
- const net::SSLInfo& ssl_info,
- const GURL& request_url,
- int options_mask,
- const base::Time& time_triggered,
- std::unique_ptr<SSLCertReporter> ssl_cert_reporter,
- const base::Callback<
- void(content::CertificateRequestResultType)>& callback);
+ // This is static because the constructor uses expensive to compute parameters
+ // more than once (e.g. overrideable).
+ static SSLBlockingPage* Create(
+ content::WebContents* web_contents,
+ int cert_error,
+ const net::SSLInfo& ssl_info,
+ const GURL& request_url,
+ int options_mask,
+ const base::Time& time_triggered,
+ std::unique_ptr<SSLCertReporter> ssl_cert_reporter,
+ const base::Callback<void(content::CertificateRequestResultType)>&
+ callback);
// InterstitialPageDelegate method:
InterstitialPageDelegate::TypeID GetTypeForTesting() const override;
@@ -89,6 +93,19 @@ class SSLBlockingPage : public SecurityInterstitialPage {
base::DictionaryValue* load_time_data) override;
private:
+ SSLBlockingPage(
+ content::WebContents* web_contents,
+ int cert_error,
+ const net::SSLInfo& ssl_info,
+ const GURL& request_url,
+ int options_mask,
+ const base::Time& time_triggered,
+ std::unique_ptr<SSLCertReporter> ssl_cert_reporter,
+ bool overrideable,
+ std::unique_ptr<ChromeMetricsHelper> metrics_helper,
+ const base::Callback<void(content::CertificateRequestResultType)>&
+ callback);
+
void NotifyDenyCertificate();
base::Callback<void(content::CertificateRequestResultType)> callback_;
« no previous file with comments | « chrome/browser/ssl/captive_portal_blocking_page.cc ('k') | chrome/browser/ssl/ssl_blocking_page.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698