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

Unified Diff: components/autofill/browser/form_group.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
« no previous file with comments | « components/autofill/browser/form_group.h ('k') | components/autofill/browser/personal_data_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/browser/form_group.cc
===================================================================
--- components/autofill/browser/form_group.cc (revision 192613)
+++ components/autofill/browser/form_group.cc (working copy)
@@ -258,17 +258,18 @@
void FormGroup::FillFormField(const AutofillField& field,
size_t variant,
+ const std::string& app_locale,
FormFieldData* field_data) const {
NOTREACHED();
}
void FormGroup::FillSelectControl(AutofillFieldType type,
+ const std::string& app_locale,
FormFieldData* field) const {
DCHECK(field);
DCHECK_EQ("select-one", field->form_control_type);
DCHECK_EQ(field->option_values.size(), field->option_contents.size());
- const std::string app_locale = AutofillCountry::ApplicationLocale();
string16 field_text = GetInfo(type, app_locale);
string16 field_text_lower = StringToLowerASCII(field_text);
if (field_text.empty())
@@ -299,20 +300,21 @@
if (type == ADDRESS_HOME_STATE || type == ADDRESS_BILLING_STATE) {
FillStateSelectControl(field_text, field);
} else if (type == ADDRESS_HOME_COUNTRY || type == ADDRESS_BILLING_COUNTRY) {
- FillCountrySelectControl(field);
+ FillCountrySelectControl(app_locale, field);
} else if (type == CREDIT_CARD_EXP_MONTH) {
FillExpirationMonthSelectControl(field_text, field);
} else if (type == CREDIT_CARD_EXP_4_DIGIT_YEAR) {
// Attempt to fill the year as a 2-digit year. This compensates for the
// fact that our heuristics do not always correctly detect when a website
// requests a 2-digit rather than a 4-digit year.
- FillSelectControl(CREDIT_CARD_EXP_2_DIGIT_YEAR, field);
+ FillSelectControl(CREDIT_CARD_EXP_2_DIGIT_YEAR, app_locale, field);
} else if (type == CREDIT_CARD_TYPE) {
FillCreditCardTypeSelectControl(field_text, field);
}
}
-bool FormGroup::FillCountrySelectControl(FormFieldData* field_data) const {
+bool FormGroup::FillCountrySelectControl(const std::string& app_locale,
+ FormFieldData* field_data) const {
return false;
}
« no previous file with comments | « components/autofill/browser/form_group.h ('k') | components/autofill/browser/personal_data_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698