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

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

Issue 2252353002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 3 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 f0ca6518de42eb6eef5d4d97dad3d0f3b83ffae7..460814887eb9f5fb61b7c442bbff91056f0a4686 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
@@ -88,10 +88,10 @@ class ComponentCloudPolicyStoreTest : public testing::Test {
PolicyMap& policy = expected_bundle_.Get(ns);
policy.Set("Name", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
POLICY_SOURCE_CLOUD,
- base::WrapUnique(new base::StringValue("disabled")), nullptr);
+ base::MakeUnique<base::StringValue>("disabled"), nullptr);
policy.Set("Second", POLICY_LEVEL_RECOMMENDED, POLICY_SCOPE_USER,
POLICY_SOURCE_CLOUD,
- base::WrapUnique(new base::StringValue("maybe")), nullptr);
+ base::MakeUnique<base::StringValue>("maybe"), nullptr);
}
// Returns true if the policy exposed by the |store_| is empty.
@@ -101,7 +101,7 @@ class ComponentCloudPolicyStoreTest : public testing::Test {
std::unique_ptr<em::PolicyFetchResponse> CreateResponse() {
builder_.Build();
- return base::WrapUnique(new em::PolicyFetchResponse(builder_.policy()));
+ return base::MakeUnique<em::PolicyFetchResponse>(builder_.policy());
}
std::string CreateSerializedResponse() {

Powered by Google App Engine
This is Rietveld 408576698