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

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

Issue 2339853003: MD Settings: Fix Reset profile dialog scenario that causes a crash. (Closed)
Patch Set: Nit Created 4 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 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 onCancelTap_: function() { 43 onCancelTap_: function() {
44 this.$.dialog.cancel(); 44 this.$.dialog.cancel();
45 }, 45 },
46 46
47 /** @private */ 47 /** @private */
48 onResetTap_: function() { 48 onResetTap_: function() {
49 this.clearingInProgress_ = true; 49 this.clearingInProgress_ = true;
50 this.browserProxy_.performResetProfileSettings( 50 this.browserProxy_.performResetProfileSettings(
51 this.$.sendSettings.checked).then(function() { 51 this.$.sendSettings.checked).then(function() {
52 this.clearingInProgress_ = false; 52 this.clearingInProgress_ = false;
53 this.$.dialog.close(); 53 if (this.$.dialog.open)
54 this.dispatchEvent(new CustomEvent('reset-done')); 54 this.$.dialog.close();
55 this.fire('reset-done');
55 }.bind(this)); 56 }.bind(this));
56 }, 57 },
57 58
58 /** 59 /**
59 * Displays the settings that will be reported in a new tab. 60 * Displays the settings that will be reported in a new tab.
60 * @private 61 * @private
61 */ 62 */
62 onShowReportedSettingsTap_: function() { 63 onShowReportedSettingsTap_: function() {
63 this.browserProxy_.showReportedSettings(); 64 this.browserProxy_.showReportedSettings();
64 }, 65 },
65 }); 66 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698