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

Unified Diff: components/password_manager/core/browser/password_manager.cc

Issue 773823002: PasswordManager should trigger autofill for new forms + old PasswordFromManagers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't duplicate the blacklist & generation IPC Created 6 years 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: components/password_manager/core/browser/password_manager.cc
diff --git a/components/password_manager/core/browser/password_manager.cc b/components/password_manager/core/browser/password_manager.cc
index 7c16d6e328106f6ee7a9dd6b706ac18a709139ac..579cf098b05cbd85bb3bfc59b7eef3f93fa9606c 100644
--- a/components/password_manager/core/browser/password_manager.cc
+++ b/components/password_manager/core/browser/password_manager.cc
@@ -426,12 +426,15 @@ void PasswordManager::CreatePendingLoginManagers(
if (EndsWith(iter->signon_realm, kSpdyProxyRealm, true))
continue;
bool old_manager_found = false;
- for (std::vector<PasswordFormManager*>::const_iterator old_manager =
- old_login_managers.begin();
- !old_manager_found && old_manager != old_login_managers.end();
- ++old_manager) {
- old_manager_found = (*old_manager)->DoesManage(*iter) ==
- PasswordFormManager::RESULT_COMPLETE_MATCH;
+ for (const auto& old_manager : old_login_managers) {
+ if (old_manager->DoesManage(*iter) !=
+ PasswordFormManager::RESULT_COMPLETE_MATCH) {
+ continue;
+ }
+ old_manager_found = true;
+ if (old_manager->HasCompletedMatching())
+ old_manager->MaybeTriggerAutofill();
+ break;
}
if (old_manager_found)
continue; // The current form is already managed.

Powered by Google App Engine
This is Rietveld 408576698