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

Side by Side Diff: components/autofill/core/browser/name_field.cc

Issue 2877473002: Move autofill_regex_constants to core/common. (Closed)
Patch Set: Remove illegal dependency. Created 3 years, 7 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 #include "components/autofill/core/browser/name_field.h" 5 #include "components/autofill/core/browser/name_field.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
11 #include "base/strings/string_util.h" 11 #include "base/strings/string_util.h"
12 #include "base/strings/utf_string_conversions.h" 12 #include "base/strings/utf_string_conversions.h"
13 #include "components/autofill/core/browser/autofill_regex_constants.h"
14 #include "components/autofill/core/browser/autofill_scanner.h" 13 #include "components/autofill/core/browser/autofill_scanner.h"
15 #include "components/autofill/core/browser/autofill_type.h" 14 #include "components/autofill/core/browser/autofill_type.h"
15 #include "components/autofill/core/common/autofill_regex_constants.h"
16 16
17 using base::UTF8ToUTF16; 17 using base::UTF8ToUTF16;
18 18
19 namespace autofill { 19 namespace autofill {
20 namespace { 20 namespace {
21 21
22 // A form field that can parse a full name field. 22 // A form field that can parse a full name field.
23 class FullNameField : public NameField { 23 class FullNameField : public NameField {
24 public: 24 public:
25 static std::unique_ptr<FullNameField> Parse(AutofillScanner* scanner); 25 static std::unique_ptr<FullNameField> Parse(AutofillScanner* scanner);
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 AddClassification(first_name_, NAME_FIRST, kBaseNameParserScore, 212 AddClassification(first_name_, NAME_FIRST, kBaseNameParserScore,
213 field_candidates); 213 field_candidates);
214 AddClassification(last_name_, NAME_LAST, kBaseNameParserScore, 214 AddClassification(last_name_, NAME_LAST, kBaseNameParserScore,
215 field_candidates); 215 field_candidates);
216 const ServerFieldType type = 216 const ServerFieldType type =
217 middle_initial_ ? NAME_MIDDLE_INITIAL : NAME_MIDDLE; 217 middle_initial_ ? NAME_MIDDLE_INITIAL : NAME_MIDDLE;
218 AddClassification(middle_name_, type, kBaseNameParserScore, field_candidates); 218 AddClassification(middle_name_, type, kBaseNameParserScore, field_candidates);
219 } 219 }
220 220
221 } // namespace autofill 221 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/core/browser/email_field.cc ('k') | components/autofill/core/browser/phone_field.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698