Home | History | Annotate | Download | only in autofill
      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 CHROME_BROWSER_AUTOFILL_FIELD_TYPES_H_
      6 #define CHROME_BROWSER_AUTOFILL_FIELD_TYPES_H_
      7 #pragma once
      8 
      9 #include <set>
     10 
     11 typedef enum _AddressType {
     12   kGenericAddress = 0,
     13   kBillingAddress,
     14   kShippingAddress
     15 } AddressType;
     16 
     17 // NOTE: This list MUST not be modified.  The server aggregates and stores these
     18 // types over several versions, so we must remain fully compatible with the
     19 // Autofill server, which is itself backward-compatible.  The list must be kept
     20 // up to date with the Autofill server list.
     21 //
     22 // This is the list of all valid field types.
     23 typedef enum _FieldType {
     24   // Server indication that it has no data for the requested field.
     25   NO_SERVER_DATA = 0,
     26   // Client indication that the text entered did not match anything in the
     27   // personal data.
     28   UNKNOWN_TYPE = 1,
     29   // The "empty" type indicates that the user hasn't entered anything
     30   // in this field.
     31   EMPTY_TYPE = 2,
     32   // Personal Information categorization types.
     33   NAME_FIRST = 3,
     34   NAME_MIDDLE = 4,
     35   NAME_LAST = 5,
     36   NAME_MIDDLE_INITIAL = 6,
     37   NAME_FULL = 7,
     38   NAME_SUFFIX = 8,
     39   EMAIL_ADDRESS = 9,
     40   PHONE_HOME_NUMBER = 10,
     41   PHONE_HOME_CITY_CODE = 11,
     42   PHONE_HOME_COUNTRY_CODE = 12,
     43   PHONE_HOME_CITY_AND_NUMBER = 13,
     44   PHONE_HOME_WHOLE_NUMBER = 14,
     45 
     46   // Work phone numbers (values [15,19]) are deprecated.
     47 
     48   PHONE_FAX_NUMBER = 20,
     49   PHONE_FAX_CITY_CODE = 21,
     50   PHONE_FAX_COUNTRY_CODE = 22,
     51   PHONE_FAX_CITY_AND_NUMBER = 23,
     52   PHONE_FAX_WHOLE_NUMBER = 24,
     53 
     54   // Cell phone numbers (values [25, 29]) are deprecated.
     55 
     56   ADDRESS_HOME_LINE1 = 30,
     57   ADDRESS_HOME_LINE2 = 31,
     58   ADDRESS_HOME_APT_NUM = 32,
     59   ADDRESS_HOME_CITY = 33,
     60   ADDRESS_HOME_STATE = 34,
     61   ADDRESS_HOME_ZIP = 35,
     62   ADDRESS_HOME_COUNTRY = 36,
     63   ADDRESS_BILLING_LINE1 = 37,
     64   ADDRESS_BILLING_LINE2 = 38,
     65   ADDRESS_BILLING_APT_NUM = 39,
     66   ADDRESS_BILLING_CITY = 40,
     67   ADDRESS_BILLING_STATE = 41,
     68   ADDRESS_BILLING_ZIP = 42,
     69   ADDRESS_BILLING_COUNTRY = 43,
     70 
     71   // ADDRESS_SHIPPING values [44,50] are deprecated.
     72 
     73   CREDIT_CARD_NAME = 51,
     74   CREDIT_CARD_NUMBER = 52,
     75   CREDIT_CARD_EXP_MONTH = 53,
     76   CREDIT_CARD_EXP_2_DIGIT_YEAR = 54,
     77   CREDIT_CARD_EXP_4_DIGIT_YEAR = 55,
     78   CREDIT_CARD_EXP_DATE_2_DIGIT_YEAR = 56,
     79   CREDIT_CARD_EXP_DATE_4_DIGIT_YEAR = 57,
     80   CREDIT_CARD_TYPE = 58,
     81   CREDIT_CARD_VERIFICATION_CODE = 59,
     82 
     83   COMPANY_NAME = 60,
     84 
     85   // No new types can be added.
     86 
     87   MAX_VALID_FIELD_TYPE = 61,
     88 } AutofillFieldType;
     89 
     90 typedef std::set<AutofillFieldType> FieldTypeSet;
     91 
     92 #endif  // CHROME_BROWSER_AUTOFILL_FIELD_TYPES_H_
     93