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

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

Issue 2098633002: Migrate the one-time notice into the MD settings CBD dialog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_counters
Patch Set: 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 e5b178c7334dbeba22388b59b7dfd5a8f7b7a5bc..a6a41bf07c5bddc465244c40cc56cb1922f7d14c 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
@@ -51,6 +51,9 @@ Polymer({
/** @private */
clearingInProgress_: Boolean,
+
+ /** @private */
+ showOtherFormsOfBrowsingHistoryNotice_: Boolean,
},
/** @private {!settings.ClearBrowsingDataBrowserProxy} */
@@ -120,12 +123,32 @@ Polymer({
this.$.dialog.open();
},
- /** @private */
+ /**
+ * Handles the tap on the Clear Data button.
+ * @private
+ */
onClearBrowsingDataTap_: function() {
this.clearingInProgress_ = true;
- this.browserProxy_.clearBrowsingData().then(function() {
- this.clearingInProgress_ = false;
- this.$.dialog.close();
- }.bind(this));
+ 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.showOtherFormsOfBrowsingHistoryNotice_ = shouldShowNotice;
+
+ if (!shouldShowNotice)
+ this.$.dialog.close();
+ }.bind(this));
},
+
+ /**
+ * Handles the closing of the notice about other forms of browsing history.
+ * @private
+ */
+ onOtherFormsOfBrowsingHistoryNoticeClose_: function() {
+ this.showOtherFormsOfBrowsingHistoryNotice_ = false;
+ this.$.dialog.close();
+ }
});

Powered by Google App Engine
This is Rietveld 408576698