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

Unified Diff: chrome/browser/resources/options/browser_options.js

Issue 153353006: Opt out of download feedback from settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First version for review Created 6 years, 10 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/resources/options/browser_options.js
diff --git a/chrome/browser/resources/options/browser_options.js b/chrome/browser/resources/options/browser_options.js
index cc01414f19c8147c0156f394c0a52791de7edb93..24a946aed47987e689a8f63c0f511a00d776c4d7 100644
--- a/chrome/browser/resources/options/browser_options.js
+++ b/chrome/browser/resources/options/browser_options.js
@@ -273,6 +273,15 @@ cr.define('options', function() {
[String(event.currentTarget.checked)]);
};
}
+ // The safe browsing download feedback setting requires special handling.
+ // The pref is actually an enum, which needs to be mapped to a boolean.
+ $('safe-browsing-download-feedback-enabled').checked =
+ loadTimeData.getBoolean('sbDownloadFeedbackEnabled');
+ $('safe-browsing-download-feedback-enabled').onclick = function(event) {
+ chrome.send(
+ 'downloadFeedbackStatusChanged',
+ [Boolean($('safe-browsing-download-feedback-enabled').checked)]);
+ };
// Bluetooth (CrOS only).
if (cr.isChromeOS) {

Powered by Google App Engine
This is Rietveld 408576698