Chromium Code Reviews| Index: components/autofill/core/browser/autofill_profile.cc |
| diff --git a/components/autofill/core/browser/autofill_profile.cc b/components/autofill/core/browser/autofill_profile.cc |
| index 0f69602a9265b7a33035cbcbb7552847a1b150ad..ad53437d90684cb8f5eff179532a718519d6011f 100644 |
| --- a/components/autofill/core/browser/autofill_profile.cc |
| +++ b/components/autofill/core/browser/autofill_profile.cc |
| @@ -431,9 +431,16 @@ bool AutofillProfile::operator!=(const AutofillProfile& profile) const { |
| return !operator==(profile); |
| } |
| -const base::string16 AutofillProfile::PrimaryValue() const { |
| - return GetRawInfo(NAME_FIRST) + GetRawInfo(NAME_LAST) + |
| - GetRawInfo(ADDRESS_HOME_LINE1) + GetRawInfo(ADDRESS_HOME_CITY); |
| +const base::string16 AutofillProfile::PrimaryValue( |
| + const std::string& app_locale) const { |
| + std::vector<base::string16> primary_values{ |
| + CanonicalizeProfileString(GetInfo(AutofillType(NAME_FIRST), app_locale)), |
| + CanonicalizeProfileString(GetInfo(AutofillType(NAME_LAST), app_locale)), |
| + CanonicalizeProfileString( |
| + GetInfo(AutofillType(ADDRESS_HOME_LINE1), app_locale)), |
| + CanonicalizeProfileString( |
| + GetInfo(AutofillType(ADDRESS_HOME_CITY), app_locale))}; |
| + return base::JoinString(primary_values, base::UTF8ToUTF16(" ")); |
|
Roger McFarlane (Chromium)
2016/06/13 15:12:52
Do the join first and canonicalize after.
i.e.:
sebsg
2016/06/13 17:57:59
Done.
|
| } |
| bool AutofillProfile::IsSubsetOf(const AutofillProfile& profile, |