OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 COMPONENTS_AUTOFILL_CORE_BROWSER_PHONE_FIELD_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_PHONE_FIELD_H_ |
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_PHONE_FIELD_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_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" |
(...skipping 13 matching lines...) Expand all Loading... |
24 // - number | 24 // - number |
25 class PhoneField : public FormField { | 25 class PhoneField : public FormField { |
26 public: | 26 public: |
27 ~PhoneField() override; | 27 ~PhoneField() override; |
28 | 28 |
29 static scoped_ptr<FormField> Parse(AutofillScanner* scanner); | 29 static scoped_ptr<FormField> Parse(AutofillScanner* scanner); |
30 | 30 |
31 protected: | 31 protected: |
32 // FormField: | 32 // FormField: |
33 bool ClassifyField(ServerFieldTypeMap* map) const override; | 33 bool ClassifyField(ServerFieldTypeMap* map) const override; |
| 34 size_t FieldCount() const override; |
34 | 35 |
35 private: | 36 private: |
36 FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, ParseOneLinePhone); | 37 FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, ParseOneLinePhone); |
37 FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, ParseTwoLinePhone); | 38 FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, ParseTwoLinePhone); |
38 FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, ThreePartPhoneNumber); | 39 FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, ThreePartPhoneNumber); |
39 FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, ThreePartPhoneNumberPrefixSuffix); | 40 FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, ThreePartPhoneNumberPrefixSuffix); |
40 FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, ThreePartPhoneNumberPrefixSuffix2); | 41 FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, ThreePartPhoneNumberPrefixSuffix2); |
41 FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, CountryAndCityAndPhoneNumber); | 42 FRIEND_TEST_ALL_PREFIXES(PhoneFieldTest, CountryAndCityAndPhoneNumber); |
42 | 43 |
43 // This is for easy description of the possible parsing paths of the phone | 44 // This is for easy description of the possible parsing paths of the phone |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 // FIELD_PHONE is always present; holds suffix if prefix is present. | 86 // FIELD_PHONE is always present; holds suffix if prefix is present. |
86 // The rest could be NULL. | 87 // The rest could be NULL. |
87 AutofillField* parsed_phone_fields_[FIELD_MAX]; | 88 AutofillField* parsed_phone_fields_[FIELD_MAX]; |
88 | 89 |
89 DISALLOW_COPY_AND_ASSIGN(PhoneField); | 90 DISALLOW_COPY_AND_ASSIGN(PhoneField); |
90 }; | 91 }; |
91 | 92 |
92 } // namespace autofill | 93 } // namespace autofill |
93 | 94 |
94 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_PHONE_FIELD_H_ | 95 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_PHONE_FIELD_H_ |
OLD | NEW |