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

Unified Diff: components/autofill/core/browser/personal_data_manager.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
Index: components/autofill/core/browser/personal_data_manager.cc
diff --git a/components/autofill/core/browser/personal_data_manager.cc b/components/autofill/core/browser/personal_data_manager.cc
index c14723d714af78b36b6809c9c1b009f3915add0e..9ddff255d5d02a45fe313608f00bb692857541bf 100644
--- a/components/autofill/core/browser/personal_data_manager.cc
+++ b/components/autofill/core/browser/personal_data_manager.cc
@@ -259,7 +259,7 @@ bool PersonalDataManager::ImportFormData(
continue;
AutofillType field_type = field->Type();
- ServerFieldType server_field_type = field_type.server_type();
+ ServerFieldType server_field_type = field_type.GetStorableType();
FieldTypeGroup group(field_type.group());
// There can be multiple email fields (e.g. in the case of 'confirm email'
@@ -617,8 +617,7 @@ void PersonalDataManager::GetProfileSuggestions(
// Phone numbers could be split in US forms, so field value could be
// either prefix or suffix of the phone.
bool matched_phones = false;
- if ((type.server_type() == PHONE_HOME_NUMBER ||
- type.server_type() == PHONE_BILLING_NUMBER) &&
+ if (type.GetStorableType() == PHONE_HOME_NUMBER &&
!field_value_lower_case.empty() &&
profile_value_lower_case.find(field_value_lower_case) !=
base::string16::npos) {
@@ -646,7 +645,7 @@ void PersonalDataManager::GetProfileSuggestions(
if (!field_is_autofilled) {
AutofillProfile::CreateInferredLabels(
&matched_profiles, &other_field_types,
- type.server_type(), 1, labels);
+ type.GetStorableType(), 1, labels);
} else {
// No sub-labels for previously filled fields.
labels->resize(values->size());
@@ -678,7 +677,7 @@ void PersonalDataManager::GetCreditCardSuggestions(
credit_card->GetInfo(type, app_locale_);
if (!creditcard_field_value.empty() &&
StartsWith(creditcard_field_value, field_contents, false)) {
- if (type.server_type() == CREDIT_CARD_NUMBER)
+ if (type.GetStorableType() == CREDIT_CARD_NUMBER)
creditcard_field_value = credit_card->ObfuscatedNumber();
base::string16 label;
« no previous file with comments | « components/autofill/core/browser/form_structure_unittest.cc ('k') | components/autofill/core/browser/phone_number.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698