OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/autofill/name_field.h" | 5 #include "chrome/browser/autofill/name_field.h" |
6 | 6 |
7 #include "base/scoped_ptr.h" | 7 #include "base/scoped_ptr.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/autofill/autofill_type.h" | 10 #include "chrome/browser/autofill/autofill_type.h" |
10 | 11 |
11 NameField* NameField::Parse(std::vector<AutoFillField*>::const_iterator* iter, | 12 NameField* NameField::Parse(std::vector<AutoFillField*>::const_iterator* iter, |
12 bool is_ecml) { | 13 bool is_ecml) { |
13 // Try FirstLastNameField first since it's more specific. | 14 // Try FirstLastNameField first since it's more specific. |
14 NameField* field = FirstLastNameField::Parse(iter, is_ecml); | 15 NameField* field = FirstLastNameField::Parse(iter, is_ecml); |
15 if (field == NULL && !is_ecml) | 16 if (field == NULL && !is_ecml) |
16 field = FullNameField::Parse(iter); | 17 field = FullNameField::Parse(iter); |
17 return field; | 18 return field; |
18 } | 19 } |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 return ok; | 152 return ok; |
152 } | 153 } |
153 | 154 |
154 FirstLastNameField::FirstLastNameField() | 155 FirstLastNameField::FirstLastNameField() |
155 : first_name_(NULL), | 156 : first_name_(NULL), |
156 middle_name_(NULL), | 157 middle_name_(NULL), |
157 last_name_(NULL), | 158 last_name_(NULL), |
158 middle_initial_(false) { | 159 middle_initial_(false) { |
159 } | 160 } |
160 | 161 |
OLD | NEW |