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

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: Fix browser test Created 7 years, 4 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/core/browser/address.cc ('k') | components/autofill/core/browser/autofill_field.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 28a380e98b5f202afa0cba0eb5b1ff2d7f2b9cf9..2d1edcf221d952e5f44f71cb8563985295ae6aab 100644
--- a/components/autofill/core/browser/autofill_data_model.cc
+++ b/components/autofill/core/browser/autofill_data_model.cc
@@ -158,22 +158,20 @@ void AutofillDataModel::FillSelectControl(const AutofillType& type,
return;
}
- ServerFieldType server_type = type.server_type();
- if (server_type == ADDRESS_HOME_STATE ||
- server_type == ADDRESS_BILLING_STATE) {
+ ServerFieldType storable_type = type.GetStorableType();
+ if (storable_type == ADDRESS_HOME_STATE) {
FillStateSelectControl(field_text, field);
- } else if (server_type == ADDRESS_HOME_COUNTRY ||
- server_type == ADDRESS_BILLING_COUNTRY) {
+ } else if (storable_type == ADDRESS_HOME_COUNTRY) {
FillCountrySelectControl(app_locale, field);
- } else if (server_type == CREDIT_CARD_EXP_MONTH) {
+ } else if (storable_type == CREDIT_CARD_EXP_MONTH) {
FillExpirationMonthSelectControl(field_text, field);
- } else if (server_type == CREDIT_CARD_EXP_4_DIGIT_YEAR) {
+ } else if (storable_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(AutofillType(CREDIT_CARD_EXP_2_DIGIT_YEAR), app_locale,
field);
- } else if (server_type == CREDIT_CARD_TYPE) {
+ } else if (storable_type == CREDIT_CARD_TYPE) {
FillCreditCardTypeSelectControl(field_text, field);
}
}
« no previous file with comments | « components/autofill/core/browser/address.cc ('k') | components/autofill/core/browser/autofill_field.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698