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

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

Issue 2523593006: Show PSL-matched credentials in the account chooser. (Closed)
Patch Set: Created 4 years, 1 month 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/test_password_store.cc
diff --git a/components/password_manager/core/browser/test_password_store.cc b/components/password_manager/core/browser/test_password_store.cc
index f84d597ffb2064ffbcda7f62c15dec5c5a848c15..570bfbafa8a647b6c39ad58fa946c6ee4a512561 100644
--- a/components/password_manager/core/browser/test_password_store.cc
+++ b/components/password_manager/core/browser/test_password_store.cc
@@ -90,9 +90,14 @@ TestPasswordStore::FillMatchingLogins(const FormDigest& form) {
(form.scheme == autofill::PasswordForm::SCHEME_HTML &&
password_manager::IsFederatedMatch(elements.first, form.origin)) ||
IsPublicSuffixDomainMatch(elements.first, form.signon_realm)) {
- for (const auto& stored_form : elements.second)
+ bool is_psl =
vabr (Chromium) 2016/11/23 18:49:11 optional nit: const bool (Since you did a similar
vasilii 2016/11/24 12:44:10 Done.
+ (elements.first != form.signon_realm &&
vabr (Chromium) 2016/11/23 18:49:11 nit: Would you consider caching the results of the
vabr (Chromium) 2016/11/23 18:49:11 nit: Are the outer parentheses needed?
vasilii 2016/11/24 12:44:10 Done.
vasilii 2016/11/24 12:44:10 Done.
+ IsPublicSuffixDomainMatch(elements.first, form.signon_realm));
+ for (const auto& stored_form : elements.second) {
matched_forms.push_back(
base::MakeUnique<autofill::PasswordForm>(stored_form));
+ matched_forms.back()->is_public_suffix_match = is_psl;
+ }
}
}
return matched_forms;

Powered by Google App Engine
This is Rietveld 408576698