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

Unified Diff: components/password_manager/core/browser/password_form_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_form_manager.cc
diff --git a/components/password_manager/core/browser/password_form_manager.cc b/components/password_manager/core/browser/password_form_manager.cc
index 7cff94c2de0fe9be0b1044f26b221e4054e15f3c..995c78f47bbf65c92bafb8d69c0ce1a8759cf486 100644
--- a/components/password_manager/core/browser/password_form_manager.cc
+++ b/components/password_manager/core/browser/password_form_manager.cc
@@ -512,6 +512,14 @@ void PasswordFormManager::OnRequestDone(
// for |observed_form_|.
driver_->AllowPasswordGenerationForForm(observed_form_);
+ MaybeTriggerAutofill();
+}
+
+void PasswordFormManager::MaybeTriggerAutofill() {
+ DCHECK_EQ(POST_MATCHING_PHASE, state_);
+ if (best_matches_.empty() || manager_action_ == kManagerActionBlacklisted)
+ return;
+
// Proceed to autofill.
// Note that we provide the choices but don't actually prefill a value if:
// (1) we are in Incognito mode, (2) the ACTION paths don't match,

Powered by Google App Engine
This is Rietveld 408576698