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

Side by Side Diff: chrome/browser/resources/settings/reset_page/reset_profile_dialog.js

Issue 2722083003: MD Settings: Change "view reported settings" string. (Closed)
Patch Set: Add test. 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * 7 *
8 * 'settings-reset-profile-dialog' is the dialog shown for clearing profile 8 * 'settings-reset-profile-dialog' is the dialog shown for clearing profile
9 * settings. A triggered variant of this dialog can be shown under certain 9 * settings. A triggered variant of this dialog can be shown under certain
10 * circumstances. See triggered_profile_resetter.h for when the triggered 10 * circumstances. See triggered_profile_resetter.h for when the triggered
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 return loadTimeData.getStringF('resetPageTitle'); 68 return loadTimeData.getStringF('resetPageTitle');
69 }, 69 },
70 70
71 /** @override */ 71 /** @override */
72 ready: function() { 72 ready: function() {
73 this.browserProxy_ = settings.ResetBrowserProxyImpl.getInstance(); 73 this.browserProxy_ = settings.ResetBrowserProxyImpl.getInstance();
74 74
75 this.addEventListener('cancel', function() { 75 this.addEventListener('cancel', function() {
76 this.browserProxy_.onHideResetProfileDialog(); 76 this.browserProxy_.onHideResetProfileDialog();
77 }.bind(this)); 77 }.bind(this));
78
79 this.$$('paper-checkbox a').addEventListener(
80 'tap', this.onShowReportedSettingsTap_.bind(this));
81 // Prevent toggling of the checkbox when hitting the "Enter" key on the
82 // link.
83 this.$$('paper-checkbox a').addEventListener(
84 'keydown', function(e) { e.stopPropagation(); });
78 }, 85 },
79 86
80 /** @private */ 87 /** @private */
81 showDialog_: function() { 88 showDialog_: function() {
82 this.$.dialog.showModal(); 89 this.$.dialog.showModal();
83 this.browserProxy_.onShowResetProfileDialog(); 90 this.browserProxy_.onShowResetProfileDialog();
84 }, 91 },
85 92
86 /** @override */ 93 /** @override */
87 attached: function() { 94 attached: function() {
(...skipping 28 matching lines...) Expand all
116 this.$.sendSettings.checked, this.resetRequestOrigin_).then(function() { 123 this.$.sendSettings.checked, this.resetRequestOrigin_).then(function() {
117 this.clearingInProgress_ = false; 124 this.clearingInProgress_ = false;
118 if (this.$.dialog.open) 125 if (this.$.dialog.open)
119 this.$.dialog.close(); 126 this.$.dialog.close();
120 this.fire('reset-done'); 127 this.fire('reset-done');
121 }.bind(this)); 128 }.bind(this));
122 }, 129 },
123 130
124 /** 131 /**
125 * Displays the settings that will be reported in a new tab. 132 * Displays the settings that will be reported in a new tab.
133 * @param {!Event} e
126 * @private 134 * @private
127 */ 135 */
128 onShowReportedSettingsTap_: function() { 136 onShowReportedSettingsTap_: function(e) {
129 this.browserProxy_.showReportedSettings(); 137 this.browserProxy_.showReportedSettings();
138 e.stopPropagation();
130 }, 139 },
131 }); 140 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698