diff options
author | lgarron <lgarron@chromium.org> | 2014-11-04 16:50:49 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-05 00:51:05 +0000 |
commit | 5d5675bf978f9558772b2dc8f7630ee9db5e4862 (patch) | |
tree | 208e69ac067b0d36b5816c2c2db2e8ab23c686f7 | |
parent | 0313803a216893aff1586a2e92c8a2ab46bee8be (diff) | |
download | chromium_src-5d5675bf978f9558772b2dc8f7630ee9db5e4862.zip chromium_src-5d5675bf978f9558772b2dc8f7630ee9db5e4862.tar.gz chromium_src-5d5675bf978f9558772b2dc8f7630ee9db5e4862.tar.bz2 |
Add advanced details to the SSL clock interstitial.
BUG=414843
Review URL: https://codereview.chromium.org/704623002
Cr-Commit-Position: refs/heads/master@{#302724}
-rw-r--r-- | chrome/app/generated_resources.grd | 4 | ||||
-rw-r--r-- | chrome/browser/ssl/ssl_blocking_page.cc | 25 |
2 files changed, 17 insertions, 12 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index c319976..d80752f 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd @@ -9728,6 +9728,10 @@ and incorrect credentials. Either an attacker is trying to pretend to be <ph nam </message> </if> + <message name="IDS_SSL_V2_CLOCK_EXPLANATION" desc="Body text for the explanation shown if user clicks on the Advanced button for an SSL clock error."> + To establish a secure connection, your clock needs to be set correctly. This is because the certificates that websites use to identify themselves are only valid for specific periods of time. Since your device's clock is incorrect, Chromium cannot verify these certificates. + </message> + <!-- Misc strings for SSL UI --> <message name="IDS_UNSAFE_FRAME_MESSAGE" desc="The text displayed in the content that is subsituted to an unsafe frame."> This frame was blocked because it contains some insecure content. diff --git a/chrome/browser/ssl/ssl_blocking_page.cc b/chrome/browser/ssl/ssl_blocking_page.cc index 0a28408..72f25fc 100644 --- a/chrome/browser/ssl/ssl_blocking_page.cc +++ b/chrome/browser/ssl/ssl_blocking_page.cc @@ -423,11 +423,19 @@ std::string SSLBlockingPage::GetHTMLContents() { load_time_data.SetString("type", "SSL"); + // Shared UI configuration for all SSL interstitials. base::Time now = base::Time::NowFromSystemTime(); bool bad_clock = IsErrorDueToBadClock(now, cert_error_); load_time_data.SetString("errorCode", net::ErrorToString(cert_error_)); + load_time_data.SetString( + "openDetails", + l10n_util::GetStringUTF16(IDS_SSL_V2_OPEN_DETAILS_BUTTON)); + load_time_data.SetString( + "closeDetails", + l10n_util::GetStringUTF16(IDS_SSL_V2_CLOSE_DETAILS_BUTTON)); + // Conditional UI configuration. if (bad_clock) { load_time_data.SetBoolean("bad_clock", true); load_time_data.SetBoolean("overridable", false); @@ -463,13 +471,12 @@ std::string SSLBlockingPage::GetHTMLContents() { load_time_data.SetString( "primaryButtonText", l10n_util::GetStringUTF16(IDS_SSL_V2_CLOCK_UPDATE_DATE_AND_TIME)); + load_time_data.SetString( + "explanationParagraph", + l10n_util::GetStringUTF16(IDS_SSL_V2_CLOCK_EXPLANATION)); - // We set the "Advanced" link to be empty so that it doesn't appear. - load_time_data.SetString("openDetails", std::string()); - - // The interstitial template expects these strings, but we're not using - // them. So we send blank strings for now. - load_time_data.SetString("explanationParagraph", std::string()); + // The interstitial template expects this string, but we're not using it. So + // we send a blank string for now. load_time_data.SetString("finalParagraph", std::string()); } else { load_time_data.SetBoolean("bad_clock", false); @@ -481,12 +488,6 @@ std::string SSLBlockingPage::GetHTMLContents() { load_time_data.SetString( "primaryParagraph", l10n_util::GetStringFUTF16(IDS_SSL_V2_PRIMARY_PARAGRAPH, url)); - load_time_data.SetString( - "openDetails", - l10n_util::GetStringUTF16(IDS_SSL_V2_OPEN_DETAILS_BUTTON)); - load_time_data.SetString( - "closeDetails", - l10n_util::GetStringUTF16(IDS_SSL_V2_CLOSE_DETAILS_BUTTON)); if (overridable_) { load_time_data.SetBoolean("overridable", true); |