| Index: chrome/browser/ui/passwords/manage_passwords_state.cc
|
| diff --git a/chrome/browser/ui/passwords/manage_passwords_state.cc b/chrome/browser/ui/passwords/manage_passwords_state.cc
|
| index 8f2cfcc39a3d5e986da51557aa3288c0812c005b..d773baf1a2ee860f5dd64cc70cb8f536c34f8a97 100644
|
| --- a/chrome/browser/ui/passwords/manage_passwords_state.cc
|
| +++ b/chrome/browser/ui/passwords/manage_passwords_state.cc
|
| @@ -155,7 +155,13 @@ void ManagePasswordsState::OnPasswordAutofilled(
|
| // TODO(vabr): Revert back to DCHECK once http://crbug.com/486931 is fixed.
|
| CHECK(!password_form_map.empty());
|
| ClearData();
|
| - if (password_form_map.begin()->second->is_public_suffix_match) {
|
| + bool only_PSL_matches =
|
| + find_if(password_form_map.begin(), password_form_map.end(),
|
| + [](const std::pair<const base::string16,
|
| + scoped_ptr<autofill::PasswordForm>>& p) {
|
| + return !p.second->is_public_suffix_match;
|
| + }) == password_form_map.end();
|
| + if (only_PSL_matches) {
|
| // Don't show the UI for PSL matched passwords. They are not stored for this
|
| // page and cannot be deleted.
|
| origin_ = GURL();
|
|
|