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

Unified Diff: chrome/browser/policy/profile_policy_connector_unittest.cc

Issue 2334613003: Re-write many calls to WrapUnique() with MakeUnique() (Closed)
Patch Set: Changes from review by sky 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: chrome/browser/policy/profile_policy_connector_unittest.cc
diff --git a/chrome/browser/policy/profile_policy_connector_unittest.cc b/chrome/browser/policy/profile_policy_connector_unittest.cc
index 19de3c9fe0eed42cb124d327e654e44bf4083b83..b030dcef5c51177bd727f5588705edc10739559a 100644
--- a/chrome/browser/policy/profile_policy_connector_unittest.cc
+++ b/chrome/browser/policy/profile_policy_connector_unittest.cc
@@ -99,7 +99,7 @@ TEST_F(ProfilePolicyConnectorTest, IsPolicyFromCloudPolicy) {
// Set the policy at the cloud provider.
cloud_policy_store_.policy_map_.Set(
key::kAutoFillEnabled, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD, base::WrapUnique(new base::FundamentalValue(false)),
+ POLICY_SOURCE_CLOUD, base::MakeUnique<base::FundamentalValue>(false),
nullptr);
cloud_policy_store_.NotifyStoreLoaded();
base::RunLoop().RunUntilIdle();
@@ -113,8 +113,8 @@ TEST_F(ProfilePolicyConnectorTest, IsPolicyFromCloudPolicy) {
// Now test with a higher-priority provider also setting the policy.
PolicyMap map;
map.Set(key::kAutoFillEnabled, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD,
- base::WrapUnique(new base::FundamentalValue(true)), nullptr);
+ POLICY_SOURCE_CLOUD, base::MakeUnique<base::FundamentalValue>(true),
+ nullptr);
mock_provider_.UpdateChromePolicy(map);
EXPECT_FALSE(connector.IsPolicyFromCloudPolicy(key::kAutoFillEnabled));
value = connector.policy_service()->GetPolicies(chrome_ns).GetValue(
« no previous file with comments | « chrome/browser/policy/policy_startup_browsertest.cc ('k') | chrome/browser/prefs/chrome_pref_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698