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/contact_info.h" | 5 #include "chrome/browser/autofill/contact_info.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.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 #include "chrome/browser/autofill/field_types.h" | 11 #include "chrome/browser/autofill/field_types.h" |
11 | 12 |
12 static const string16 kNameSplitChars = ASCIIToUTF16("-'. "); | 13 static const string16 kNameSplitChars = ASCIIToUTF16("-'. "); |
13 | 14 |
14 static const AutoFillFieldType kAutoFillContactInfoTypes[] = { | 15 static const AutoFillFieldType kAutoFillContactInfoTypes[] = { |
15 NAME_FIRST, | 16 NAME_FIRST, |
16 NAME_MIDDLE, | 17 NAME_MIDDLE, |
17 NAME_LAST, | 18 NAME_LAST, |
18 EMAIL_ADDRESS, | 19 EMAIL_ADDRESS, |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 SetLast(full_name_tokens.back()); | 404 SetLast(full_name_tokens.back()); |
404 if (full_name_tokens.size() > 2) { | 405 if (full_name_tokens.size() > 2) { |
405 full_name_tokens.erase(full_name_tokens.begin()); | 406 full_name_tokens.erase(full_name_tokens.begin()); |
406 full_name_tokens.pop_back(); | 407 full_name_tokens.pop_back(); |
407 SetMiddle(JoinString(full_name_tokens, ' ')); | 408 SetMiddle(JoinString(full_name_tokens, ' ')); |
408 } | 409 } |
409 } | 410 } |
410 } | 411 } |
411 } | 412 } |
412 | 413 |
OLD | NEW |