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

Unified Diff: chrome/browser/profiles/incognito_mode_policy_handler_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: chrome/browser/profiles/incognito_mode_policy_handler_unittest.cc
diff --git a/chrome/browser/profiles/incognito_mode_policy_handler_unittest.cc b/chrome/browser/profiles/incognito_mode_policy_handler_unittest.cc
index 366df51e726c78f073b686e6746186bdb5460bb6..1d0356b534593f4b00345d1532b26d1c8df1c737 100644
--- a/chrome/browser/profiles/incognito_mode_policy_handler_unittest.cc
+++ b/chrome/browser/profiles/incognito_mode_policy_handler_unittest.cc
@@ -35,21 +35,17 @@ class IncognitoModePolicyHandlerTest
int availability) {
PolicyMap policy;
if (incognito_enabled != INCOGNITO_ENABLED_UNKNOWN) {
- policy.Set(key::kIncognitoEnabled,
- POLICY_LEVEL_MANDATORY,
- POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD,
- new base::FundamentalValue(incognito_enabled ==
- INCOGNITO_ENABLED_TRUE),
- NULL);
+ policy.Set(key::kIncognitoEnabled, POLICY_LEVEL_MANDATORY,
+ POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD,
+ base::WrapUnique(new base::FundamentalValue(
+ incognito_enabled == INCOGNITO_ENABLED_TRUE)),
+ nullptr);
}
if (availability >= 0) {
- policy.Set(key::kIncognitoModeAvailability,
- POLICY_LEVEL_MANDATORY,
- POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD,
- new base::FundamentalValue(availability),
- NULL);
+ policy.Set(key::kIncognitoModeAvailability, POLICY_LEVEL_MANDATORY,
+ POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD,
+ base::WrapUnique(new base::FundamentalValue(availability)),
+ nullptr);
}
UpdateProviderPolicy(policy);
}

Powered by Google App Engine
This is Rietveld 408576698