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 905 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
916 default: | 916 default: |
917 values->resize(1); | 917 values->resize(1); |
918 (*values)[0] = GetFormGroupInfo(*this, type, app_locale); | 918 (*values)[0] = GetFormGroupInfo(*this, type, app_locale); |
919 } | 919 } |
920 } | 920 } |
921 | 921 |
922 base::string16 AutofillProfile::ConstructInferredLabel( | 922 base::string16 AutofillProfile::ConstructInferredLabel( |
923 const std::vector<ServerFieldType>& included_fields, | 923 const std::vector<ServerFieldType>& included_fields, |
924 size_t num_fields_to_use, | 924 size_t num_fields_to_use, |
925 const std::string& app_locale) const { | 925 const std::string& app_locale) const { |
| 926 // TODO(estade): use libaddressinput? |
926 base::string16 separator = | 927 base::string16 separator = |
927 l10n_util::GetStringUTF16(IDS_AUTOFILL_ADDRESS_SUMMARY_SEPARATOR); | 928 l10n_util::GetStringUTF16(IDS_AUTOFILL_ADDRESS_SUMMARY_SEPARATOR); |
928 | 929 |
929 AutofillType region_code_type(HTML_TYPE_COUNTRY_CODE, HTML_MODE_NONE); | 930 AutofillType region_code_type(HTML_TYPE_COUNTRY_CODE, HTML_MODE_NONE); |
930 const base::string16& profile_region_code = | 931 const base::string16& profile_region_code = |
931 GetInfo(region_code_type, app_locale); | 932 GetInfo(region_code_type, app_locale); |
932 std::string address_region_code = UTF16ToUTF8(profile_region_code); | 933 std::string address_region_code = UTF16ToUTF8(profile_region_code); |
933 | 934 |
934 // A copy of |this| pruned down to contain only data for the address fields in | 935 // A copy of |this| pruned down to contain only data for the address fields in |
935 // |included_fields|. | 936 // |included_fields|. |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1153 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_SORTING_CODE)) | 1154 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_SORTING_CODE)) |
1154 << " " | 1155 << " " |
1155 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_COUNTRY)) | 1156 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_COUNTRY)) |
1156 << " " | 1157 << " " |
1157 << profile.language_code() | 1158 << profile.language_code() |
1158 << " " | 1159 << " " |
1159 << UTF16ToUTF8(MultiString(profile, PHONE_HOME_WHOLE_NUMBER)); | 1160 << UTF16ToUTF8(MultiString(profile, PHONE_HOME_WHOLE_NUMBER)); |
1160 } | 1161 } |
1161 | 1162 |
1162 } // namespace autofill | 1163 } // namespace autofill |
OLD | NEW |