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

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

Issue 2693373002: [MD Settings] Add title to show/hide password button. (Closed)
Patch Set: Created 3 years, 10 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/password_edit_dialog.js
diff --git a/chrome/browser/resources/settings/passwords_and_forms_page/password_edit_dialog.js b/chrome/browser/resources/settings/passwords_and_forms_page/password_edit_dialog.js
index b2b55bb5d5b3d89e2d12164f3a948984c63fe412..c66e29d2eac40732ae07b38635d152fc3235edcd 100644
--- a/chrome/browser/resources/settings/passwords_and_forms_page/password_edit_dialog.js
+++ b/chrome/browser/resources/settings/passwords_and_forms_page/password_edit_dialog.js
@@ -13,6 +13,8 @@
Polymer({
is: 'password-edit-dialog',
+ behaviors: [I18nBehavior],
dschuyler 2017/02/15 20:12:15 With $i18nPolymer this behavior can be removed.
hcarmona 2017/02/15 21:52:11 Done.
+
properties: {
/**
* The password that is being displayed.
@@ -46,6 +48,15 @@ Polymer({
},
/**
+ * Gets the title text for the show/hide icon.
+ * @param {string} password
+ * @private
+ */
+ showPasswordTitle_: function(password) {
+ return password ? this.i18n('hidePassword') : this.i18n('showPassword');
dschuyler 2017/02/15 20:12:15 With $i18nPolymer this could become: showPasswordT
hcarmona 2017/02/15 21:52:11 Sweet. Done.
+ },
+
+ /**
* Gets the text of the password. Will use the value of |password| unless it
* cannot be shown, in which case it will be spaces.
* @param {!chrome.passwordsPrivate.PasswordUiEntry} item

Powered by Google App Engine
This is Rietveld 408576698