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

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

Issue 416403006: Improve the SSL error display when the clock is wrong. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Restore creepy side-effect to get the red lock icon back. Whoa. Created 6 years, 5 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/app/google_chrome_strings.grd ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ssl/ssl_blocking_page.cc
diff --git a/chrome/browser/ssl/ssl_blocking_page.cc b/chrome/browser/ssl/ssl_blocking_page.cc
index 458a166768046d226b04431f58575424208c414c..d77be30550d4f9e244f5d2913fe37af9e77f57f1 100644
--- a/chrome/browser/ssl/ssl_blocking_page.cc
+++ b/chrome/browser/ssl/ssl_blocking_page.cc
@@ -575,15 +575,36 @@ std::string SSLBlockingPage::GetHTMLContentsV2() {
"tabTitle", l10n_util::GetStringUTF16(IDS_SSL_V2_TITLE));
load_time_data.SetString(
"heading", l10n_util::GetStringUTF16(IDS_SSL_V2_HEADING));
- if ((SSLErrorClassification::IsUserClockInThePast(
- base::Time::NowFromSystemTime()))
+
+ base::Time now = base::Time::NowFromSystemTime();
+ if ((SSLErrorClassification::IsUserClockInThePast(now) ||
+ SSLErrorClassification::IsUserClockInTheFuture(now))
&& (SSLErrorInfo::NetErrorToErrorType(cert_error_) ==
SSLErrorInfo::CERT_DATE_INVALID)) {
load_time_data.SetString("primaryParagraph",
l10n_util::GetStringFUTF16(
IDS_SSL_CLOCK_ERROR,
url,
- base::TimeFormatShortDate(base::Time::Now())));
+ base::TimeFormatShortDate(now)));
+ if (overridable_ && !strict_enforcement_) {
+ load_time_data.SetString(
+ "finalParagraph",
+ l10n_util::GetStringFUTF16(IDS_SSL_OVERRIDABLE_PROCEED_PARAGRAPH,
+ url));
+ load_time_data.SetString(
+ "primaryButtonText",
+ l10n_util::GetStringUTF16(IDS_SSL_NONOVERRIDABLE_RELOAD_BUTTON));
felt 2014/07/26 01:12:36 should we use the IDS_SSL_OVERRIDABLE_SAFETY_BUTTO
+ } else {
+ load_time_data.SetString(
+ "primaryButtonText",
+ l10n_util::GetStringUTF16(IDS_SSL_OVERRIDABLE_SAFETY_BUTTON));
+ }
+
+ base::StringPiece html(
+ ResourceBundle::GetSharedInstance().GetRawDataResource(
+ IRD_SSL_INTERSTITIAL_V2_HTML));
+ webui::UseVersion2 version;
+ return webui::GetI18nTemplateHtml(html, &load_time_data);
felt 2014/07/26 01:12:36 this appears to return without setting a number of
felt 2014/07/26 01:13:06 oh wait, the primary paragraph is set... but it lo
palmer 2014/08/07 01:26:15 I changed it; see what you think now.
} else {
load_time_data.SetString(
"primaryParagraph",
« no previous file with comments | « chrome/app/google_chrome_strings.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698