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

Side by Side Diff: components/autofill/core/browser/phone_field.h

Issue 853523004: Autofill: Set requirements for number of recognized fields in an autofillable form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More relaxed check for form tag Created 5 years, 11 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
OLDNEW
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
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698