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

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

Issue 339503004: Add the extended reporting checkbox to the malware interstitial v3 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Enable relevant test Created 6 years, 6 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 76a83c8d35efdf26bd0cbf4a105618db9691c829..efad64eba19cea47f1939c2377daa96af3f35b0f 100644
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
@@ -1327,6 +1327,30 @@ void SafeBrowsingBlockingPageV3::PopulateMalwareLoadTimeData(
load_time_data->SetString(
"finalParagraph",
l10n_util::GetStringUTF16(IDS_MALWARE_V3_PROCEED_PARAGRAPH));
+
+ load_time_data->SetBoolean(kDisplayCheckBox, CanShowMalwareDetailsOption());
+ if (CanShowMalwareDetailsOption()) {
+ std::string privacy_link = base::StringPrintf(
+ kPrivacyLinkHtml,
+ l10n_util::GetStringUTF8(
+ IDS_SAFE_BROWSING_PRIVACY_POLICY_PAGE_V2).c_str());
+ load_time_data->SetString(
+ "optinText",
Dan Beam 2014/06/17 17:52:54 change to optinLink to indicate it has HTML in it
felt 2014/06/17 18:03:28 Done.
+ l10n_util::GetStringFUTF16(IDS_SAFE_BROWSING_MALWARE_V2_REPORTING_AGREE,
+ base::UTF8ToUTF16(privacy_link)));
+ Profile* profile = Profile::FromBrowserContext(
+ web_contents_->GetBrowserContext());
+ if (profile->GetPrefs()->HasPrefPath(
+ prefs::kSafeBrowsingExtendedReportingEnabled)) {
+ reporting_checkbox_checked_ =
+ IsPrefEnabled(prefs::kSafeBrowsingExtendedReportingEnabled);
+ } else if (IsPrefEnabled(prefs::kSafeBrowsingReportingEnabled) ||
+ IsPrefEnabled(prefs::kSafeBrowsingDownloadFeedbackEnabled)) {
+ reporting_checkbox_checked_ = true;
+ }
+ load_time_data->SetBoolean(
+ kBoxChecked, reporting_checkbox_checked_);
+ }
}
void SafeBrowsingBlockingPageV3::PopulatePhishingLoadTimeData(

Powered by Google App Engine
This is Rietveld 408576698