Index: chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_dialog.js |
diff --git a/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_dialog.js b/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_dialog.js |
index a374304bbeccff3459dc4982ebd92d0a460b319e..518f0223df27bdd9d440987f9cfec5e3c6d42768 100644 |
--- a/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_dialog.js |
+++ b/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_dialog.js |
@@ -66,6 +66,9 @@ Polymer({ |
ready: function() { |
this.$.clearFrom.menuOptions = this.clearFromOptions_; |
this.addWebUIListener( |
+ 'browsing-data-removing', |
+ this.isRemoving_.bind(this)); |
+ this.addWebUIListener( |
'browsing-history-pref-changed', |
this.setAllowDeletingHistory_.bind(this)); |
this.addWebUIListener( |
@@ -76,8 +79,17 @@ Polymer({ |
this.updateCounterText_.bind(this)); |
this.browserProxy_ = |
settings.ClearBrowsingDataBrowserProxyImpl.getInstance(); |
- this.browserProxy_.initialize(); |
- this.$.dialog.open(); |
+ this.browserProxy_.initialize().then(function() { |
Dan Beam
2016/07/07 18:06:49
assert(typeof this.clearingInProgress_ == 'boolean
dschuyler
2016/07/20 19:01:14
Done.
|
+ this.$.dialog.open(); |
+ }.bind(this)); |
+ }, |
+ |
+ /** |
+ * @param {boolean} isRemoving Whether removal of data is in progress. |
+ * @private |
+ */ |
+ isRemoving_: function(isRemoving) { |
dpapad
2016/07/07 17:04:20
The naming of this function is not intuitive. isFo
dschuyler
2016/07/20 19:01:14
Done.
|
+ this.clearingInProgress_ = isRemoving; |
}, |
/** |