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

Unified Diff: components/policy/core/common/policy_loader_mac.mm

Issue 1902633006: Convert //components/policy from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments and use namespace alias Created 4 years, 8 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/policy_loader_mac.mm
diff --git a/components/policy/core/common/policy_loader_mac.mm b/components/policy/core/common/policy_loader_mac.mm
index 0a2be3e9f7fa7426870220f32e11d2ac3f3c449d..195bcf36c76f3bc62375ef7a32629bb53113276b 100644
--- a/components/policy/core/common/policy_loader_mac.mm
+++ b/components/policy/core/common/policy_loader_mac.mm
@@ -60,9 +60,9 @@ void PolicyLoaderMac::InitOnBackgroundThread() {
}
}
-scoped_ptr<PolicyBundle> PolicyLoaderMac::Load() {
+std::unique_ptr<PolicyBundle> PolicyLoaderMac::Load() {
preferences_->AppSynchronize(application_id_);
- scoped_ptr<PolicyBundle> bundle(new PolicyBundle());
+ std::unique_ptr<PolicyBundle> bundle(new PolicyBundle());
// Load Chrome's policy.
PolicyMap& chrome_policy =
@@ -85,7 +85,7 @@ scoped_ptr<PolicyBundle> PolicyLoaderMac::Load() {
PolicyLevel level =
forced ? POLICY_LEVEL_MANDATORY : POLICY_LEVEL_RECOMMENDED;
// TODO(joaodasilva): figure the policy scope.
- scoped_ptr<base::Value> policy = PropertyToValue(value);
+ std::unique_ptr<base::Value> policy = PropertyToValue(value);
if (policy) {
chrome_policy.Set(it.key(), level, POLICY_SCOPE_USER,
POLICY_SOURCE_PLATFORM, policy.release(), nullptr);
@@ -179,7 +179,7 @@ void PolicyLoaderMac::LoadPolicyForComponent(
bool forced = preferences_->AppValueIsForced(pref_name, bundle_id);
PolicyLevel level =
forced ? POLICY_LEVEL_MANDATORY : POLICY_LEVEL_RECOMMENDED;
- scoped_ptr<base::Value> policy_value = PropertyToValue(value);
+ std::unique_ptr<base::Value> policy_value = PropertyToValue(value);
if (policy_value) {
policy->Set(it.key(), level, POLICY_SCOPE_USER, POLICY_SOURCE_PLATFORM,
policy_value.release(), nullptr);
« no previous file with comments | « components/policy/core/common/policy_loader_mac.h ('k') | components/policy/core/common/policy_loader_mac_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698