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

Unified Diff: chrome/browser/chromeos/policy/configuration_policy_handler_chromeos.cc

Issue 2392693002: Rewrite simple uses of base::ListValue::Append(base::Value*) on CrOS. (Closed)
Patch Set: MakeUnique Created 4 years, 2 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/chromeos/policy/configuration_policy_handler_chromeos.cc
diff --git a/chrome/browser/chromeos/policy/configuration_policy_handler_chromeos.cc b/chrome/browser/chromeos/policy/configuration_policy_handler_chromeos.cc
index 722ebac55c91c65d7b96a9b6c3a3569a2edad3be..7c9f3bef29bb2d0af72b88c8e05e8b8d1015ad86 100644
--- a/chrome/browser/chromeos/policy/configuration_policy_handler_chromeos.cc
+++ b/chrome/browser/chromeos/policy/configuration_policy_handler_chromeos.cc
@@ -328,9 +328,9 @@ void PinnedLauncherAppsPolicyHandler::ApplyPolicySettings(
entry != policy_list->end(); ++entry) {
std::string id;
if ((*entry)->GetAsString(&id)) {
- base::DictionaryValue* app_dict = new base::DictionaryValue();
+ auto app_dict = base::MakeUnique<base::DictionaryValue>();
app_dict->SetString(ash::launcher::kPinnedAppsPrefAppIDPath, id);
- pinned_apps_list->Append(app_dict);
+ pinned_apps_list->Append(std::move(app_dict));
}
}
prefs->SetValue(pref_path(), std::move(pinned_apps_list));

Powered by Google App Engine
This is Rietveld 408576698