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

Unified Diff: components/policy/core/common/cloud/component_cloud_policy_updater_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_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 74f94dcbdbb4c58073aa994c9564b9828689ef6a..4b986ee0929362cdf4120f33f0bebcaf7a79b8be 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
@@ -111,10 +111,10 @@ void ComponentCloudPolicyUpdaterTest::SetUp() {
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);
+ POLICY_SOURCE_CLOUD, base::MakeUnique<base::StringValue>("maybe"),
+ nullptr);
}
void ComponentCloudPolicyUpdaterTest::TearDown() {
@@ -125,7 +125,7 @@ void ComponentCloudPolicyUpdaterTest::TearDown() {
std::unique_ptr<em::PolicyFetchResponse>
ComponentCloudPolicyUpdaterTest::CreateResponse() {
builder_.Build();
- return base::WrapUnique(new em::PolicyFetchResponse(builder_.policy()));
+ return base::MakeUnique<em::PolicyFetchResponse>(builder_.policy());
}
TEST_F(ComponentCloudPolicyUpdaterTest, FetchAndCache) {

Powered by Google App Engine
This is Rietveld 408576698