Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Side by Side Diff: components/autofill/core/browser/autofill_profile.cc

Issue 1001043004: Revamp desktop Autofill settings, round 2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix unittest Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/autofill_options_handler.cc ('k') | components/autofill/core/browser/credit_card.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698