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

Unified Diff: components/policy/core/common/cloud/component_cloud_policy_updater_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_updater_unittest.cc
diff --git a/components/policy/core/common/cloud/component_cloud_policy_updater_unittest.cc b/components/policy/core/common/cloud/component_cloud_policy_updater_unittest.cc
index e60bd860d99788ed5ae20d64b68278f6c2fccd80..fec0372afedc16c1b363884f582963cd505a3c5b 100644
--- a/components/policy/core/common/cloud/component_cloud_policy_updater_unittest.cc
+++ b/components/policy/core/common/cloud/component_cloud_policy_updater_unittest.cc
@@ -109,18 +109,12 @@ void ComponentCloudPolicyUpdaterTest::SetUp() {
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);
}
void ComponentCloudPolicyUpdaterTest::TearDown() {

Powered by Google App Engine
This is Rietveld 408576698