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

Unified Diff: components/autofill/core/browser/autofill_data_model.cc

Issue 22040002: [Autofill] Add a separate enumeration for HTML field type hints. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add docs Created 7 years, 5 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: components/autofill/core/browser/autofill_data_model.cc
diff --git a/components/autofill/core/browser/autofill_data_model.cc b/components/autofill/core/browser/autofill_data_model.cc
index a68fda7d68719409c8c8481b45100a58c80c3204..e826eb4e1f6621cdfd5c95e2359c2e9f479ad408 100644
--- a/components/autofill/core/browser/autofill_data_model.cc
+++ b/components/autofill/core/browser/autofill_data_model.cc
@@ -158,12 +158,10 @@ void AutofillDataModel::FillSelectControl(const AutofillType& type,
return;
}
- NativeFieldType native_type = type.native_type();
- if (native_type == ADDRESS_HOME_STATE ||
- native_type == ADDRESS_BILLING_STATE) {
+ NativeFieldType native_type = type.GetEquivalentNativeType();
+ if (native_type == ADDRESS_HOME_STATE) {
FillStateSelectControl(field_text, field);
- } else if (native_type == ADDRESS_HOME_COUNTRY ||
- native_type == ADDRESS_BILLING_COUNTRY) {
+ } else if (native_type == ADDRESS_HOME_COUNTRY) {
FillCountrySelectControl(app_locale, field);
} else if (native_type == CREDIT_CARD_EXP_MONTH) {
FillExpirationMonthSelectControl(field_text, field);

Powered by Google App Engine
This is Rietveld 408576698