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

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

Issue 2392693002: Rewrite simple uses of base::ListValue::Append(base::Value*) on CrOS. (Closed)
Patch Set: headers 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_unittest.cc
diff --git a/chrome/browser/chromeos/policy/configuration_policy_handler_chromeos_unittest.cc b/chrome/browser/chromeos/policy/configuration_policy_handler_chromeos_unittest.cc
index a9e26b157772a4d295ab850b4c27dbc2ece4a0ef..fe62f0c6b1551daa0b7484bc1fc06948f07cbc59 100644
--- a/chrome/browser/chromeos/policy/configuration_policy_handler_chromeos_unittest.cc
+++ b/chrome/browser/chromeos/policy/configuration_policy_handler_chromeos_unittest.cc
@@ -318,9 +318,10 @@ TEST(PinnedLauncherAppsPolicyHandler, PrefTranslation) {
EXPECT_TRUE(base::Value::Equals(&expected_pinned_apps, value));
base::StringValue entry1("abcdefghijklmnopabcdefghijklmnop");
- base::DictionaryValue* entry1_dict = new base::DictionaryValue();
+ std::unique_ptr<base::DictionaryValue> entry1_dict(
+ new base::DictionaryValue());
entry1_dict->Set(ash::launcher::kPinnedAppsPrefAppIDPath, entry1.DeepCopy());
- expected_pinned_apps.Append(entry1_dict);
+ expected_pinned_apps.Append(std::move(entry1_dict));
list.Append(entry1.DeepCopy());
policy_map.Set(key::kPinnedLauncherApps, POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD, list.CreateDeepCopy(),

Powered by Google App Engine
This is Rietveld 408576698