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 b094d5983c685e4c116ee19ba15728a88f21cd38..54dd748c66f5784c2f29e6b07f0d00737838b6f8 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 |
@@ -50,7 +50,10 @@ Polymer({ |
}, |
/** @private */ |
- clearingInProgress_: Boolean, |
+ clearingInProgress_: { |
+ type: Boolean, |
+ value: true, /* Default to true to avoid potential race condition. */ |
+ }, |
/** @private */ |
showHistoryDeletionDialog_: { |
@@ -69,6 +72,9 @@ Polymer({ |
'browsing-history-pref-changed', |
this.setAllowDeletingHistory_.bind(this)); |
this.addWebUIListener( |
+ 'clearing-browsing-data', |
+ this.setClearingInProgress_.bind(this)); |
+ this.addWebUIListener( |
'update-footer', |
this.updateFooter_.bind(this)); |
this.addWebUIListener( |
@@ -94,6 +100,14 @@ Polymer({ |
}, |
/** |
+ * @param {boolean} inProgress Whether clearing browsing data is in progress. |
+ * @private |
+ */ |
+ setClearingInProgress_: function(inProgress) { |
+ this.clearingInProgress_ = inProgress; |
+ }, |
+ |
+ /** |
* Updates the footer to show only those sentences that are relevant to this |
* user. |
* @param {boolean} syncing Whether the user is syncing data. |