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

Unified Diff: components/policy/core/common/schema_registry_tracking_policy_provider_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
« no previous file with comments | « components/policy/core/common/schema_map_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/policy/core/common/schema_registry_tracking_policy_provider_unittest.cc
diff --git a/components/policy/core/common/schema_registry_tracking_policy_provider_unittest.cc b/components/policy/core/common/schema_registry_tracking_policy_provider_unittest.cc
index 061bb6566fb1255a66f92c11242e085525c71ebe..46f503637d409c22630ba5a6c0553f5679abbb1a 100644
--- a/components/policy/core/common/schema_registry_tracking_policy_provider_unittest.cc
+++ b/components/policy/core/common/schema_registry_tracking_policy_provider_unittest.cc
@@ -87,7 +87,7 @@ TEST_F(SchemaRegistryTrackingPolicyProviderTest, PassOnChromePolicy) {
const PolicyNamespace chrome_ns(POLICY_DOMAIN_CHROME, "");
bundle.Get(chrome_ns).Set(
"policy", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD,
- base::WrapUnique(new base::StringValue("visible")), nullptr);
+ base::MakeUnique<base::StringValue>("visible"), nullptr);
EXPECT_CALL(observer_, OnUpdatePolicy(&schema_registry_tracking_provider_));
std::unique_ptr<PolicyBundle> delegate_bundle(new PolicyBundle);
@@ -95,7 +95,7 @@ TEST_F(SchemaRegistryTrackingPolicyProviderTest, PassOnChromePolicy) {
delegate_bundle->Get(PolicyNamespace(POLICY_DOMAIN_EXTENSIONS, "xyz"))
.Set("foo", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
POLICY_SOURCE_CLOUD,
- base::WrapUnique(new base::StringValue("not visible")), nullptr);
+ base::MakeUnique<base::StringValue>("not visible"), nullptr);
mock_provider_.UpdatePolicy(std::move(delegate_bundle));
Mock::VerifyAndClearExpectations(&observer_);
@@ -124,7 +124,7 @@ TEST_F(SchemaRegistryTrackingPolicyProviderTest, SchemaReadyWithComponents) {
PolicyMap policy_map;
policy_map.Set("foo", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
POLICY_SOURCE_CLOUD,
- base::WrapUnique(new base::StringValue("omg")), nullptr);
+ base::MakeUnique<base::StringValue>("omg"), nullptr);
std::unique_ptr<PolicyBundle> bundle(new PolicyBundle);
bundle->Get(PolicyNamespace(POLICY_DOMAIN_CHROME, "")).CopyFrom(policy_map);
bundle->Get(PolicyNamespace(POLICY_DOMAIN_EXTENSIONS, "xyz"))
@@ -173,7 +173,7 @@ TEST_F(SchemaRegistryTrackingPolicyProviderTest, DelegateUpdates) {
PolicyMap policy_map;
policy_map.Set("foo", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
POLICY_SOURCE_CLOUD,
- base::WrapUnique(new base::StringValue("omg")), nullptr);
+ base::MakeUnique<base::StringValue>("omg"), nullptr);
// Chrome policy updates are visible even if the components aren't ready.
EXPECT_CALL(observer_, OnUpdatePolicy(&schema_registry_tracking_provider_));
mock_provider_.UpdateChromePolicy(policy_map);
@@ -214,7 +214,7 @@ TEST_F(SchemaRegistryTrackingPolicyProviderTest, RemoveAndAddComponent) {
PolicyBundle platform_policy;
platform_policy.Get(ns).Set(
"foo", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD,
- base::WrapUnique(new base::StringValue("omg")), nullptr);
+ base::MakeUnique<base::StringValue>("omg"), nullptr);
std::unique_ptr<PolicyBundle> copy(new PolicyBundle);
copy->CopyFrom(platform_policy);
EXPECT_CALL(observer_, OnUpdatePolicy(_));
« no previous file with comments | « components/policy/core/common/schema_map_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698