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

Unified Diff: components/autofill/core/browser/autofill_profile.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/autofill_profile.cc
diff --git a/components/autofill/core/browser/autofill_profile.cc b/components/autofill/core/browser/autofill_profile.cc
index 49176d36568401c68846a5de7f9f09343bea1758..86d3e4c05833df0df077c40ea7b75a70aecb292e 100644
--- a/components/autofill/core/browser/autofill_profile.cc
+++ b/components/autofill/core/browser/autofill_profile.cc
@@ -7,6 +7,7 @@
#include <algorithm>
#include <functional>
#include <map>
+#include <memory>
#include <ostream>
#include <set>
@@ -321,7 +322,7 @@ void AutofillProfile::SetRawInfo(ServerFieldType type,
base::string16 AutofillProfile::GetInfo(const AutofillType& type,
const std::string& app_locale) const {
if (type.html_type() == HTML_TYPE_FULL_ADDRESS) {
- scoped_ptr<AddressData> address_data =
+ std::unique_ptr<AddressData> address_data =
i18n::CreateAddressDataFromAutofillProfile(*this, app_locale);
if (!addressinput::HasAllRequiredFields(*address_data))
return base::string16();
@@ -445,7 +446,7 @@ bool AutofillProfile::IsSubsetOfForFieldSet(
const AutofillProfile& profile,
const std::string& app_locale,
const ServerFieldTypeSet& types) const {
- scoped_ptr<l10n::CaseInsensitiveCompare> compare;
+ std::unique_ptr<l10n::CaseInsensitiveCompare> compare;
for (ServerFieldType type : types) {
base::string16 value = GetRawInfo(type);
@@ -869,7 +870,7 @@ base::string16 AutofillProfile::ConstructInferredLabel(
--num_fields_to_use;
}
- scoped_ptr<AddressData> address_data =
+ std::unique_ptr<AddressData> address_data =
i18n::CreateAddressDataFromAutofillProfile(trimmed_profile, app_locale);
std::string address_line;
::i18n::addressinput::GetFormattedNationalAddressLine(

Powered by Google App Engine
This is Rietveld 408576698