1eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch// Copyright 2013 The Chromium Authors. All rights reserved. 25821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 35821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// found in the LICENSE file. 45821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 5eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch#ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_FIELD_TYPES_H_ 6eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch#define COMPONENTS_AUTOFILL_CORE_BROWSER_FIELD_TYPES_H_ 75821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 82385ea399aae016c0806a4f9ef3c9cfe3d2a39dfBen Murdoch#include <map> 95821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include <set> 102385ea399aae016c0806a4f9ef3c9cfe3d2a39dfBen Murdoch 112385ea399aae016c0806a4f9ef3c9cfe3d2a39dfBen Murdoch#include "base/strings/string16.h" 125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 13c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)namespace autofill { 14c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) 158bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles)// NOTE: This list MUST not be modified except to keep it synchronized with the 168bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles)// Autofill server's version. The server aggregates and stores these types over 178bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles)// several versions, so we must remain fully compatible with the Autofill 188bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles)// server, which is itself backward-compatible. The list must be kept up to 198bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles)// date with the Autofill server list. 205821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// 213240926e260ce088908e02ac07a6cf7b0c0cbf44Ben Murdoch// The list of all field types natively understood by the Autofill server. A 223240926e260ce088908e02ac07a6cf7b0c0cbf44Ben Murdoch// subset of these types is used to store Autofill data in the user's profile. 233240926e260ce088908e02ac07a6cf7b0c0cbf44Ben Murdochenum ServerFieldType { 245821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Server indication that it has no data for the requested field. 255821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) NO_SERVER_DATA = 0, 265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Client indication that the text entered did not match anything in the 275821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // personal data. 285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) UNKNOWN_TYPE = 1, 295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // The "empty" type indicates that the user hasn't entered anything 305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // in this field. 315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) EMPTY_TYPE = 2, 325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Personal Information categorization types. 335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) NAME_FIRST = 3, 345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) NAME_MIDDLE = 4, 355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) NAME_LAST = 5, 365821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) NAME_MIDDLE_INITIAL = 6, 375821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) NAME_FULL = 7, 385821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) NAME_SUFFIX = 8, 395821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) EMAIL_ADDRESS = 9, 405821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) PHONE_HOME_NUMBER = 10, 415821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) PHONE_HOME_CITY_CODE = 11, 425821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) PHONE_HOME_COUNTRY_CODE = 12, 435821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) PHONE_HOME_CITY_AND_NUMBER = 13, 445821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) PHONE_HOME_WHOLE_NUMBER = 14, 455821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 465821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Work phone numbers (values [15,19]) are deprecated. 475821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 485821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Fax numbers (values [20,24]) are deprecated in Chrome, but still supported 495821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // by the server. 505821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) PHONE_FAX_NUMBER = 20, 515821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) PHONE_FAX_CITY_CODE = 21, 525821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) PHONE_FAX_COUNTRY_CODE = 22, 535821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) PHONE_FAX_CITY_AND_NUMBER = 23, 545821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) PHONE_FAX_WHOLE_NUMBER = 24, 555821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 565821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Cell phone numbers (values [25, 29]) are deprecated. 575821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 585821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) ADDRESS_HOME_LINE1 = 30, 595821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) ADDRESS_HOME_LINE2 = 31, 605821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) ADDRESS_HOME_APT_NUM = 32, 615821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) ADDRESS_HOME_CITY = 33, 625821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) ADDRESS_HOME_STATE = 34, 635821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) ADDRESS_HOME_ZIP = 35, 645821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) ADDRESS_HOME_COUNTRY = 36, 655821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) ADDRESS_BILLING_LINE1 = 37, 665821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) ADDRESS_BILLING_LINE2 = 38, 675821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) ADDRESS_BILLING_APT_NUM = 39, 685821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) ADDRESS_BILLING_CITY = 40, 695821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) ADDRESS_BILLING_STATE = 41, 705821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) ADDRESS_BILLING_ZIP = 42, 715821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) ADDRESS_BILLING_COUNTRY = 43, 725821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 735821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // ADDRESS_SHIPPING values [44,50] are deprecated. 745821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 755821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) CREDIT_CARD_NAME = 51, 765821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) CREDIT_CARD_NUMBER = 52, 775821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) CREDIT_CARD_EXP_MONTH = 53, 785821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) CREDIT_CARD_EXP_2_DIGIT_YEAR = 54, 795821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) CREDIT_CARD_EXP_4_DIGIT_YEAR = 55, 805821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) CREDIT_CARD_EXP_DATE_2_DIGIT_YEAR = 56, 815821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) CREDIT_CARD_EXP_DATE_4_DIGIT_YEAR = 57, 825821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) CREDIT_CARD_TYPE = 58, 835821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) CREDIT_CARD_VERIFICATION_CODE = 59, 845821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 855821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) COMPANY_NAME = 60, 865821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 872a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) // Generic type whose default value is known. 882a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) FIELD_WITH_DEFAULT_VALUE = 61, 892a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles) 90868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) PHONE_BILLING_NUMBER = 62, 91868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) PHONE_BILLING_CITY_CODE = 63, 92868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) PHONE_BILLING_COUNTRY_CODE = 64, 93868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) PHONE_BILLING_CITY_AND_NUMBER = 65, 94868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) PHONE_BILLING_WHOLE_NUMBER = 66, 95868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) 96a36e5920737c6adbddd3e43b760e5de8431db6e0Torne (Richard Coles) NAME_BILLING_FIRST = 67, 97a36e5920737c6adbddd3e43b760e5de8431db6e0Torne (Richard Coles) NAME_BILLING_MIDDLE = 68, 98a36e5920737c6adbddd3e43b760e5de8431db6e0Torne (Richard Coles) NAME_BILLING_LAST = 69, 99a36e5920737c6adbddd3e43b760e5de8431db6e0Torne (Richard Coles) NAME_BILLING_MIDDLE_INITIAL = 70, 100a36e5920737c6adbddd3e43b760e5de8431db6e0Torne (Richard Coles) NAME_BILLING_FULL = 71, 101a36e5920737c6adbddd3e43b760e5de8431db6e0Torne (Richard Coles) NAME_BILLING_SUFFIX = 72, 1025821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 10358537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles) // Field types for options generally found in merchant buyflows. Given that 10458537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles) // these are likely to be filled out differently on a case by case basis, 1055d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // they are here primarily for use by Autocheckout. 10658537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles) MERCHANT_EMAIL_SIGNUP = 73, 10758537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles) MERCHANT_PROMO_CODE = 74, 10858537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles) 10958537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles) // Field types for the password fields. PASSWORD is the default type for all 11058537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles) // password fields. ACCOUNT_CREATION_PASSWORD is the first password field in 11158537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles) // an account creation form and will trigger password generation. 11258537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles) PASSWORD = 75, 11358537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles) ACCOUNT_CREATION_PASSWORD = 76, 11458537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles) 1158bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) // Includes all of the lines of a street address, including newlines, e.g. 1168bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) // 123 Main Street, 1178bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) // Apt. #42 1188bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) ADDRESS_HOME_STREET_ADDRESS = 77, 1198bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) ADDRESS_BILLING_STREET_ADDRESS = 78, 1208bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) 1218bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) // A sorting code is similar to a postal code. However, whereas a postal code 1228bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) // normally refers to a single geographical location, a sorting code often 1238bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) // does not. Instead, a sorting code is assigned to an organization, which 1248bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) // might be geographically distributed. The most prominent example of a 1258bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) // sorting code system is CEDEX in France. 1268bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) ADDRESS_HOME_SORTING_CODE = 79, 1278bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) ADDRESS_BILLING_SORTING_CODE = 80, 1288bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) 1298bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) // A dependent locality is a subunit of a locality, where a "locality" is 1308bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) // roughly equivalent to a city. Examples of dependent localities include 1318bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) // inner-city districts and suburbs. 1328bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) ADDRESS_HOME_DEPENDENT_LOCALITY = 81, 1338bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) ADDRESS_BILLING_DEPENDENT_LOCALITY = 82, 1348bcbed890bc3ce4d7a057a8f32cab53fa534672eTorne (Richard Coles) 135f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) // The third line of the street address. 136f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) ADDRESS_HOME_LINE3 = 83, 137f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) ADDRESS_BILLING_LINE3 = 84, 138f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) 139a36e5920737c6adbddd3e43b760e5de8431db6e0Torne (Richard Coles) // No new types can be added without a corresponding change to the Autofill 140a36e5920737c6adbddd3e43b760e5de8431db6e0Torne (Richard Coles) // server. 141a36e5920737c6adbddd3e43b760e5de8431db6e0Torne (Richard Coles) 142f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) MAX_VALID_FIELD_TYPE = 85, 1435821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)}; 1445821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 145bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch// The list of all HTML autocomplete field type hints supported by Chrome. 146bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch// See [ http://is.gd/whatwg_autocomplete ] for the full list of specced hints. 147bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdochenum HtmlFieldType { 148bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch // Default type. 149bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch HTML_TYPE_UNKNOWN, 150bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch 151bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch // Name types. 152bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch HTML_TYPE_NAME, 153bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch HTML_TYPE_GIVEN_NAME, 154bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch HTML_TYPE_ADDITIONAL_NAME, 155bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch HTML_TYPE_FAMILY_NAME, 156bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch 157bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch // Business types. 158bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch HTML_TYPE_ORGANIZATION, 159bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch 160bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch // Address types. 161ba5b9a6411cb1792fd21f0a078d7a25cd1ceec16Ben Murdoch HTML_TYPE_STREET_ADDRESS, 162bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch HTML_TYPE_ADDRESS_LINE1, 163bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch HTML_TYPE_ADDRESS_LINE2, 164f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) HTML_TYPE_ADDRESS_LINE3, 165f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) HTML_TYPE_ADDRESS_LEVEL1, // For U.S. addresses, corresponds to the state. 166f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) HTML_TYPE_ADDRESS_LEVEL2, // For U.S. addresses, corresponds to the city. 167f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) HTML_TYPE_ADDRESS_LEVEL3, // An area that is more specific than LEVEL2. 168f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) HTML_TYPE_COUNTRY_CODE, // The ISO 3166-1-alpha-2 country code. 169f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) HTML_TYPE_COUNTRY_NAME, // The localized country name. 170bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch HTML_TYPE_POSTAL_CODE, 171f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) HTML_TYPE_FULL_ADDRESS, // The complete address, formatted for display. 172bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch 173bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch // Credit card types. 174bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch HTML_TYPE_CREDIT_CARD_NAME, 175bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch HTML_TYPE_CREDIT_CARD_NUMBER, 176bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch HTML_TYPE_CREDIT_CARD_EXP, 177bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch HTML_TYPE_CREDIT_CARD_EXP_MONTH, 178bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch HTML_TYPE_CREDIT_CARD_EXP_YEAR, 179bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch HTML_TYPE_CREDIT_CARD_VERIFICATION_CODE, 180bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch HTML_TYPE_CREDIT_CARD_TYPE, 181bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch 182bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch // Phone number types. 183bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch HTML_TYPE_TEL, 184bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch HTML_TYPE_TEL_COUNTRY_CODE, 185bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch HTML_TYPE_TEL_NATIONAL, 186bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch HTML_TYPE_TEL_AREA_CODE, 187bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch HTML_TYPE_TEL_LOCAL, 188bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch HTML_TYPE_TEL_LOCAL_PREFIX, 189bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch HTML_TYPE_TEL_LOCAL_SUFFIX, 190bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch 191bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch // Email. 192bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch HTML_TYPE_EMAIL, 193bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch 194116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch // Transaction details. 195116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch HTML_TYPE_TRANSACTION_AMOUNT, 196116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch HTML_TYPE_TRANSACTION_CURRENCY, 197116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch 198bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch // Variants of type hints specified in the HTML specification that are 199bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch // inferred based on a field's 'maxlength' attribute. 200bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch // TODO(isherman): Remove these types, in favor of understanding maxlength 201bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch // when filling fields. See also: AutofillField::phone_part_. 202bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch HTML_TYPE_ADDITIONAL_NAME_INITIAL, 203bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch HTML_TYPE_CREDIT_CARD_EXP_DATE_2_DIGIT_YEAR, 204bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch HTML_TYPE_CREDIT_CARD_EXP_DATE_4_DIGIT_YEAR, 205bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch HTML_TYPE_CREDIT_CARD_EXP_2_DIGIT_YEAR, 206bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch HTML_TYPE_CREDIT_CARD_EXP_4_DIGIT_YEAR, 207bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch}; 208bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch 209bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch// The list of all HTML autocomplete field mode hints supported by Chrome. 210bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch// See [ http://is.gd/whatwg_autocomplete ] for the full list of specced hints. 211bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdochenum HtmlFieldMode { 212bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch HTML_MODE_NONE, 213bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch HTML_MODE_BILLING, 214bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch HTML_MODE_SHIPPING, 215bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch}; 216bb1529ce867d8845a77ec7cdf3e3003ef1771a40Ben Murdoch 2172385ea399aae016c0806a4f9ef3c9cfe3d2a39dfBen Murdochenum FieldTypeGroup { 2182385ea399aae016c0806a4f9ef3c9cfe3d2a39dfBen Murdoch NO_GROUP, 2192385ea399aae016c0806a4f9ef3c9cfe3d2a39dfBen Murdoch NAME, 2202385ea399aae016c0806a4f9ef3c9cfe3d2a39dfBen Murdoch NAME_BILLING, 2212385ea399aae016c0806a4f9ef3c9cfe3d2a39dfBen Murdoch EMAIL, 2222385ea399aae016c0806a4f9ef3c9cfe3d2a39dfBen Murdoch COMPANY, 2232385ea399aae016c0806a4f9ef3c9cfe3d2a39dfBen Murdoch ADDRESS_HOME, 2242385ea399aae016c0806a4f9ef3c9cfe3d2a39dfBen Murdoch ADDRESS_BILLING, 2252385ea399aae016c0806a4f9ef3c9cfe3d2a39dfBen Murdoch PHONE_HOME, 2262385ea399aae016c0806a4f9ef3c9cfe3d2a39dfBen Murdoch PHONE_BILLING, 2272385ea399aae016c0806a4f9ef3c9cfe3d2a39dfBen Murdoch CREDIT_CARD, 22858537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles) PASSWORD_FIELD, 229116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch TRANSACTION, 2302385ea399aae016c0806a4f9ef3c9cfe3d2a39dfBen Murdoch}; 2312385ea399aae016c0806a4f9ef3c9cfe3d2a39dfBen Murdoch 2323240926e260ce088908e02ac07a6cf7b0c0cbf44Ben Murdochtypedef std::set<ServerFieldType> ServerFieldTypeSet; 2333240926e260ce088908e02ac07a6cf7b0c0cbf44Ben Murdochtypedef std::map<base::string16, ServerFieldType> ServerFieldTypeMap; 2345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 235c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)} // namespace autofill 236c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles) 237eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch#endif // COMPONENTS_AUTOFILL_CORE_BROWSER_FIELD_TYPES_H_ 238