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

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

Issue 2812953002: Stop passing raw pointers to base::Value API in c/b/ui (Closed)
Patch Set: Rebased Created 3 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/browser_options_handler.cc
diff --git a/chrome/browser/ui/webui/options/browser_options_handler.cc b/chrome/browser/ui/webui/options/browser_options_handler.cc
index f851526ad327708036afcd63bc278cc078aab21b..c9763227808cc8abd7284e8f202e1c4b1bdd7731 100644
--- a/chrome/browser/ui/webui/options/browser_options_handler.cc
+++ b/chrome/browser/ui/webui/options/browser_options_handler.cc
@@ -166,7 +166,7 @@ void AppendExtensionData(const std::string& key,
std::unique_ptr<base::DictionaryValue> details(new base::DictionaryValue);
details->SetString("id", extension ? extension->id() : std::string());
details->SetString("name", extension ? extension->name() : std::string());
- dict->Set(key, details.release());
+ dict->Set(key, std::move(details));
}
#if !defined(OS_CHROMEOS)
@@ -662,7 +662,7 @@ void BrowserOptionsHandler::GetLocalizedValues(base::DictionaryValue* values) {
values->SetString("username", username);
#endif
// Pass along sync status early so it will be available during page init.
- values->Set("syncData", GetSyncStateDictionary().release());
+ values->Set("syncData", GetSyncStateDictionary());
values->SetString("privacyLearnMoreURL", chrome::kPrivacyLearnMoreURL);
@@ -675,7 +675,7 @@ void BrowserOptionsHandler::GetLocalizedValues(base::DictionaryValue* values) {
#if defined(OS_CHROMEOS)
// TODO(pastarmovj): replace this with a call to the CrosSettings list
// handling functionality to come.
- values->Set("timezoneList", chromeos::system::GetTimezoneList().release());
+ values->Set("timezoneList", chromeos::system::GetTimezoneList());
values->SetString("accessibilityLearnMoreURL",
chrome::kChromeAccessibilityHelpURL);
@@ -705,7 +705,7 @@ void BrowserOptionsHandler::GetLocalizedValues(base::DictionaryValue* values) {
IDS_OPTIONS_SETTINGS_ACCESSIBILITY_SCREEN_MAGNIFIER_PARTIAL));
magnifier_list->Append(std::move(option_partial));
- values->Set("magnifierList", magnifier_list.release());
+ values->Set("magnifierList", std::move(magnifier_list));
values->SetBoolean("enablePolymerPreload", g_enable_polymer_preload);
#endif // defined(OS_CHROMEOS)
@@ -717,7 +717,7 @@ void BrowserOptionsHandler::GetLocalizedValues(base::DictionaryValue* values) {
#endif
if (ShouldShowMultiProfilesUserList())
- values->Set("profilesInfo", GetProfilesInfoList().release());
+ values->Set("profilesInfo", GetProfilesInfoList());
// Profile deletion is not allowed for any users in ChromeOS.
bool allow_deletion = true;

Powered by Google App Engine
This is Rietveld 408576698