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

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

Issue 10911283: Implement 'Do Not Track' header (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged with ToT Created 8 years, 3 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/do_not_track_confirm_overlay.js
diff --git a/chrome/browser/resources/options/do_not_track_confirm_overlay.js b/chrome/browser/resources/options/do_not_track_confirm_overlay.js
new file mode 100644
index 0000000000000000000000000000000000000000..501eeb705318249284d4ba4fa1714c24d42660cd
--- /dev/null
+++ b/chrome/browser/resources/options/do_not_track_confirm_overlay.js
@@ -0,0 +1,44 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+cr.define('options', function() {
+ var SettingsDialog = options.SettingsDialog;
+
+ /**
+ * DoNotTrackConfirmOverlay class
+ * Dialog to confirm that the user really wants to enable Do Not Track.
+ * @extends {SettingsDialog}
+ */
+ function DoNotTrackConfirmOverlay() {
+ SettingsDialog.call(this,
+ 'doNotTrackConfirm',
+ loadTimeData.getString('doNotTrackConfirmTitle'),
+ 'do-not-track-confirm-overlay',
+ $('do-not-track-confirm-ok'),
+ $('do-not-track-confirm-cancel'));
+ };
+
+ cr.addSingletonGetter(DoNotTrackConfirmOverlay);
+
+ DoNotTrackConfirmOverlay.prototype = {
+ __proto__: SettingsDialog.prototype,
+
+ /** @inheritDoc */
+ handleConfirm: function() {
+ SettingsDialog.prototype.handleConfirm.call(this);
+ Preferences.setBooleanPref('enable_do_not_track', true, true);
+ },
+
+ /** @inheritDoc */
+ handleCancel: function() {
+ SettingsDialog.prototype.handleCancel.call(this);
+ $('do-not-track-enabled').checked = false;
+ },
+ };
+
+ // Export
+ return {
+ DoNotTrackConfirmOverlay: DoNotTrackConfirmOverlay
+ };
+});
« no previous file with comments | « chrome/browser/resources/options/do_not_track_confirm_overlay.html ('k') | chrome/browser/resources/options/options.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698