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

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

Issue 6268001: Add a link to the safe browsing privacy policies in the option to send malwar... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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/browser/resources/safe_browsing_malware_block.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
===================================================================
--- chrome/browser/safe_browsing/safe_browsing_blocking_page.cc (revision 71243)
+++ chrome/browser/safe_browsing/safe_browsing_blocking_page.cc (working copy)
@@ -59,6 +59,11 @@
static const char* const kLearnMorePhishingUrl =
"http://www.google.com/support/bin/answer.py?answer=106318";
+// URL for the "Safe Browsing Privacy Policies" link on the blocking page.
+// Note: this page is not yet localized.
+static const char* const kSbPrivacyPolicyUrl =
+ "http://www.google.com/intl/en_us/privacy/browsing.html";
+
static const char* const kSbDiagnosticHtml =
"<a href=\"\" onclick=\"sendCommand('showDiagnostic'); return false;\" "
"onmousedown=\"return false;\">%s</a>";
@@ -67,10 +72,15 @@
"<a href=\"\" onclick=\"sendCommand('proceed'); return false;\" "
"onmousedown=\"return false;\">%s</a>";
+static const char* const kPrivacyLinkHtml =
+ "<a href=\"\" onclick=\"sendCommand('showPrivacy'); return false;\" "
+ "onmousedown=\"return false;\">%s</a>";
+
// The commands returned by the page when the user performs an action.
static const char* const kShowDiagnosticCommand = "showDiagnostic";
static const char* const kReportErrorCommand = "reportError";
static const char* const kLearnMoreCommand = "learnMore";
+static const char* const kShowPrivacyCommand = "showPrivacy";
static const char* const kProceedCommand = "proceed";
static const char* const kTakeMeBackCommand = "takeMeBack";
static const char* const kDoReportCommand = "doReport";
@@ -327,10 +337,17 @@
} else {
// Show the checkbox for sending malware details.
strings->SetBoolean(kDisplayCheckBox, true);
- strings->SetString(
- "confirm_text",
- l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_MALWARE_REPORTING_AGREE));
+ std::string privacy_link = StringPrintf(
+ kPrivacyLinkHtml,
+ l10n_util::GetStringUTF8(
+ IDS_SAFE_BROWSING_PRIVACY_POLICY_PAGE).c_str());
+
+ strings->SetString("confirm_text",
+ l10n_util::GetStringFUTF16(
+ IDS_SAFE_BROWSING_MALWARE_REPORTING_AGREE,
+ UTF8ToUTF16(privacy_link)));
+
const PrefService::Preference* pref =
tab()->profile()->GetPrefs()->FindPreference(
prefs::kSafeBrowsingReportingEnabled);
@@ -400,6 +417,13 @@
return;
}
+ if (command == kShowPrivacyCommand) {
+ // User pressed "Safe Browsing privacy policy".
+ GURL url(kSbPrivacyPolicyUrl);
+ tab()->OpenURL(url, GURL(), CURRENT_TAB, PageTransition::LINK);
+ return;
+ }
+
if (command == kProceedCommand) {
Proceed();
// We are deleted after this.
« no previous file with comments | « chrome/browser/resources/safe_browsing_malware_block.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698