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

Unified Diff: chrome/browser/autofill/phone_number.cc

Issue 8169009: Remove FieldTypeSubGroups from the AutofillType class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests compile Created 9 years, 2 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 | « chrome/browser/autofill/form_structure.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/phone_number.cc
diff --git a/chrome/browser/autofill/phone_number.cc b/chrome/browser/autofill/phone_number.cc
index 5303067acec2d8236a01fa0923fbc2ccac1cdd5d..cf0545ca0cf921f5489b74233e01413eabd07b55 100644
--- a/chrome/browser/autofill/phone_number.cc
+++ b/chrome/browser/autofill/phone_number.cc
@@ -23,16 +23,6 @@ const size_t kPhoneNumberLength = 7;
// The number of digits in an area code.
const size_t kPhoneCityCodeLength = 3;
-const AutofillType::FieldTypeSubGroup kAutofillPhoneTypes[] = {
- AutofillType::PHONE_NUMBER,
- AutofillType::PHONE_CITY_CODE,
- AutofillType::PHONE_COUNTRY_CODE,
- AutofillType::PHONE_CITY_AND_NUMBER,
- AutofillType::PHONE_WHOLE_NUMBER,
-};
-
-const int kAutofillPhoneLength = arraysize(kAutofillPhoneTypes);
-
void StripPunctuation(string16* number) {
RemoveChars(*number, kPhoneNumberSeparators, number);
}
@@ -96,9 +86,8 @@ string16 PhoneNumber::GetInfo(AutofillFieldType type) const {
}
void PhoneNumber::SetInfo(AutofillFieldType type, const string16& value) {
- FieldTypeSubGroup subgroup = AutofillType(type).subgroup();
- if (subgroup != AutofillType::PHONE_CITY_AND_NUMBER &&
- subgroup != AutofillType::PHONE_WHOLE_NUMBER) {
+ if (type != PHONE_HOME_CITY_AND_NUMBER &&
+ type != PHONE_HOME_WHOLE_NUMBER) {
// Only full phone numbers should be set directly. The remaining field
// field types are read-only.
return;
« no previous file with comments | « chrome/browser/autofill/form_structure.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698