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

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

Issue 2118503005: [MD settings] disable clear browsing data while it is running (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: checking after page refresh Created 4 years, 6 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/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.

Powered by Google App Engine
This is Rietveld 408576698