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

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

Issue 7585020: Remove Autofill support for the ECML standard, as it is virtually unused. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove ECML files from the repository Created 9 years, 4 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) 2011 The Chromium Authors. All rights reserved. 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 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 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "chrome/browser/autofill/autofill_type.h" 13 #include "chrome/browser/autofill/autofill_type.h"
14 #include "chrome/browser/autofill/form_field.h" 14 #include "chrome/browser/autofill/form_field.h"
15 #include "chrome/browser/autofill/phone_number.h" 15 #include "chrome/browser/autofill/phone_number.h"
16 16
17 class AutofillField; 17 class AutofillField;
18 class AutofillScanner; 18 class AutofillScanner;
19 19
20 // A phone number in one of the following formats: 20 // A phone number in one of the following formats:
21 // - area code, prefix, suffix 21 // - area code, prefix, suffix
22 // - area code, number 22 // - area code, number
23 // - number 23 // - number
24 class PhoneField : public FormField { 24 class PhoneField : public FormField {
25 public: 25 public:
26 virtual ~PhoneField(); 26 virtual ~PhoneField();
27 27
28 static FormField* Parse(AutofillScanner* scanner, bool is_ecml); 28 static FormField* Parse(AutofillScanner* scanner);
29 static FormField* ParseECML(AutofillScanner* scanner);
30 29
31 protected: 30 protected:
32 // FormField: 31 // FormField:
33 virtual bool ClassifyField(FieldTypeMap* map) const OVERRIDE; 32 virtual bool ClassifyField(FieldTypeMap* map) const OVERRIDE;
34 33
35 private: 34 private:
36 FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, ParseOneLinePhone); 35 FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, ParseOneLinePhone);
37 FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, ParseOneLinePhoneEcml);
38 FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, ParseTwoLinePhone); 36 FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, ParseTwoLinePhone);
39 FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, ParseTwoLinePhoneEcmlShipTo);
40 FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, ParseTwoLinePhoneEcmlBillTo);
41 FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, ThreePartPhoneNumber); 37 FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, ThreePartPhoneNumber);
42 FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, ThreePartPhoneNumberPrefixSuffix); 38 FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, ThreePartPhoneNumberPrefixSuffix);
43 FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, ThreePartPhoneNumberPrefixSuffix2); 39 FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, ThreePartPhoneNumberPrefixSuffix2);
44 FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, ParseOneLineFax); 40 FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, ParseOneLineFax);
45 FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, ParseTwoLineFax); 41 FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, ParseTwoLineFax);
46 FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, ThreePartFaxNumberPrefixSuffix); 42 FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, ThreePartFaxNumberPrefixSuffix);
47 FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, CountryAndCityAndPhoneNumber); 43 FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, CountryAndCityAndPhoneNumber);
48 44
49 PhoneField(); 45 PhoneField();
50 46
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 static struct Parser { 124 static struct Parser {
129 RegexType regex; // Field matching reg-ex. 125 RegexType regex; // Field matching reg-ex.
130 PhonePart phone_part; // Index of the field. 126 PhonePart phone_part; // Index of the field.
131 int max_size; // Max size of the field to match. 0 means any. 127 int max_size; // Max size of the field to match. 0 means any.
132 } phone_field_grammars_[]; 128 } phone_field_grammars_[];
133 129
134 DISALLOW_COPY_AND_ASSIGN(PhoneField); 130 DISALLOW_COPY_AND_ASSIGN(PhoneField);
135 }; 131 };
136 132
137 #endif // CHROME_BROWSER_AUTOFILL_PHONE_FIELD_H_ 133 #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