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

Unified Diff: chrome/browser/resources/settings/privacy_page/privacy_page.js

Issue 2731403005: MD Settings: Privacy: Show dialog when changing do-not-track (Closed)
Patch Set: Created 3 years, 9 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/settings/privacy_page/privacy_page.js
diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.js b/chrome/browser/resources/settings/privacy_page/privacy_page.js
index 825633f929ffc159ac677f3a70cc9916a6b7c954..664cc2aa5beb031531f9e1406c0af150c2c6688f 100644
--- a/chrome/browser/resources/settings/privacy_page/privacy_page.js
+++ b/chrome/browser/resources/settings/privacy_page/privacy_page.js
@@ -111,6 +111,37 @@ Polymer({
settings.getCurrentRoute() == settings.Route.CLEAR_BROWSER_DATA;
},
+ /**
+ * Handles the change event for the do-not-track toggle. Shows a
+ * confirmation dialog.
+ * @param {Event} event
+ * @private
+ */
+ onDoNotTrackChange_: function(event) {
+ this.$.confirmDoNotTrackDialog.showModal();
+ },
+
+ /**
+ * Handles the shared proxy confirmation dialog 'Confirm' button.
+ * @private
+ */
+ onDoNotTrackDialogConfirm_: function() {
+ /** @type {!SettingsToggleButtonElement} */ (this.$.doNotTrack)
+ .sendPrefChange();
+ this.$.confirmDoNotTrackDialog.close();
+ },
+
+ /**
+ * Handles the shared proxy confirmation dialog 'Cancel' button or a cancel
+ * event.
+ * @private
+ */
+ onDoNotTrackDialogCancel_: function() {
+ /** @type {!SettingsToggleButtonElement} */ (this.$.doNotTrack)
+ .resetToPrefValue();
+ this.$.confirmDoNotTrackDialog.close();
+ },
+
/** @private */
onManageCertificatesTap_: function() {
// <if expr="use_nss_certs">

Powered by Google App Engine
This is Rietveld 408576698