Chromium Code Reviews| Index: chrome/browser/resources/settings/privacy_page/privacy_page.js |
| diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.js b/chrome/browser/resources/settings/privacy_page/privacy_page.js |
| index f32e85380289ccf8964eb35d0ebbbd633a9f08f8..56a03fc6ca0af47aa298d7f772dc208ef10e90b4 100644 |
| --- a/chrome/browser/resources/settings/privacy_page/privacy_page.js |
| +++ b/chrome/browser/resources/settings/privacy_page/privacy_page.js |
| @@ -38,6 +38,9 @@ Polymer({ |
| type: Object, |
| notify: true, |
| }, |
| + |
| + /** @private */ |
| + showClearBrowsingDataDialog_: Boolean, |
| }, |
| ready: function() { |
| @@ -62,6 +65,13 @@ Polymer({ |
| /** @private */ |
| onClearBrowsingDataTap_: function() { |
| - this.$.pages.querySelector('settings-clear-browsing-data-dialog').open(); |
| + this.showClearBrowsingDataDialog_ = true; |
| + this.async(function() { |
| + var dialog = this.$$('settings-clear-browsing-data-dialog'); |
| + dialog.addEventListener('iron-overlay-closed', function(event) { |
| + if (Polymer.dom(event).rootTarget.tagName == 'SETTINGS-DIALOG') |
| + this.showClearBrowsingDataDialog_ = false; |
|
michaelpg
2016/04/26 00:10:26
instead of this async stuff, would it still work i
dpapad
2016/04/26 00:27:00
Done. It also works and is less verbose, thanks fo
|
| + }.bind(this)); |
| + }.bind(this)); |
| }, |
| }); |