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

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: Fix the test. 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 381b54fa47a5c5139a48b213d48722df2b386254..301845772cbdae9c96e5da5a641fd61aae873b9e 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,10 +49,20 @@ Polymer({
this.addWebUIListener(
'browsing-history-pref-changed',
this.setAllowDeletingHistory_.bind(this));
+ this.addWebUIListener(
+ 'update-footer',
+ this.updateFooter_.bind(this));
this.browserProxy_ =
settings.ClearBrowsingDataBrowserProxyImpl.getInstance();
},
+ /** @override */
+ attached: function() {
dschuyler 2016/04/26 17:29:49 Can this be started earlier from ready() rather th
msramek 2016/04/27 18:10:29 Done. Yes, thanks for pointing this out!
+ // Initialize the footer. This is done by simply calling updateFooter_,
+ // however, the C++ side must provide arguments.
+ this.browserProxy_.initializeFooter();
+ },
+
/**
* @param {boolean} allowed Whether the user is allowed to delete histories.
* @private
@@ -66,6 +76,19 @@ Polymer({
}
},
+ /**
+ * Updates the footer. Shows 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();
},

Powered by Google App Engine
This is Rietveld 408576698