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

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

Issue 2375223002: md-settings: Fix back navigation from /resetProfileSettings. (Closed)
Patch Set: Fix failing test. Created 4 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
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 * 'settings-reset-profile-dialog' is the dialog shown for clearing profile 7 * 'settings-reset-profile-dialog' is the dialog shown for clearing profile
8 * settings. 8 * settings.
9 */ 9 */
10 Polymer({ 10 Polymer({
(...skipping 16 matching lines...) Expand all
27 27
28 /** @override */ 28 /** @override */
29 ready: function() { 29 ready: function() {
30 this.browserProxy_ = settings.ResetBrowserProxyImpl.getInstance(); 30 this.browserProxy_ = settings.ResetBrowserProxyImpl.getInstance();
31 31
32 this.addEventListener('cancel', function() { 32 this.addEventListener('cancel', function() {
33 this.browserProxy_.onHideResetProfileDialog(); 33 this.browserProxy_.onHideResetProfileDialog();
34 }.bind(this)); 34 }.bind(this));
35 }, 35 },
36 36
37 open: function() { 37 /** @override */
38 attached: function() {
38 this.$.dialog.showModal(); 39 this.$.dialog.showModal();
39 this.browserProxy_.onShowResetProfileDialog(); 40 this.browserProxy_.onShowResetProfileDialog();
40 }, 41 },
41 42
42 /** @private */ 43 /** @private */
43 onCancelTap_: function() { 44 onCancelTap_: function() {
44 this.$.dialog.cancel(); 45 this.$.dialog.cancel();
45 }, 46 },
46 47
47 /** @private */ 48 /** @private */
48 onResetTap_: function() { 49 onResetTap_: function() {
49 this.clearingInProgress_ = true; 50 this.clearingInProgress_ = true;
50 this.browserProxy_.performResetProfileSettings( 51 this.browserProxy_.performResetProfileSettings(
51 this.$.sendSettings.checked).then(function() { 52 this.$.sendSettings.checked).then(function() {
52 this.clearingInProgress_ = false; 53 this.clearingInProgress_ = false;
53 if (this.$.dialog.open) 54 if (this.$.dialog.open)
54 this.$.dialog.close(); 55 this.$.dialog.close();
55 this.fire('reset-done'); 56 this.fire('reset-done');
56 }.bind(this)); 57 }.bind(this));
57 }, 58 },
58 59
59 /** 60 /**
60 * Displays the settings that will be reported in a new tab. 61 * Displays the settings that will be reported in a new tab.
61 * @private 62 * @private
62 */ 63 */
63 onShowReportedSettingsTap_: function() { 64 onShowReportedSettingsTap_: function() {
64 this.browserProxy_.showReportedSettings(); 65 this.browserProxy_.showReportedSettings();
65 }, 66 },
66 }); 67 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698