Chromium Code Reviews| Index: chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc |
| =================================================================== |
| --- chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc (revision 192175) |
| +++ chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc (working copy) |
| @@ -30,7 +30,6 @@ |
| #include "chrome/browser/ui/extensions/shell_window.h" |
| #include "chrome/common/chrome_version_info.h" |
| #include "chrome/common/pref_names.h" |
| -#include "components/autofill/browser/autofill_country.h" |
| #include "components/autofill/browser/autofill_manager.h" |
| #include "components/autofill/browser/autofill_type.h" |
| #include "components/autofill/browser/personal_data_manager.h" |
| @@ -141,10 +140,9 @@ |
| // Uses |group| to fill in the |initial_value| for all inputs in |all_inputs| |
| // (an out-param). |
| void FillInputFromFormGroup(FormGroup* group, DetailInputs* inputs) { |
| - const std::string app_locale = AutofillCountry::ApplicationLocale(); |
| for (size_t j = 0; j < inputs->size(); ++j) { |
| - (*inputs)[j].initial_value = |
| - group->GetInfo((*inputs)[j].type, app_locale); |
| + (*inputs)[j].initial_value = group->GetInfo( |
| + (*inputs)[j].type, g_browser_process->GetApplicationLocale()); |
|
Ilya Sherman
2013/04/04 04:27:38
nit: Please continue to cache this outside of the
jam
2013/04/04 17:58:12
Done.
|
| } |
| } |
| @@ -1655,14 +1653,14 @@ |
| } |
| const std::vector<AutofillProfile*>& profiles = manager->GetProfiles(); |
| - const std::string app_locale = AutofillCountry::ApplicationLocale(); |
| for (size_t i = 0; i < profiles.size(); ++i) { |
| if (!IsCompleteProfile(*profiles[i])) |
| continue; |
| // Add all email addresses. |
| std::vector<string16> values; |
| - profiles[i]->GetMultiInfo(EMAIL_ADDRESS, app_locale, &values); |
| + profiles[i]->GetMultiInfo( |
| + EMAIL_ADDRESS, g_browser_process->GetApplicationLocale(), &values); |
| for (size_t j = 0; j < values.size(); ++j) { |
| if (!values[j].empty()) |
| suggested_email_.AddKeyedItem(profiles[i]->guid(), values[j]); |
| @@ -1695,11 +1693,11 @@ |
| bool AutofillDialogControllerImpl::IsCompleteProfile( |
| const AutofillProfile& profile) { |
| - const std::string app_locale = AutofillCountry::ApplicationLocale(); |
| for (size_t i = 0; i < requested_shipping_fields_.size(); ++i) { |
| AutofillFieldType type = requested_shipping_fields_[i].type; |
| if (type != ADDRESS_HOME_LINE2 && |
| - profile.GetInfo(type, app_locale).empty()) { |
| + profile.GetInfo(type, |
| + g_browser_process->GetApplicationLocale()).empty()) { |
| return false; |
| } |
| } |
| @@ -1772,7 +1770,8 @@ |
| const DetailInputs& inputs = RequestedFieldsForSection(section); |
| for (size_t j = 0; j < inputs.size(); ++j) { |
| if (compare.Run(inputs[j], *field)) { |
| - form_group.FillFormField(*field, variant, field); |
| + form_group.FillFormField( |
| + *field, variant, g_browser_process->GetApplicationLocale(), field); |
| break; |
| } |
| } |