| Index: components/autofill/common/password_form_fill_data.cc
|
| diff --git a/components/autofill/common/password_form_fill_data.cc b/components/autofill/common/password_form_fill_data.cc
|
| index e31823df50d8b4883f39aba03b4c59599f3e9792..76d4111232089ef0609f0dcf82fb171c60a628f9 100644
|
| --- a/components/autofill/common/password_form_fill_data.cc
|
| +++ b/components/autofill/common/password_form_fill_data.cc
|
| @@ -5,6 +5,7 @@
|
| #include "components/autofill/common/password_form_fill_data.h"
|
|
|
| #include "base/logging.h"
|
| +#include "base/utf_string_conversions.h"
|
| #include "components/autofill/common/form_field_data.h"
|
|
|
| namespace autofill {
|
| @@ -50,11 +51,27 @@ void InitPasswordFormFillData(
|
| result->basic_data.fields.push_back(password_field);
|
| result->wait_for_username = wait_for_username_before_autofill;
|
|
|
| + if (preferred_match->is_psl_origin_match) {
|
| + result->preferred_realm =
|
| + ASCIIToUTF16(preferred_match->original_signon_realm);
|
| + } else {
|
| + result->preferred_realm = ASCIIToUTF16(preferred_match->signon_realm);
|
| + }
|
| +
|
| // Copy additional username/value pairs.
|
| content::PasswordFormMap::const_iterator iter;
|
| for (iter = matches.begin(); iter != matches.end(); iter++) {
|
| - if (iter->second != preferred_match)
|
| - result->additional_logins[iter->first] = iter->second->password_value;
|
| + if (iter->second != preferred_match) {
|
| + result->additional_logins_passwords[iter->first] =
|
| + iter->second->password_value;
|
| + if (iter->second->is_psl_origin_match) {
|
| + result->additional_logins_realms[iter->first] =
|
| + ASCIIToUTF16(iter->second->original_signon_realm);
|
| + } else {
|
| + result->additional_logins_realms[iter->first] =
|
| + ASCIIToUTF16(iter->second->signon_realm);
|
| + }
|
| + }
|
| if (enable_other_possible_usernames &&
|
| !iter->second->other_possible_usernames.empty()) {
|
| // Note that there may be overlap between other_possible_usernames and
|
|
|