diff options
author | dubroy@chromium.org <dubroy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-16 10:47:12 +0000 |
---|---|---|
committer | dubroy@chromium.org <dubroy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-16 10:47:12 +0000 |
commit | ef13073f30f880d02cf2382ecb73868e8651abc3 (patch) | |
tree | b3b7f77ecfdd413e89113257b52cad98beaa3230 | |
parent | 6a423c7b2aa5a50dfb055dfd188c68b8a1f11a48 (diff) | |
download | chromium_src-ef13073f30f880d02cf2382ecb73868e8651abc3.zip chromium_src-ef13073f30f880d02cf2382ecb73868e8651abc3.tar.gz chromium_src-ef13073f30f880d02cf2382ecb73868e8651abc3.tar.bz2 |
Password Manager: Make placeholder value the same length as the real password.
In the password manager, the number of dots in each password box should
reflect the actual number of characters in the password. This fixes a
regression introduced by http://crrev.com/226215.
BUG=305139
TEST=Open chrome://settings/passwords, and verify that for any saved password,
the number of dots shown in the password box is the same length as the actual
password.
R=markusheintz@chromium.org
Review URL: https://codereview.chromium.org/26434005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228893 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/ui/webui/options/password_manager_handler.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/chrome/browser/ui/webui/options/password_manager_handler.cc b/chrome/browser/ui/webui/options/password_manager_handler.cc index 1073d1d..d1ef29a 100644 --- a/chrome/browser/ui/webui/options/password_manager_handler.cc +++ b/chrome/browser/ui/webui/options/password_manager_handler.cc @@ -185,8 +185,13 @@ void PasswordManagerHandler::SetPasswordList() { entry->Append(new StringValue(net::FormatUrl(password_list_[i]->origin, languages_))); entry->Append(new StringValue(password_list_[i]->username_value)); - entry->Append(new StringValue( - show_passwords ? password_list_[i]->password_value : placeholder)); + if (show_passwords) { + entry->Append(new StringValue(password_list_[i]->password_value)); + } else { + // Use a placeholder value with the same length as the password. + entry->Append(new StringValue( + string16(password_list_[i]->password_value.length(), ' '))); + } entries.Append(entry); } |