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

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

Issue 2844553003: MD-Settings - Update dialog for federated text in passwords dialog. (Closed)
Patch Set: git cl format Created 3 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
« no previous file with comments | « chrome/browser/resources/settings/passwords_and_forms_page/password_edit_dialog.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cb9aa3f7adb226c36dcc9f991ed4b860989e284c..94f958b57091cfa4dfe56efd881b823f6cea3935 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
@@ -37,12 +37,11 @@ Polymer({
/**
* Gets the password input's type. Should be 'text' when password is visible
- * and 'password' when it's not.
- * @param {string} password
+ * or when there's federated text otherwise 'password'.
* @private
*/
- getPasswordInputType_: function(password) {
- return password ? 'text' : 'password';
+ getPasswordInputType_: function() {
+ return this.password || this.item.federationText ? 'text' : 'password';
},
/**
@@ -58,15 +57,16 @@ Polymer({
/**
* 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
- * @param {string} password
+ * cannot be shown, in which case it will be spaces. It can also be the
+ * federated text.
* @private
*/
- getPassword_: function(item, password) {
- if (password)
- return password;
- return item ? ' '.repeat(item.numCharactersInPassword) : '';
+ getPassword_: function() {
+ if (!this.item)
+ return '';
+
+ return this.item.federationText || this.password ||
+ ' '.repeat(this.item.numCharactersInPassword);
},
/**
« no previous file with comments | « chrome/browser/resources/settings/passwords_and_forms_page/password_edit_dialog.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698