Index: chrome/browser/resources/settings/reset_page/reset_profile_banner.js |
diff --git a/chrome/browser/resources/settings/reset_page/reset_profile_banner.js b/chrome/browser/resources/settings/reset_page/reset_profile_banner.js |
index 758582f22738753530d351af8ea28b56687717f1..9bece37a644abe9f3f4990733d0f803bf8f4f468 100644 |
--- a/chrome/browser/resources/settings/reset_page/reset_profile_banner.js |
+++ b/chrome/browser/resources/settings/reset_page/reset_profile_banner.js |
@@ -4,37 +4,34 @@ |
/** |
* @fileoverview |
- * 'settings-reset-profile-banner' is the banner shown for clearing profile |
- * settings. |
+ * 'settings-reset-profile-banner' is the banner shown for propmting the user to |
+ * clear profile settings. |
*/ |
Polymer({ |
is: 'settings-reset-profile-banner', |
- properties: { |
- showResetProfileDialog_: { |
- type: Boolean, |
- value: false, |
- }, |
+ listeners: { |
+ 'cancel': 'onCancel_', |
+ }, |
+ |
+ /** @override */ |
+ attached: function() { |
+ this.$.dialog.showModal(); |
}, |
/** @private */ |
- onCloseTap_: function() { |
- settings.ResetBrowserProxyImpl.getInstance().onHideResetProfileBanner(); |
- this.remove(); |
+ onOkTap_: function() { |
+ this.$.dialog.cancel(); |
}, |
- /** |
- * Shows a <settings-reset-profile-dialog>. |
- * @param {!Event} e |
- * @private |
- */ |
- showDialog_: function(e) { |
- e.preventDefault(); |
- this.showResetProfileDialog_ = true; |
+ /** @private */ |
+ onCancel_: function() { |
+ settings.ResetBrowserProxyImpl.getInstance().onHideResetProfileBanner(); |
}, |
/** @private */ |
- onDialogClose_: function() { |
- this.showResetProfileDialog_ = false; |
+ onResetTap_: function() { |
+ this.$.dialog.close(); |
+ settings.navigateTo(settings.Route.RESET_DIALOG); |
}, |
}); |