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

Unified Diff: chrome/browser/resources/settings/privacy_page/privacy_page.js

Issue 1921913002: MD Settings; Lazy instantiate Clear Browsing Data dialog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update test. Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
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));
},
});
« no previous file with comments | « chrome/browser/resources/settings/privacy_page/privacy_page.html ('k') | chrome/test/data/webui/settings/privacy_page_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698