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

Side by Side Diff: chrome/browser/autofill/phone_field.h

Issue 12260054: [Autofill] Enable heuristic detection of credit card issuer fields. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/autofill/name_field_unittest.cc ('k') | chrome/browser/autofill/phone_field.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_AUTOFILL_PHONE_FIELD_H_ 5 #ifndef CHROME_BROWSER_AUTOFILL_PHONE_FIELD_H_
6 #define CHROME_BROWSER_AUTOFILL_PHONE_FIELD_H_ 6 #define CHROME_BROWSER_AUTOFILL_PHONE_FIELD_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "chrome/browser/autofill/autofill_type.h" 11 #include "chrome/browser/autofill/autofill_type.h"
12 #include "chrome/browser/autofill/form_field.h" 12 #include "chrome/browser/autofill/form_field.h"
13 #include "chrome/browser/autofill/phone_number.h" 13 #include "chrome/browser/autofill/phone_number.h"
14 14
15 class AutofillField; 15 class AutofillField;
16 class AutofillScanner; 16 class AutofillScanner;
17 17
18 // A phone number in one of the following formats: 18 // A phone number in one of the following formats:
19 // - area code, prefix, suffix 19 // - area code, prefix, suffix
20 // - area code, number 20 // - area code, number
21 // - number 21 // - number
22 class PhoneField : public FormField { 22 class PhoneField : public FormField {
23 public: 23 public:
24 virtual ~PhoneField(); 24 virtual ~PhoneField();
25 25
26 static FormField* Parse(AutofillScanner* scanner, bool parse_new_field_types); 26 static FormField* Parse(AutofillScanner* scanner);
27 27
28 protected: 28 protected:
29 // FormField: 29 // FormField:
30 virtual bool ClassifyField(FieldTypeMap* map) const OVERRIDE; 30 virtual bool ClassifyField(FieldTypeMap* map) const OVERRIDE;
31 31
32 private: 32 private:
33 FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, ParseOneLinePhone); 33 FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, ParseOneLinePhone);
34 FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, ParseTwoLinePhone); 34 FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, ParseTwoLinePhone);
35 FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, ThreePartPhoneNumber); 35 FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, ThreePartPhoneNumber);
36 FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, ThreePartPhoneNumberPrefixSuffix); 36 FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, ThreePartPhoneNumberPrefixSuffix);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 static string16 GetRegExp(RegexType regex_id); 80 static string16 GetRegExp(RegexType regex_id);
81 81
82 // FIELD_PHONE is always present; holds suffix if prefix is present. 82 // FIELD_PHONE is always present; holds suffix if prefix is present.
83 // The rest could be NULL. 83 // The rest could be NULL.
84 const AutofillField* parsed_phone_fields_[FIELD_MAX]; 84 const AutofillField* parsed_phone_fields_[FIELD_MAX];
85 85
86 DISALLOW_COPY_AND_ASSIGN(PhoneField); 86 DISALLOW_COPY_AND_ASSIGN(PhoneField);
87 }; 87 };
88 88
89 #endif // CHROME_BROWSER_AUTOFILL_PHONE_FIELD_H_ 89 #endif // CHROME_BROWSER_AUTOFILL_PHONE_FIELD_H_
OLDNEW
« no previous file with comments | « chrome/browser/autofill/name_field_unittest.cc ('k') | chrome/browser/autofill/phone_field.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698