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

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

Issue 2303413002: Simplify security_interstitials::ControllerClient and other related classes (Closed)
Patch Set: namespaces 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
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 b67eb20190677f506c1e2e25761b452350cc87ed..0f3d31b777453424d2aa2557ae06cfc52a4cf71b 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;
@@ -90,6 +94,18 @@ class SSLBlockingPage : public SecurityInterstitialPage {
void AfterShow() 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_;

Powered by Google App Engine
This is Rietveld 408576698