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

Unified Diff: components/autofill/core/browser/address_i18n.cc

Issue 1859453002: components/autofill: scoped_ptr -> unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments addressed Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: components/autofill/core/browser/address_i18n.cc
diff --git a/components/autofill/core/browser/address_i18n.cc b/components/autofill/core/browser/address_i18n.cc
index 67be69b4273a332cfec51719c412d2bd10779a5a..a983e2533b35634e09535d0fa4e017061236ed43 100644
--- a/components/autofill/core/browser/address_i18n.cc
+++ b/components/autofill/core/browser/address_i18n.cc
@@ -29,9 +29,9 @@ base::string16 GetInfoHelper(const AutofillProfile& profile,
using ::i18n::addressinput::AddressData;
using ::i18n::addressinput::AddressField;
-scoped_ptr<AddressData> CreateAddressData(
+std::unique_ptr<AddressData> CreateAddressData(
const base::Callback<base::string16(const AutofillType&)>& get_info) {
- scoped_ptr<AddressData> address_data(new AddressData());
+ std::unique_ptr<AddressData> address_data(new AddressData());
address_data->recipient = base::UTF16ToUTF8(
get_info.Run(AutofillType(NAME_FULL)));
address_data->organization = base::UTF16ToUTF8(
@@ -55,10 +55,10 @@ scoped_ptr<AddressData> CreateAddressData(
return address_data;
}
-scoped_ptr< ::i18n::addressinput::AddressData>
- CreateAddressDataFromAutofillProfile(const AutofillProfile& profile,
- const std::string& app_locale) {
- scoped_ptr< ::i18n::addressinput::AddressData> address_data =
+std::unique_ptr<::i18n::addressinput::AddressData>
+CreateAddressDataFromAutofillProfile(const AutofillProfile& profile,
+ const std::string& app_locale) {
+ std::unique_ptr<::i18n::addressinput::AddressData> address_data =
i18n::CreateAddressData(base::Bind(&GetInfoHelper, profile, app_locale));
address_data->language_code = profile.language_code();
return address_data;
« no previous file with comments | « components/autofill/core/browser/address_i18n.h ('k') | components/autofill/core/browser/address_i18n_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698