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

Unified Diff: chrome/browser/ssl/bad_clock_blocking_page.cc

Issue 2298613007: Use controller from SecurityInterstitialPage in derived classes (Closed)
Patch Set: Provide default impl for SecurityInterstitialPage::AfterShow 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/bad_clock_blocking_page.h ('k') | chrome/browser/ssl/captive_portal_blocking_page.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ssl/bad_clock_blocking_page.cc
diff --git a/chrome/browser/ssl/bad_clock_blocking_page.cc b/chrome/browser/ssl/bad_clock_blocking_page.cc
index 5666afcbc2e7b8121c58831b29f50917e4a824f7..6c9cd24404e9952045636c8649aede963f30797c 100644
--- a/chrome/browser/ssl/bad_clock_blocking_page.cc
+++ b/chrome/browser/ssl/bad_clock_blocking_page.cc
@@ -15,7 +15,6 @@
#include "chrome/browser/ssl/cert_report_helper.h"
#include "chrome/browser/ssl/ssl_cert_reporter.h"
#include "components/security_interstitials/core/bad_clock_ui.h"
-#include "components/security_interstitials/core/controller_client.h"
#include "components/security_interstitials/core/metrics_helper.h"
#include "content/public/browser/cert_store.h"
#include "content/public/browser/interstitial_page.h"
@@ -59,8 +58,7 @@ BadClockBlockingPage::BadClockBlockingPage(
: SecurityInterstitialPage(web_contents, request_url),
callback_(callback),
ssl_info_(ssl_info),
- time_triggered_(time_triggered),
- controller_(new ChromeControllerClient(web_contents)) {
+ time_triggered_(time_triggered) {
// Set up the metrics helper for the BadClockUI.
security_interstitials::MetricsHelper::ReportDetails reporting_info;
reporting_info.metric_prefix = kMetricsName;
@@ -69,16 +67,16 @@ BadClockBlockingPage::BadClockBlockingPage(
chrome_metrics_helper->StartRecordingCaptivePortalMetrics(false);
std::unique_ptr<security_interstitials::MetricsHelper> metrics_helper(
chrome_metrics_helper);
- controller_->set_metrics_helper(std::move(metrics_helper));
+ controller()->set_metrics_helper(std::move(metrics_helper));
cert_report_helper_.reset(new CertReportHelper(
std::move(ssl_cert_reporter), web_contents, request_url, ssl_info,
certificate_reporting::ErrorReport::INTERSTITIAL_CLOCK,
- false /* overridable */, controller_->metrics_helper()));
+ false /* overridable */, controller()->metrics_helper()));
bad_clock_ui_.reset(new security_interstitials::BadClockUI(
request_url, cert_error, ssl_info, time_triggered, clock_state,
- controller_.get()));
+ controller()));
}
BadClockBlockingPage::~BadClockBlockingPage() {
@@ -97,10 +95,6 @@ InterstitialPageDelegate::TypeID BadClockBlockingPage::GetTypeForTesting()
return BadClockBlockingPage::kTypeForTesting;
}
-void BadClockBlockingPage::AfterShow() {
- controller_->set_interstitial_page(interstitial_page());
-}
-
void BadClockBlockingPage::PopulateInterstitialStrings(
base::DictionaryValue* load_time_data) {
bad_clock_ui_->PopulateStringsForHTML(load_time_data);
« no previous file with comments | « chrome/browser/ssl/bad_clock_blocking_page.h ('k') | chrome/browser/ssl/captive_portal_blocking_page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698