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

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

Issue 2240883002: Make ClearBrowsingDataHandler only observe its own removal task (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 efe2b054179524563fdfd0fa37984ee861925025..f4552bc25521bebd9455e60ca3bd9e4317ef3e88 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
@@ -65,9 +65,6 @@ Polymer({
/** @override */
ready: function() {
this.$.clearFrom.menuOptions = this.clearFromOptions_;
- this.addWebUIListener('browsing-data-removing', function(isRemoving) {
- this.clearingInProgress_ = isRemoving;
- }.bind(this));
this.addWebUIListener(
'browsing-history-pref-changed',
this.setAllowDeletingHistory_.bind(this));
@@ -84,8 +81,8 @@ Polymer({
this.browserProxy_ =
settings.ClearBrowsingDataBrowserProxyImpl.getInstance();
this.browserProxy_.initialize().then(function(isRemoving) {
- this.clearingInProgress_ = isRemoving;
this.$.dialog.showModal();
+ this.clearingInProgress_ = isRemoving;
}.bind(this));
},
@@ -139,12 +136,15 @@ Polymer({
* @private
*/
onClearBrowsingDataTap_: function() {
+ this.clearingInProgress_ = true;
+
this.browserProxy_.clearBrowsingData().then(
/**
* @param {boolean} shouldShowNotice Whether we should show the notice
* about other forms of browsing history before closing the dialog.
*/
function(shouldShowNotice) {
+ this.clearingInProgress_ = false;
this.showHistoryDeletionDialog_ = shouldShowNotice;
if (!shouldShowNotice)

Powered by Google App Engine
This is Rietveld 408576698