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

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

Issue 2900983002: Ignore form action URL when determine if a credential should be autofilled. (Closed)
Patch Set: comments and tests Created 3 years, 7 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
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 529fe5f9471f088d1e0fe68ff495dde7a9e3cc7b..bb14519580f10500a6b9c6967845b43599f2af04 100644
--- a/components/password_manager/core/browser/password_form_manager.cc
+++ b/components/password_manager/core/browser/password_form_manager.cc
@@ -621,19 +621,12 @@ void PasswordFormManager::ProcessFrameInternal(
// 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,
- // (3) if it matched using public suffix domain matching, or
- // (4) the form is change password form.
- // However, 2 and 3 should not apply to Android-based credentials found
- // via affiliation-based matching (we want to autofill them).
- // TODO(engedy): Clean this up. See: https://crbug.com/476519.
- bool wait_for_username =
- client_->IsIncognito() ||
- (!IsValidAndroidFacetURI(preferred_match_->signon_realm) &&
- (observed_form_.action.GetWithEmptyPath() !=
- preferred_match_->action.GetWithEmptyPath() ||
- preferred_match_->is_public_suffix_match ||
- observed_form_.IsPossibleChangePasswordForm()));
+ // (1) we are in Incognito mode, or
+ // (2) if it matched using public suffix domain matching, or
+ // (3) the form is change password form.
+ bool wait_for_username = client_->IsIncognito() ||
+ preferred_match_->is_public_suffix_match ||
+ observed_form_.IsPossibleChangePasswordForm();
if (wait_for_username) {
manager_action_ = kManagerActionNone;
} else {

Powered by Google App Engine
This is Rietveld 408576698