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

Unified Diff: components/policy/core/common/cloud/component_cloud_policy_store_unittest.cc

Issue 1940153002: Use std::unique_ptr to express ownership of base::Value in PolicyMap::Entry (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: another-fix Created 4 years, 7 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: components/policy/core/common/cloud/component_cloud_policy_store_unittest.cc
diff --git a/components/policy/core/common/cloud/component_cloud_policy_store_unittest.cc b/components/policy/core/common/cloud/component_cloud_policy_store_unittest.cc
index bf07f659305cd9083e407f7ee29beeda63801604..6e6e8c1e1866f0b89a4f2e75c9c2ce28918f39f1 100644
--- a/components/policy/core/common/cloud/component_cloud_policy_store_unittest.cc
+++ b/components/policy/core/common/cloud/component_cloud_policy_store_unittest.cc
@@ -86,18 +86,12 @@ class ComponentCloudPolicyStoreTest : public testing::Test {
PolicyNamespace ns(POLICY_DOMAIN_EXTENSIONS, kTestExtension);
PolicyMap& policy = expected_bundle_.Get(ns);
- policy.Set("Name",
- POLICY_LEVEL_MANDATORY,
- POLICY_SCOPE_USER,
+ policy.Set("Name", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
POLICY_SOURCE_CLOUD,
- new base::StringValue("disabled"),
- NULL);
- policy.Set("Second",
- POLICY_LEVEL_RECOMMENDED,
- POLICY_SCOPE_USER,
+ base::WrapUnique(new base::StringValue("disabled")), nullptr);
+ policy.Set("Second", POLICY_LEVEL_RECOMMENDED, POLICY_SCOPE_USER,
POLICY_SOURCE_CLOUD,
- new base::StringValue("maybe"),
- NULL);
+ base::WrapUnique(new base::StringValue("maybe")), nullptr);
}
// Returns true if the policy exposed by the |store_| is empty.

Powered by Google App Engine
This is Rietveld 408576698