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

Unified Diff: components/autofill/core/common/password_form_fill_data.cc

Issue 1401723002: Show source of affiliated matches in the drop-down password suggestions list. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test fix Created 5 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
Index: components/autofill/core/common/password_form_fill_data.cc
diff --git a/components/autofill/core/common/password_form_fill_data.cc b/components/autofill/core/common/password_form_fill_data.cc
index eb627c0f34d434c6c34fcffff1e244e0420a78dd..148b5c2609d838cf467c853cfc2bd44a22a0ab76 100644
--- a/components/autofill/core/common/password_form_fill_data.cc
+++ b/components/autofill/core/common/password_form_fill_data.cc
@@ -58,7 +58,8 @@ void InitPasswordFormFillData(
result->is_possible_change_password_form =
form_on_page.IsPossibleChangePasswordForm();
- if (preferred_match->is_public_suffix_match || preferred_match->is_affiliated)
+ if (preferred_match->is_public_suffix_match ||
+ preferred_match->is_affiliation_based_match)
result->preferred_realm = preferred_match->signon_realm;
// Copy additional username/value pairs.
@@ -66,7 +67,8 @@ void InitPasswordFormFillData(
if (it.second != preferred_match) {
PasswordAndRealm value;
value.password = it.second->password_value;
- if (it.second->is_public_suffix_match)
+ if (it.second->is_public_suffix_match ||
+ it.second->is_affiliation_based_match)
value.realm = it.second->signon_realm;
result->additional_logins[it.first] = value;
}
@@ -79,7 +81,8 @@ void InitPasswordFormFillData(
UsernamesCollectionKey key;
key.username = it.first;
key.password = it.second->password_value;
- if (it.second->is_public_suffix_match)
+ if (it.second->is_public_suffix_match ||
+ it.second->is_affiliation_based_match)
key.realm = it.second->signon_realm;
result->other_possible_usernames[key] =
it.second->other_possible_usernames;
« no previous file with comments | « components/autofill/core/common/password_form.cc ('k') | components/autofill/core/common/password_form_fill_data_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698