| Index: chrome/browser/ui/autofill/data_model_wrapper.cc
|
| diff --git a/chrome/browser/ui/autofill/data_model_wrapper.cc b/chrome/browser/ui/autofill/data_model_wrapper.cc
|
| index 9baf8310de01be0de7acacd9d36e31bb245eb314..4c0930e34e30c807d759dbc3ca014c72248fb5ff 100644
|
| --- a/chrome/browser/ui/autofill/data_model_wrapper.cc
|
| +++ b/chrome/browser/ui/autofill/data_model_wrapper.cc
|
| @@ -59,6 +59,7 @@ bool DataModelWrapper::GetDisplayText(
|
| i18ninput::CreateAddressData(
|
| base::Bind(&DataModelWrapper::GetInfo, base::Unretained(this)),
|
| &address_data);
|
| + address_data.language_code = GetLanguageCode();
|
| std::vector<std::string> lines;
|
| address_data.FormatForDisplay(&lines);
|
|
|
| @@ -72,8 +73,7 @@ bool DataModelWrapper::GetDisplayText(
|
|
|
| // The separator is locale-specific.
|
| std::string compact_separator =
|
| - ::i18n::addressinput::GetCompactAddressLinesSeparator(
|
| - g_browser_process->GetApplicationLocale());
|
| + ::i18n::addressinput::GetCompactAddressLinesSeparator(GetLanguageCode());
|
| *vertically_compact =
|
| base::UTF8ToUTF16(JoinString(lines, compact_separator)) +
|
| non_address_info;
|
| @@ -83,6 +83,10 @@ bool DataModelWrapper::GetDisplayText(
|
| return true;
|
| }
|
|
|
| +const std::string& DataModelWrapper::GetLanguageCode() const {
|
| + return g_browser_process->GetApplicationLocale();
|
| +}
|
| +
|
| bool DataModelWrapper::FillFormStructure(
|
| const std::vector<ServerFieldType>& types,
|
| const FormStructure::InputFieldComparator& compare,
|
| @@ -150,6 +154,10 @@ base::string16 AutofillProfileWrapper::GetInfoForDisplay(
|
| return DataModelWrapper::GetInfoForDisplay(type);
|
| }
|
|
|
| +const std::string& AutofillProfileWrapper::GetLanguageCode() const {
|
| + return profile_->language_code();
|
| +}
|
| +
|
| size_t AutofillProfileWrapper::GetVariantForType(const AutofillType& type)
|
| const {
|
| if (type.group() == variant_group_)
|
| @@ -363,4 +371,8 @@ base::string16 I18nAddressDataWrapper::GetInfo(const AutofillType& type) const {
|
| return base::UTF8ToUTF16(address_->GetFieldValue(field));
|
| }
|
|
|
| +const std::string& I18nAddressDataWrapper::GetLanguageCode() const {
|
| + return address_->language_code;
|
| +}
|
| +
|
| } // namespace autofill
|
|
|