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

Unified Diff: chrome/browser/ui/webui/options/autofill_options_handler.cc

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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: chrome/browser/ui/webui/options/autofill_options_handler.cc
diff --git a/chrome/browser/ui/webui/options/autofill_options_handler.cc b/chrome/browser/ui/webui/options/autofill_options_handler.cc
index 4b512d5e5257215df44024e48df7789d4e48783d..3cbb402984f57f9a5e7d7798babee8480abb13a2 100644
--- a/chrome/browser/ui/webui/options/autofill_options_handler.cc
+++ b/chrome/browser/ui/webui/options/autofill_options_handler.cc
@@ -68,9 +68,9 @@ static const char kCountryField[] = "country";
static const char kComponents[] = "components";
static const char kLanguageCode[] = "languageCode";
-scoped_ptr<base::DictionaryValue> CreditCardToDictionary(
+std::unique_ptr<base::DictionaryValue> CreditCardToDictionary(
const CreditCard& card) {
- scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue);
+ std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue);
value->SetString("guid", card.guid());
std::pair<base::string16, base::string16> label_pieces = card.LabelPieces();
value->SetString("label", label_pieces.first);
@@ -124,7 +124,7 @@ void GetAddressComponents(const std::string& country_code,
address_components->Append(line);
}
- scoped_ptr<base::DictionaryValue> component(new base::DictionaryValue);
+ std::unique_ptr<base::DictionaryValue> component(new base::DictionaryValue);
component->SetString("name", components[i].name);
switch (components[i].field) {
@@ -180,9 +180,9 @@ void SetCountryData(const PersonalDataManager& manager,
countries.front()->country_code());
// An ordered list of options to show in the <select>.
- scoped_ptr<base::ListValue> country_list(new base::ListValue());
+ std::unique_ptr<base::ListValue> country_list(new base::ListValue());
for (size_t i = 0; i < countries.size(); ++i) {
- scoped_ptr<base::DictionaryValue> option_details(
+ std::unique_ptr<base::DictionaryValue> option_details(
new base::DictionaryValue());
option_details->SetString("name", model.GetItemAt(i));
option_details->SetString(
@@ -192,7 +192,8 @@ void SetCountryData(const PersonalDataManager& manager,
}
localized_strings->Set("autofillCountrySelectList", country_list.release());
- scoped_ptr<base::ListValue> default_country_components(new base::ListValue);
+ std::unique_ptr<base::ListValue> default_country_components(
+ new base::ListValue);
std::string default_country_language_code;
GetAddressComponents(countries.front()->country_code(),
g_browser_process->GetApplicationLocale(),
@@ -352,7 +353,7 @@ void AutofillOptionsHandler::LoadAutofillData() {
std::vector<base::string16> label_parts;
base::SplitStringUsingSubstr(labels[i], separator, &label_parts);
- scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue);
+ std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue);
value->SetString("guid", profiles[i]->guid());
value->SetString("label", label_parts[0]);
value->SetString("sublabel", labels[i].substr(label_parts[0].size()));
@@ -419,7 +420,7 @@ void AutofillOptionsHandler::LoadAddressEditorComponents(
}
base::DictionaryValue input;
- scoped_ptr<base::ListValue> components(new base::ListValue);
+ std::unique_ptr<base::ListValue> components(new base::ListValue);
std::string language_code;
GetAddressComponents(country_code, g_browser_process->GetApplicationLocale(),
components.get(), &language_code);
@@ -605,7 +606,7 @@ void AutofillOptionsHandler::AutofillProfileToDictionary(
address->SetString("email", profile.GetRawInfo(autofill::EMAIL_ADDRESS));
address->SetString(kLanguageCode, profile.language_code());
- scoped_ptr<base::ListValue> components(new base::ListValue);
+ std::unique_ptr<base::ListValue> components(new base::ListValue);
GetAddressComponents(
base::UTF16ToUTF8(profile.GetRawInfo(autofill::ADDRESS_HOME_COUNTRY)),
profile.language_code(),
« no previous file with comments | « chrome/browser/ui/webui/omnibox/omnibox_ui_handler.cc ('k') | chrome/browser/ui/webui/options/browser_options_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698