OLD | NEW |
| (Empty) |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef COMPONENTS_AUTOFILL_BROWSER_FIELD_TYPES_H_ | |
6 #define COMPONENTS_AUTOFILL_BROWSER_FIELD_TYPES_H_ | |
7 | |
8 #include <set> | |
9 #include <string> | |
10 | |
11 namespace autofill { | |
12 | |
13 // NOTE: This list MUST not be modified. The server aggregates and stores these | |
14 // types over several versions, so we must remain fully compatible with the | |
15 // Autofill server, which is itself backward-compatible. The list must be kept | |
16 // up to date with the Autofill server list. | |
17 // | |
18 // This is the list of all valid field types. | |
19 enum AutofillFieldType { | |
20 // Server indication that it has no data for the requested field. | |
21 NO_SERVER_DATA = 0, | |
22 // Client indication that the text entered did not match anything in the | |
23 // personal data. | |
24 UNKNOWN_TYPE = 1, | |
25 // The "empty" type indicates that the user hasn't entered anything | |
26 // in this field. | |
27 EMPTY_TYPE = 2, | |
28 // Personal Information categorization types. | |
29 NAME_FIRST = 3, | |
30 NAME_MIDDLE = 4, | |
31 NAME_LAST = 5, | |
32 NAME_MIDDLE_INITIAL = 6, | |
33 NAME_FULL = 7, | |
34 NAME_SUFFIX = 8, | |
35 EMAIL_ADDRESS = 9, | |
36 PHONE_HOME_NUMBER = 10, | |
37 PHONE_HOME_CITY_CODE = 11, | |
38 PHONE_HOME_COUNTRY_CODE = 12, | |
39 PHONE_HOME_CITY_AND_NUMBER = 13, | |
40 PHONE_HOME_WHOLE_NUMBER = 14, | |
41 | |
42 // Work phone numbers (values [15,19]) are deprecated. | |
43 | |
44 // Fax numbers (values [20,24]) are deprecated in Chrome, but still supported | |
45 // by the server. | |
46 PHONE_FAX_NUMBER = 20, | |
47 PHONE_FAX_CITY_CODE = 21, | |
48 PHONE_FAX_COUNTRY_CODE = 22, | |
49 PHONE_FAX_CITY_AND_NUMBER = 23, | |
50 PHONE_FAX_WHOLE_NUMBER = 24, | |
51 | |
52 // Cell phone numbers (values [25, 29]) are deprecated. | |
53 | |
54 ADDRESS_HOME_LINE1 = 30, | |
55 ADDRESS_HOME_LINE2 = 31, | |
56 ADDRESS_HOME_APT_NUM = 32, | |
57 ADDRESS_HOME_CITY = 33, | |
58 ADDRESS_HOME_STATE = 34, | |
59 ADDRESS_HOME_ZIP = 35, | |
60 ADDRESS_HOME_COUNTRY = 36, | |
61 ADDRESS_BILLING_LINE1 = 37, | |
62 ADDRESS_BILLING_LINE2 = 38, | |
63 ADDRESS_BILLING_APT_NUM = 39, | |
64 ADDRESS_BILLING_CITY = 40, | |
65 ADDRESS_BILLING_STATE = 41, | |
66 ADDRESS_BILLING_ZIP = 42, | |
67 ADDRESS_BILLING_COUNTRY = 43, | |
68 | |
69 // ADDRESS_SHIPPING values [44,50] are deprecated. | |
70 | |
71 CREDIT_CARD_NAME = 51, | |
72 CREDIT_CARD_NUMBER = 52, | |
73 CREDIT_CARD_EXP_MONTH = 53, | |
74 CREDIT_CARD_EXP_2_DIGIT_YEAR = 54, | |
75 CREDIT_CARD_EXP_4_DIGIT_YEAR = 55, | |
76 CREDIT_CARD_EXP_DATE_2_DIGIT_YEAR = 56, | |
77 CREDIT_CARD_EXP_DATE_4_DIGIT_YEAR = 57, | |
78 CREDIT_CARD_TYPE = 58, | |
79 CREDIT_CARD_VERIFICATION_CODE = 59, | |
80 | |
81 COMPANY_NAME = 60, | |
82 | |
83 // Generic type whose default value is known. | |
84 FIELD_WITH_DEFAULT_VALUE = 61, | |
85 | |
86 PHONE_BILLING_NUMBER = 62, | |
87 PHONE_BILLING_CITY_CODE = 63, | |
88 PHONE_BILLING_COUNTRY_CODE = 64, | |
89 PHONE_BILLING_CITY_AND_NUMBER = 65, | |
90 PHONE_BILLING_WHOLE_NUMBER = 66, | |
91 | |
92 // No new types can be added. | |
93 | |
94 MAX_VALID_FIELD_TYPE = 67, | |
95 }; | |
96 | |
97 typedef std::set<AutofillFieldType> FieldTypeSet; | |
98 | |
99 } // namespace autofill | |
100 | |
101 #endif // COMPONENTS_AUTOFILL_BROWSER_FIELD_TYPES_H_ | |
OLD | NEW |