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 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
664 label.append(separator); | 664 label.append(separator); |
665 | 665 |
666 label.append(field); | 666 label.append(field); |
667 ++num_fields_used; | 667 ++num_fields_used; |
668 } | 668 } |
669 | 669 |
670 // Flatten the label if need be. | 670 // Flatten the label if need be. |
671 const char16 kNewline[] = { '\n', 0 }; | 671 const char16 kNewline[] = { '\n', 0 }; |
672 const base::string16 newline_separator = | 672 const base::string16 newline_separator = |
673 l10n_util::GetStringUTF16(IDS_AUTOFILL_ADDRESS_LINE_SEPARATOR); | 673 l10n_util::GetStringUTF16(IDS_AUTOFILL_ADDRESS_LINE_SEPARATOR); |
674 ReplaceChars(label, kNewline, newline_separator, &label); | 674 base::ReplaceChars(label, kNewline, newline_separator, &label); |
675 | 675 |
676 return label; | 676 return label; |
677 } | 677 } |
678 | 678 |
679 // static | 679 // static |
680 void AutofillProfile::CreateInferredLabelsHelper( | 680 void AutofillProfile::CreateInferredLabelsHelper( |
681 const std::vector<AutofillProfile*>& profiles, | 681 const std::vector<AutofillProfile*>& profiles, |
682 const std::list<size_t>& indices, | 682 const std::list<size_t>& indices, |
683 const std::vector<ServerFieldType>& fields, | 683 const std::vector<ServerFieldType>& fields, |
684 size_t num_fields_to_include, | 684 size_t num_fields_to_include, |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
823 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_STATE)) | 823 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_STATE)) |
824 << " " | 824 << " " |
825 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_ZIP)) | 825 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_ZIP)) |
826 << " " | 826 << " " |
827 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_COUNTRY)) | 827 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_COUNTRY)) |
828 << " " | 828 << " " |
829 << UTF16ToUTF8(MultiString(profile, PHONE_HOME_WHOLE_NUMBER)); | 829 << UTF16ToUTF8(MultiString(profile, PHONE_HOME_WHOLE_NUMBER)); |
830 } | 830 } |
831 | 831 |
832 } // namespace autofill | 832 } // namespace autofill |
OLD | NEW |