Chromium Code Reviews| Index: components/autofill/core/browser/personal_data_manager.cc |
| diff --git a/components/autofill/core/browser/personal_data_manager.cc b/components/autofill/core/browser/personal_data_manager.cc |
| index 740ee19f2ca73bc03b6dc6d30af851ea53102d20..f3c207b60d20ff26afe1ad5b2a94127105755147 100644 |
| --- a/components/autofill/core/browser/personal_data_manager.cc |
| +++ b/components/autofill/core/browser/personal_data_manager.cc |
| @@ -1918,6 +1918,14 @@ std::string PersonalDataManager::MergeServerAddressesIntoProfiles( |
| // Set the profile as being local. |
| existing_profiles->back().set_record_type(AutofillProfile::LOCAL_PROFILE); |
| existing_profiles->back().set_modification_date(AutofillClock::Now()); |
| + |
| + // Wallet addresses don't have an email address, use the one from the |
| + // currently signed-in account. |
| + std::string account_id = signin_manager_->GetAuthenticatedAccountId(); |
| + base::string16 email = |
| + base::UTF8ToUTF16(account_tracker_->GetAccountInfo(account_id).email); |
|
Mathieu
2017/02/03 15:27:22
this is sometimes empty. Let's add
if (!email.em
sebsg
2017/02/03 15:39:51
Done.
|
| + existing_profiles->back().SetRawInfo(EMAIL_ADDRESS, email); |
| + |
| AutofillMetrics::LogWalletAddressConversionType( |
| AutofillMetrics::CONVERTED_ADDRESS_ADDED); |
| } |