Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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.$.dialog.close(); | |
| 54 this.dispatchEvent(new CustomEvent('reset-done')); | 55 this.dispatchEvent(new CustomEvent('reset-done')); |
|
Dan Beam
2016/09/15 21:15:40
why isn't this |this.fire('reset-done')|? what's
dpapad
2016/09/20 00:52:36
No good reason. Changed to use fire().
| |
| 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 }); |
| OLD | NEW |