| OLD | NEW |
| 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 #include "components/autofill/browser/name_field.h" | 5 #include "components/autofill/core/browser/name_field.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| 11 #include "components/autofill/browser/autofill_regex_constants.h" | 11 #include "components/autofill/core/browser/autofill_regex_constants.h" |
| 12 #include "components/autofill/browser/autofill_scanner.h" | 12 #include "components/autofill/core/browser/autofill_scanner.h" |
| 13 #include "components/autofill/browser/autofill_type.h" | 13 #include "components/autofill/core/browser/autofill_type.h" |
| 14 #include "ui/base/l10n/l10n_util.h" | 14 #include "ui/base/l10n/l10n_util.h" |
| 15 | 15 |
| 16 namespace autofill { | 16 namespace autofill { |
| 17 namespace { | 17 namespace { |
| 18 | 18 |
| 19 // A form field that can parse a full name field. | 19 // A form field that can parse a full name field. |
| 20 class FullNameField : public NameField { | 20 class FullNameField : public NameField { |
| 21 public: | 21 public: |
| 22 static FullNameField* Parse(AutofillScanner* scanner); | 22 static FullNameField* Parse(AutofillScanner* scanner); |
| 23 | 23 |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 | 208 |
| 209 bool FirstLastNameField::ClassifyField(FieldTypeMap* map) const { | 209 bool FirstLastNameField::ClassifyField(FieldTypeMap* map) const { |
| 210 bool ok = AddClassification(first_name_, NAME_FIRST, map); | 210 bool ok = AddClassification(first_name_, NAME_FIRST, map); |
| 211 ok = ok && AddClassification(last_name_, NAME_LAST, map); | 211 ok = ok && AddClassification(last_name_, NAME_LAST, map); |
| 212 AutofillFieldType type = middle_initial_ ? NAME_MIDDLE_INITIAL : NAME_MIDDLE; | 212 AutofillFieldType type = middle_initial_ ? NAME_MIDDLE_INITIAL : NAME_MIDDLE; |
| 213 ok = ok && AddClassification(middle_name_, type, map); | 213 ok = ok && AddClassification(middle_name_, type, map); |
| 214 return ok; | 214 return ok; |
| 215 } | 215 } |
| 216 | 216 |
| 217 } // namespace autofill | 217 } // namespace autofill |
| OLD | NEW |