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

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

Issue 1571813002: Do not prompt and/or create copies when Android logins are filled into websites. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo in comment. Created 4 years, 11 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
« no previous file with comments | « no previous file | components/password_manager/core/browser/password_form_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9ff8533e788f582b3943e37850d76cf3aa8bc8f5..e1fee32d2f5026223f4f6b335123d8e0fe6c17c4 100644
--- a/components/password_manager/core/browser/password_form_manager.cc
+++ b/components/password_manager/core/browser/password_form_manager.cc
@@ -735,6 +735,7 @@ void PasswordFormManager::UpdateLogin() {
password_store->UpdateLoginWithPrimaryKey(pending_credentials_,
old_primary_key);
} else if (observed_form_.new_password_element.empty() &&
+ !IsValidAndroidFacetURI(pending_credentials_.signon_realm) &&
(pending_credentials_.password_element.empty() ||
pending_credentials_.username_element.empty() ||
pending_credentials_.submit_element.empty())) {
@@ -991,8 +992,7 @@ void PasswordFormManager::CreatePendingCredentials() {
pending_credentials_ = *saved_form;
password_overridden_ =
pending_credentials_.password_value != password_to_save;
- if (IsPendingCredentialsPublicSuffixMatch() ||
- IsValidAndroidFacetURI(preferred_match_->signon_realm)) {
+ if (IsPendingCredentialsPublicSuffixMatch()) {
// If the autofilled credentials were a PSL match or credentials stored
// from Android apps store a copy with the current origin and signon
// realm. This ensures that on the next visit, a precise match is found.
@@ -1089,13 +1089,14 @@ void PasswordFormManager::CreatePendingCredentials() {
CreatePendingCredentialsForNewCredentials();
}
- pending_credentials_.action = provisionally_saved_form_->action;
-
- // If the user selected credentials we autofilled from a PasswordForm
- // that contained no action URL (IE6/7 imported passwords, for example),
- // bless it with the action URL from the observed form. See bug 1107719.
- if (pending_credentials_.action.is_empty())
- pending_credentials_.action = observed_form_.action;
+ if (!IsValidAndroidFacetURI(pending_credentials_.signon_realm)) {
+ pending_credentials_.action = provisionally_saved_form_->action;
+ // If the user selected credentials we autofilled from a PasswordForm
+ // that contained no action URL (IE6/7 imported passwords, for example),
+ // bless it with the action URL from the observed form. See bug 1107719.
+ if (pending_credentials_.action.is_empty())
+ pending_credentials_.action = observed_form_.action;
+ }
pending_credentials_.password_value = password_to_save;
pending_credentials_.preferred = provisionally_saved_form_->preferred;
« no previous file with comments | « no previous file | components/password_manager/core/browser/password_form_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698