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/autofill_profile.h" | 5 #include "components/autofill/core/browser/autofill_profile.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <functional> | 8 #include <functional> |
9 #include <map> | 9 #include <map> |
10 #include <ostream> | 10 #include <ostream> |
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
675 continue; | 675 continue; |
676 | 676 |
677 if (!label.empty()) | 677 if (!label.empty()) |
678 label.append(separator); | 678 label.append(separator); |
679 | 679 |
680 label.append(field); | 680 label.append(field); |
681 ++num_fields_used; | 681 ++num_fields_used; |
682 } | 682 } |
683 | 683 |
684 // Flatten the label if need be. | 684 // Flatten the label if need be. |
685 const char16 kNewline[] = { '\n', 0 }; | 685 const base::char16 kNewline[] = { '\n', 0 }; |
686 const base::string16 newline_separator = | 686 const base::string16 newline_separator = |
687 l10n_util::GetStringUTF16(IDS_AUTOFILL_ADDRESS_LINE_SEPARATOR); | 687 l10n_util::GetStringUTF16(IDS_AUTOFILL_ADDRESS_LINE_SEPARATOR); |
688 base::ReplaceChars(label, kNewline, newline_separator, &label); | 688 base::ReplaceChars(label, kNewline, newline_separator, &label); |
689 | 689 |
690 return label; | 690 return label; |
691 } | 691 } |
692 | 692 |
693 // static | 693 // static |
694 void AutofillProfile::CreateInferredLabelsHelper( | 694 void AutofillProfile::CreateInferredLabelsHelper( |
695 const std::vector<AutofillProfile*>& profiles, | 695 const std::vector<AutofillProfile*>& profiles, |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
841 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_ZIP)) | 841 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_ZIP)) |
842 << " " | 842 << " " |
843 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_SORTING_CODE)) | 843 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_SORTING_CODE)) |
844 << " " | 844 << " " |
845 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_COUNTRY)) | 845 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_COUNTRY)) |
846 << " " | 846 << " " |
847 << UTF16ToUTF8(MultiString(profile, PHONE_HOME_WHOLE_NUMBER)); | 847 << UTF16ToUTF8(MultiString(profile, PHONE_HOME_WHOLE_NUMBER)); |
848 } | 848 } |
849 | 849 |
850 } // namespace autofill | 850 } // namespace autofill |
OLD | NEW |