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

Unified Diff: components/policy/core/common/policy_loader_win_unittest.cc

Issue 2911033002: Remove raw base::DictionaryValue::Set (Closed)
Patch Set: Proper Windows Fix Created 3 years, 6 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
« no previous file with comments | « components/policy/core/common/mac_util.cc ('k') | components/policy/core/common/registry_dict_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/policy/core/common/policy_loader_win_unittest.cc
diff --git a/components/policy/core/common/policy_loader_win_unittest.cc b/components/policy/core/common/policy_loader_win_unittest.cc
index 3efc8c71a0994851a098f8fb6930dc196f2374b6..e973049d040336ca102c970a4cc8714120ee134f 100644
--- a/components/policy/core/common/policy_loader_win_unittest.cc
+++ b/components/policy/core/common/policy_loader_win_unittest.cc
@@ -809,10 +809,10 @@ class PolicyLoaderWinTest : public PolicyTestBase,
expected_policy.SetBoolean(test_keys::kKeyBoolean, true);
expected_policy.SetString(test_keys::kKeyString, "GPO");
expected_policy.SetInteger(test_keys::kKeyInteger, 42);
- std::unique_ptr<base::ListValue> list(new base::ListValue());
+ auto list = base::MakeUnique<base::ListValue>();
list->AppendString("GPO 1");
list->AppendString("GPO 2");
- expected_policy.Set(test_keys::kKeyStringList, list.release());
+ expected_policy.Set(test_keys::kKeyStringList, std::move(list));
PolicyBundle expected;
expected.Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string()))
.LoadFrom(&expected_policy, POLICY_LEVEL_MANDATORY,
« no previous file with comments | « components/policy/core/common/mac_util.cc ('k') | components/policy/core/common/registry_dict_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698