summaryrefslogtreecommitdiffstats
path: root/chrome/browser/safe_browsing
diff options
context:
space:
mode:
authorpanayiotis@google.com <panayiotis@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-14 22:51:11 +0000
committerpanayiotis@google.com <panayiotis@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-14 22:51:11 +0000
commit21a034ee40b4a720ae5613180425338a86748268 (patch)
tree88c0da4c454f051717c1e1e73ba70d66e3ee1beb /chrome/browser/safe_browsing
parent00207a41566893c9681d092eaa1ac7f31a5666e4 (diff)
downloadchromium_src-21a034ee40b4a720ae5613180425338a86748268.zip
chromium_src-21a034ee40b4a720ae5613180425338a86748268.tar.gz
chromium_src-21a034ee40b4a720ae5613180425338a86748268.tar.bz2
Add a link to the safe browsing privacy policies in the option to send malware details to Google.
BUG=60831 TEST=relevant unit_tests,browser_tests, go to ianfette.org. Review URL: http://codereview.chromium.org/6268001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71506 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/safe_browsing')
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_blocking_page.cc30
1 files changed, 27 insertions, 3 deletions
diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
index 95baed4..35a5abb 100644
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
@@ -59,6 +59,11 @@ static const char* const kLearnMoreMalwareUrl =
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 @@ static const char* const kPLinkHtml =
"<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,9 +337,16 @@ void SafeBrowsingBlockingPage::PopulateMalwareStringDictionary(
} 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(
@@ -400,6 +417,13 @@ void SafeBrowsingBlockingPage::CommandReceived(const std::string& cmd) {
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.