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

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

Issue 2425243002: CM API: disallow a federated credential to update a password credential. (Closed)
Patch Set: Created 4 years, 2 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 | « components/password_manager/content/browser/credential_manager_impl_unittest.cc ('k') | no next file » | 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 59d9c0a91bb89e33c4be5db936ee225af993359d..919f1713356e03910906a138c9b80744fe276484 100644
--- a/components/password_manager/core/browser/password_form_manager.cc
+++ b/components/password_manager/core/browser/password_form_manager.cc
@@ -1218,6 +1218,8 @@ const PasswordForm* PasswordFormManager::FindBestMatchForUpdatePassword(
const PasswordForm* PasswordFormManager::FindBestSavedMatch(
const PasswordForm* form) const {
+ if (!form->federation_origin.unique())
+ return nullptr;
auto it = best_matches_.find(form->username_value);
if (it != best_matches_.end())
return it->second;
« no previous file with comments | « components/password_manager/content/browser/credential_manager_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698