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

Side by Side Diff: chrome/browser/resources/options/do_not_track_confirm_overlay.js

Issue 11232059: Clean up copy&paste in confirmation dialogs for prefs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nit addressed. Created 8 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 cr.define('options', function() {
6 var SettingsDialog = options.SettingsDialog;
7
8 /**
9 * DoNotTrackConfirmOverlay class
10 * Dialog to confirm that the user really wants to enable Do Not Track.
11 * @extends {SettingsDialog}
12 */
13 function DoNotTrackConfirmOverlay() {
14 SettingsDialog.call(
15 this,
16 'doNotTrackConfirm',
17 loadTimeData.getString('doNotTrackConfirmOverlayTabTitle'),
18 'do-not-track-confirm-overlay',
19 $('do-not-track-confirm-ok'),
20 $('do-not-track-confirm-cancel'));
21 };
22
23 cr.addSingletonGetter(DoNotTrackConfirmOverlay);
24
25 DoNotTrackConfirmOverlay.prototype = {
26 __proto__: SettingsDialog.prototype,
27
28 /** @inheritDoc */
29 handleConfirm: function() {
30 SettingsDialog.prototype.handleConfirm.call(this);
31 Preferences.setBooleanPref('enable_do_not_track', true, true);
32 },
33
34 /** @inheritDoc */
35 handleCancel: function() {
36 SettingsDialog.prototype.handleCancel.call(this);
37 $('do-not-track-enabled').checked = false;
38 },
39 };
40
41 // Export
42 return {
43 DoNotTrackConfirmOverlay: DoNotTrackConfirmOverlay
44 };
45 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/confirm_dialog.js ('k') | chrome/browser/resources/options/instant_confirm_overlay.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698