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

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

Issue 2609703002: Remove ScopedVector from autofill. (Closed)
Patch Set: drop the using Created 3 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_FORM_FIELD_H_ 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_FORM_FIELD_H_
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_FORM_FIELD_H_ 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_FORM_FIELD_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 12 matching lines...) Expand all
23 // interface can identify themselves as a particular type of form field, e.g. 23 // interface can identify themselves as a particular type of form field, e.g.
24 // name, phone number, or address field. 24 // name, phone number, or address field.
25 class FormField { 25 class FormField {
26 public: 26 public:
27 virtual ~FormField() {} 27 virtual ~FormField() {}
28 28
29 // Classifies each field in |fields| with its heuristically detected type. 29 // Classifies each field in |fields| with its heuristically detected type.
30 // Each field has a derived unique name that is used as the key into the 30 // Each field has a derived unique name that is used as the key into the
31 // returned FieldCandidatesMap. 31 // returned FieldCandidatesMap.
32 static FieldCandidatesMap ParseFormFields( 32 static FieldCandidatesMap ParseFormFields(
33 const std::vector<AutofillField*>& fields, 33 const std::vector<std::unique_ptr<AutofillField>>& fields,
34 bool is_form_tag); 34 bool is_form_tag);
35 35
36 protected: 36 protected:
37 // A bit-field used for matching specific parts of a field in question. 37 // A bit-field used for matching specific parts of a field in question.
38 enum MatchType { 38 enum MatchType {
39 // Attributes. 39 // Attributes.
40 MATCH_LABEL = 1 << 0, 40 MATCH_LABEL = 1 << 0,
41 MATCH_NAME = 1 << 1, 41 MATCH_NAME = 1 << 1,
42 42
43 // Input types. 43 // Input types.
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 static void ParseFormFieldsPass(ParseFunction parse, 135 static void ParseFormFieldsPass(ParseFunction parse,
136 const std::vector<AutofillField*>& fields, 136 const std::vector<AutofillField*>& fields,
137 FieldCandidatesMap* field_candidates); 137 FieldCandidatesMap* field_candidates);
138 138
139 DISALLOW_COPY_AND_ASSIGN(FormField); 139 DISALLOW_COPY_AND_ASSIGN(FormField);
140 }; 140 };
141 141
142 } // namespace autofill 142 } // namespace autofill
143 143
144 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_FORM_FIELD_H_ 144 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_FORM_FIELD_H_
OLDNEW
« no previous file with comments | « components/autofill/core/browser/credit_card_field_unittest.cc ('k') | components/autofill/core/browser/form_field.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698