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

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

Issue 1481213003: Componentize the bad clock blocking page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes for estark Created 5 years 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/bad_clock_blocking_page.h
diff --git a/chrome/browser/ssl/bad_clock_blocking_page.h b/chrome/browser/ssl/bad_clock_blocking_page.h
index 592dae869963f86a1c1b6913fcf722576dd343bd..b75646d7b8c8e10eb6c208e0088bc6ad6b45ff13 100644
--- a/chrome/browser/ssl/bad_clock_blocking_page.h
+++ b/chrome/browser/ssl/bad_clock_blocking_page.h
@@ -11,22 +11,24 @@
#include "base/time/time.h"
#include "chrome/browser/interstitials/security_interstitial_page.h"
#include "chrome/browser/ssl/ssl_cert_reporter.h"
+#include "components/security_interstitials/core/bad_clock_ui.h"
estark 2015/12/01 21:41:51 forward declare?
felt 2015/12/01 22:59:23 Done.
#include "net/ssl/ssl_info.h"
class CertReportHelper;
class GURL;
-// This class is responsible for showing/hiding the interstitial page that is
-// shown when a certificate error happens. This error is not overridable.
-// It deletes itself when the interstitial page is closed.
+// This class is responsible for showing/hiding the interstitial page that
+// occurs when an SSL error is triggered by a clock misconfiguration. It
+// creates the UI using security_interstitials::BadClockUI and then
+// displays it. It deletes itself when the interstitial page is closed.
class BadClockBlockingPage : public SecurityInterstitialPage {
public:
// Interstitial type, used in tests.
static InterstitialPageDelegate::TypeID kTypeForTesting;
- // Creates a bad clock interstitial. If the blocking page isn't shown, the
- // caller is responsible for cleaning up the blocking page, otherwise the
- // interstitial takes ownership when shown.
+ // If the blocking page isn't shown, the caller is responsible for cleaning
+ // up the blocking page. Otherwise, the interstitial takes ownership when
+ // shown.
BadClockBlockingPage(content::WebContents* web_contents,
int cert_error,
const net::SSLInfo& ssl_info,
@@ -44,7 +46,7 @@ class BadClockBlockingPage : public SecurityInterstitialPage {
scoped_ptr<SSLCertReporter> ssl_cert_reporter);
protected:
- // InterstitialPageDelegate implementation.
+ // InterstitialPageDelegate implementation:
void CommandReceived(const std::string& command) override;
void OverrideEntry(content::NavigationEntry* entry) override;
void OverrideRendererPrefs(content::RendererPreferences* prefs) override;
@@ -54,6 +56,7 @@ class BadClockBlockingPage : public SecurityInterstitialPage {
bool ShouldCreateNewNavigation() const override;
void PopulateInterstitialStrings(
base::DictionaryValue* load_time_data) override;
+ void AfterShow() override;
private:
void NotifyDenyCertificate();
@@ -61,11 +64,10 @@ class BadClockBlockingPage : public SecurityInterstitialPage {
base::Callback<void(bool)> callback_;
const int cert_error_;
const net::SSLInfo ssl_info_;
-
- // The time at which the interstitial was triggered. The interstitial
- // calculates all times relative to this.
const base::Time time_triggered_;
+ scoped_ptr<ChromeControllerClient> controller_;
+ scoped_ptr<security_interstitials::BadClockUI> bad_clock_ui_;
scoped_ptr<CertReportHelper> cert_report_helper_;
DISALLOW_COPY_AND_ASSIGN(BadClockBlockingPage);

Powered by Google App Engine
This is Rietveld 408576698