| 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 #include "components/autofill/core/browser/name_field.h" | 5 #include "components/autofill/core/browser/name_field.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | |
| 8 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 11 #include "components/autofill/core/browser/autofill_regex_constants.h" | 10 #include "components/autofill/core/browser/autofill_regex_constants.h" |
| 12 #include "components/autofill/core/browser/autofill_scanner.h" | 11 #include "components/autofill/core/browser/autofill_scanner.h" |
| 13 #include "components/autofill/core/browser/autofill_type.h" | 12 #include "components/autofill/core/browser/autofill_type.h" |
| 14 #include "ui/base/l10n/l10n_util.h" | 13 #include "ui/base/l10n/l10n_util.h" |
| 15 | 14 |
| 16 using base::UTF8ToUTF16; | 15 using base::UTF8ToUTF16; |
| 17 | 16 |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 | 208 |
| 210 bool FirstLastNameField::ClassifyField(ServerFieldTypeMap* map) const { | 209 bool FirstLastNameField::ClassifyField(ServerFieldTypeMap* map) const { |
| 211 bool ok = AddClassification(first_name_, NAME_FIRST, map); | 210 bool ok = AddClassification(first_name_, NAME_FIRST, map); |
| 212 ok = ok && AddClassification(last_name_, NAME_LAST, map); | 211 ok = ok && AddClassification(last_name_, NAME_LAST, map); |
| 213 ServerFieldType type = middle_initial_ ? NAME_MIDDLE_INITIAL : NAME_MIDDLE; | 212 ServerFieldType type = middle_initial_ ? NAME_MIDDLE_INITIAL : NAME_MIDDLE; |
| 214 ok = ok && AddClassification(middle_name_, type, map); | 213 ok = ok && AddClassification(middle_name_, type, map); |
| 215 return ok; | 214 return ok; |
| 216 } | 215 } |
| 217 | 216 |
| 218 } // namespace autofill | 217 } // namespace autofill |
| OLD | NEW |