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

Unified Diff: chrome/browser/resources/settings/passwords_and_forms_page/passwords_section.js

Issue 2277963002: Add placeholders when lists are empty for passwords and autofill. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Feedback and Add Tests 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/passwords_and_forms_page/passwords_section.js
diff --git a/chrome/browser/resources/settings/passwords_and_forms_page/passwords_section.js b/chrome/browser/resources/settings/passwords_and_forms_page/passwords_section.js
index 41dead3e9361faf9034482f052e29a45cce8d1f3..721d5eeec69fe5f18c023fd4aae70585edf4ec42 100644
--- a/chrome/browser/resources/settings/passwords_and_forms_page/passwords_section.js
+++ b/chrome/browser/resources/settings/passwords_and_forms_page/passwords_section.js
@@ -189,5 +189,15 @@ Polymer({
closeMenu_: function() {
/** @type {CrSharedMenuElement} */(this.$.menu).closeMenu();
},
+
+ /**
+ * Returns true if the list exists and has items.
+ * @param {Array<Object>} list
+ * @return {boolean}
+ * @private
+ */
+ hasSome_: function(list) {
+ return !!(list && list.length);
+ },
});
})();

Powered by Google App Engine
This is Rietveld 408576698