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

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

Issue 1912483003: Expand the footer in the material design Clear Browsing Data dialog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 8 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 c14e51eaa0ec6e60d5309447303d483f5af237aa..ab1fff32c1f30428cbfdee6fa1dde6e2055a73f1 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
@@ -49,8 +49,12 @@ Polymer({
this.addWebUIListener(
'browsing-history-pref-changed',
this.setAllowDeletingHistory_.bind(this));
+ this.addWebUIListener(
+ 'update-footer',
+ this.updateFooter_.bind(this));
this.browserProxy_ =
settings.ClearBrowsingDataBrowserProxyImpl.getInstance();
+ this.browserProxy_.initialize();
this.$.dialog.open();
},
@@ -67,6 +71,23 @@ Polymer({
}
},
+ /**
+ * Updates the footer to show only those sentences that are relevant to this
+ * user.
+ * @param {boolean} syncing Whether the user is syncing data.
+ * @param {boolean} otherFormsOfBrowsingHistory Whether the user has other
+ * forms of browsing history in their account.
+ * @private
+ */
+ updateFooter_: function(syncing, otherFormsOfBrowsingHistory) {
+ this.$.googleFooter.hidden = !otherFormsOfBrowsingHistory;
+ this.$.syncedDataSentence.hidden = !syncing;
+ },
+
+ open: function() {
+ this.$.dialog.open();
+ },
+
/** @private */
onClearBrowsingDataTap_: function() {
this.clearingInProgress_ = true;

Powered by Google App Engine
This is Rietveld 408576698