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

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

Issue 10381051: Show the "cannot proceed" text only when appropriate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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.cc
===================================================================
--- chrome/browser/ssl/ssl_blocking_page.cc (revision 135669)
+++ chrome/browser/ssl/ssl_blocking_page.cc (working copy)
@@ -55,13 +55,15 @@
const net::SSLInfo& ssl_info,
const GURL& request_url,
bool overridable,
+ bool strict_enforcement,
const base::Callback<void(bool)>& callback)
: callback_(callback),
web_contents_(web_contents),
cert_error_(cert_error),
ssl_info_(ssl_info),
request_url_(request_url),
- overridable_(overridable) {
+ overridable_(overridable),
+ strict_enforcement_(strict_enforcement) {
RecordSSLBlockingPageStats(SHOW);
interstitial_page_ = InterstitialPage::Create(
web_contents_, true, request_url, this);
@@ -91,7 +93,7 @@
SetExtraInfo(&strings, error_info.extra_information());
int resource_id;
- if (overridable_) {
+ if (overridable_ && !strict_enforcement_) {
resource_id = IDR_SSL_ROAD_BLOCK_HTML;
strings.SetString("title",
l10n_util::GetStringUTF16(IDS_SSL_BLOCKING_PAGE_TITLE));
@@ -108,9 +110,10 @@
l10n_util::GetStringUTF16(IDS_SSL_ERROR_PAGE_TITLE));
strings.SetString("back",
l10n_util::GetStringUTF16(IDS_SSL_ERROR_PAGE_BACK));
- strings.SetString("cannotProceed",
- l10n_util::GetStringUTF16(
- IDS_SSL_ERROR_PAGE_CANNOT_PROCEED));
+ if (strict_enforcement_)
+ strings.SetString("cannotProceed",
Ryan Sleevi 2012/05/08 17:53:49 nit { }
palmer 2012/05/08 18:40:43 Done.
+ l10n_util::GetStringUTF16(
+ IDS_SSL_ERROR_PAGE_CANNOT_PROCEED));
}
strings.SetString("textdirection", base::i18n::IsRTL() ? "rtl" : "ltr");
@@ -149,7 +152,7 @@
Profile* profile = Profile::FromBrowserContext(
web_contents_->GetBrowserContext());
renderer_preferences_util::UpdateFromSystemSettings(prefs, profile);
- }
+}
void SSLBlockingPage::OnProceed() {
RecordSSLBlockingPageStats(PROCEED);

Powered by Google App Engine
This is Rietveld 408576698