Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1945)

Unified Diff: chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc

Issue 13488009: Remove application locale cache in autofill code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc
===================================================================
--- chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc (revision 192613)
+++ 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();
+ const std::string app_locale = g_browser_process->GetApplicationLocale();
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, app_locale);
}
}
@@ -1659,7 +1657,7 @@
}
const std::vector<AutofillProfile*>& profiles = manager->GetProfiles();
- const std::string app_locale = AutofillCountry::ApplicationLocale();
+ const std::string app_locale = g_browser_process->GetApplicationLocale();
for (size_t i = 0; i < profiles.size(); ++i) {
if (!IsCompleteProfile(*profiles[i]))
continue;
@@ -1702,7 +1700,7 @@
bool AutofillDialogControllerImpl::IsCompleteProfile(
const AutofillProfile& profile) {
- const std::string app_locale = AutofillCountry::ApplicationLocale();
+ const std::string app_locale = g_browser_process->GetApplicationLocale();
for (size_t i = 0; i < requested_shipping_fields_.size(); ++i) {
AutofillFieldType type = requested_shipping_fields_[i].type;
if (type != ADDRESS_HOME_LINE2 &&
@@ -1773,13 +1771,14 @@
size_t variant,
DialogSection section,
const InputFieldComparator& compare) {
+ std::string app_locale = g_browser_process->GetApplicationLocale();
for (size_t i = 0; i < form_structure_.field_count(); ++i) {
AutofillField* field = form_structure_.field(i);
// Only fill in data that is associated with this section.
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, app_locale, field);
break;
}
}

Powered by Google App Engine
This is Rietveld 408576698