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

Unified Diff: chrome/browser/safe_browsing/safe_browsing_blocking_page.cc

Issue 10905117: Safebrowsing malware interstitial UI tweaks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
Index: chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
index a12ed72d351d5a99629f748d0ca11c779b77419d..49cb08ec04d08fbdcee1a4fbdf82089693a328cc 100644
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
@@ -105,7 +105,6 @@ static const char* const kTakeMeBackCommand = "takeMeBack";
static const char* const kDoReportCommand = "doReport";
static const char* const kDontReportCommand = "dontReport";
static const char* const kDisplayCheckBox = "displaycheckbox";
-static const char* const kDisplayShowDiagnostic = "displayShowDiagnostic";
static const char* const kBoxChecked = "boxchecked";
static const char* const kExpandedSeeMore = "expandedSeeMore";
// Special command that we use when the user navigated away from the
@@ -1047,24 +1046,21 @@ void SafeBrowsingBlockingPageV2::PopulateStringDictionary(
const string16& headline,
const string16& description1,
const string16& description2,
- const string16& description3,
- const string16& description4) {
+ const string16& description3) {
strings->SetString("title", title);
strings->SetString("headLine", headline);
strings->SetString("description1", description1);
strings->SetString("description2", description2);
strings->SetString("description3", description3);
- strings->SetString("description4", description4);
strings->SetBoolean("proceedDisabled",
IsPrefEnabled(prefs::kSafeBrowsingProceedAnywayDisabled));
+ strings->SetBoolean("isMainFrame", is_main_frame_load_blocked_);
strings->SetString("textdirection", base::i18n::IsRTL() ? "rtl" : "ltr");
strings->SetString("back_button",
l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_MALWARE_BACK_BUTTON));
strings->SetString("seeMore", l10n_util::GetStringUTF16(
IDS_SAFE_BROWSING_MALWARE_V2_SEE_MORE));
- strings->SetString("seeLess", l10n_util::GetStringUTF16(
- IDS_SAFE_BROWSING_MALWARE_V2_SEE_LESS));
}
void SafeBrowsingBlockingPageV2::PopulateMultipleThreatStringDictionary(
@@ -1080,9 +1076,11 @@ void SafeBrowsingBlockingPageV2::PopulateMalwareStringDictionary(
// Check to see if we're blocking the main page, or a sub-resource on the
// main page.
- string16 headline, description1, description2, description3, description4;
+ string16 headline, description1, description2, description3;
+ description3 = l10n_util::GetStringUTF16(
+ IDS_SAFE_BROWSING_MALWARE_V2_DESCRIPTION3);
if (is_main_frame_load_blocked_) {
headline = l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_MALWARE_V2_HEADLINE);
description1 = l10n_util::GetStringFUTF16(
@@ -1091,11 +1089,8 @@ void SafeBrowsingBlockingPageV2::PopulateMalwareStringDictionary(
UTF8ToUTF16(url_.host()));
description2 = l10n_util::GetStringUTF16(
IDS_SAFE_BROWSING_MALWARE_V2_DESCRIPTION2);
- description3 = l10n_util::GetStringUTF16(
- IDS_SAFE_BROWSING_MALWARE_V2_DESCRIPTION3);
- description4 = l10n_util::GetStringUTF16(
- IDS_SAFE_BROWSING_MALWARE_V2_DESCRIPTION4);
- strings->SetBoolean(kDisplayShowDiagnostic, true);
+ strings->SetString("details", l10n_util::GetStringUTF16(
+ IDS_SAFE_BROWSING_MALWARE_V2_DETAILS));
} else {
headline = l10n_util::GetStringUTF16(
IDS_SAFE_BROWSING_MALWARE_V2_HEADLINE_SUBRESOURCE);
@@ -1103,14 +1098,12 @@ void SafeBrowsingBlockingPageV2::PopulateMalwareStringDictionary(
IDS_SAFE_BROWSING_MALWARE_V2_DESCRIPTION1_SUBRESOURCE,
l10n_util::GetStringUTF16(IDS_PRODUCT_NAME),
UTF8ToUTF16(web_contents_->GetURL().host()));
- description2 = l10n_util::GetStringUTF16(
- IDS_SAFE_BROWSING_MALWARE_V2_DESCRIPTION2_SUBRESOURCE);
- description3 = l10n_util::GetStringUTF16(
- IDS_SAFE_BROWSING_MALWARE_V2_DESCRIPTION3_SUBRESOURCE);
- description4 = l10n_util::GetStringFUTF16(
- IDS_SAFE_BROWSING_MALWARE_V2_DESCRIPTION4_SUBRESOURCE,
- UTF8ToUTF16(url_.host()));
- strings->SetBoolean(kDisplayShowDiagnostic, false);
+ description2 = l10n_util::GetStringFUTF16(
+ IDS_SAFE_BROWSING_MALWARE_V2_DESCRIPTION2_SUBRESOURCE,
+ UTF8ToUTF16(url_.host()));
+ strings->SetString("details", l10n_util::GetStringFUTF16(
+ IDS_SAFE_BROWSING_MALWARE_V2_DETAILS_SUBRESOURCE,
+ UTF8ToUTF16(url_.host())));
}
PopulateStringDictionary(
@@ -1119,8 +1112,7 @@ void SafeBrowsingBlockingPageV2::PopulateMalwareStringDictionary(
headline,
description1,
description2,
- description3,
- description4);
+ description3);
if (!CanShowMalwareDetailsOption()) {
strings->SetBoolean(kDisplayCheckBox, false);
@@ -1143,10 +1135,10 @@ void SafeBrowsingBlockingPageV2::PopulateMalwareStringDictionary(
strings->SetString(kBoxChecked, "");
}
+ strings->SetString("proceed",
+ l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_MALWARE_V2_PROCEED_LINK));
strings->SetString("learnMore",
l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_MALWARE_V2_LEARN_MORE));
- strings->SetString("details",
- l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_MALWARE_V2_DETAILS));
}
void SafeBrowsingBlockingPageV2::PopulatePhishingStringDictionary(

Powered by Google App Engine
This is Rietveld 408576698