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

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

Issue 1314903003: Updating of all entries in PasswordManager of the same credentials on password update (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bot fix Created 5 years, 3 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/login_database.cc
diff --git a/components/password_manager/core/browser/login_database.cc b/components/password_manager/core/browser/login_database.cc
index 62194a5482c57a70b9e023460e77db7041bdaf7e..788b4f4a0e3c958cbc918bd808ff6be40b95455c 100644
--- a/components/password_manager/core/browser/login_database.cc
+++ b/components/password_manager/core/browser/login_database.cc
@@ -936,9 +936,9 @@ PasswordStoreChangeList LoginDatabase::UpdateLogin(const PasswordForm& form) {
}
bool LoginDatabase::RemoveLogin(const PasswordForm& form) {
- if (form.IsPublicSuffixMatch()) {
- // Do not try to remove |form|. It is a modified copy of a password stored
- // for a different origin, and it is not contained in the database.
+ if (form.is_public_suffix_match) {
+ // TODO(dvadym): Discuss whether we should allow to remove PSL matched
+ // credentials.
return false;
}
// Remove a login by UNIQUE-constrained fields.
@@ -1227,16 +1227,7 @@ bool LoginDatabase::StatementToForms(
}
psl_domain_match_metric = PSL_DOMAIN_MATCH_FOUND;
- // This is not a perfect match, so we need to create a new valid result.
- // We do this by copying over origin, signon realm and action from the
- // observed form and setting the original signon realm to what we found
- // in the database. We use the fact that |original_signon_realm| is
- // non-empty to communicate that this match was found using public
- // suffix matching.
- new_form->original_signon_realm = new_form->signon_realm;
- new_form->origin = psl_match->origin;
- new_form->signon_realm = psl_match->signon_realm;
- new_form->action = psl_match->action;
+ new_form->is_public_suffix_match = true;
}
forms->push_back(new_form.Pass());
}

Powered by Google App Engine
This is Rietveld 408576698