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

Unified Diff: chrome/browser/resources/safe_browsing/safe_browsing_v3.js

Issue 339503004: Add the extended reporting checkbox to the malware interstitial v3 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: No more pointer 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
« no previous file with comments | « no previous file | chrome/browser/resources/ssl/interstitial_v2.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/safe_browsing/safe_browsing_v3.js
diff --git a/chrome/browser/resources/safe_browsing/safe_browsing_v3.js b/chrome/browser/resources/safe_browsing/safe_browsing_v3.js
index 519a5824b94bd040146f5b331f38b392eebe42ff..931f3ec21d2384a146881efe4e0fd3df4f8bc880 100644
--- a/chrome/browser/resources/safe_browsing/safe_browsing_v3.js
+++ b/chrome/browser/resources/safe_browsing/safe_browsing_v3.js
@@ -16,3 +16,19 @@ var SB_CMD_TAKE_ME_BACK = 'takeMeBack';
// Other constants defined in safe_browsing_blocking_page.cc.
var SB_BOX_CHECKED = 'boxchecked';
var SB_DISPLAY_CHECK_BOX = 'displaycheckbox';
+
+// This sets up the Extended Safe Browsing Reporting opt-in.
+function setupCheckbox() {
+ if (loadTimeData.getBoolean('ssl') || loadTimeData.getBoolean('phishing') ||
+ !loadTimeData.getBoolean(SB_DISPLAY_CHECK_BOX))
Dan Beam 2014/06/17 18:31:06 nit: curlies
felt 2014/06/17 18:45:33 Done.
+ return;
+
+ $('optin-label').innerHTML = loadTimeData.getString('optInLink');
Dan Beam 2014/06/17 18:31:05 opt nit: opt-in-label, etc.
felt 2014/06/17 18:45:33 Done.
+ $('optin-checkbox').checked = loadTimeData.getBoolean(SB_BOX_CHECKED);
+ $('malware-optin').classList.remove('hidden');
+
+ $('optin-checkbox').addEventListener('click', function() {
+ sendCommand(
+ $('optin-checkbox').checked ? SB_CMD_DO_REPORT : SB_CMD_DONT_REPORT);
+ });
+}
« no previous file with comments | « no previous file | chrome/browser/resources/ssl/interstitial_v2.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698