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

Unified Diff: components/policy/core/common/policy_loader_ios.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_ios.mm
diff --git a/components/policy/core/common/policy_loader_ios.mm b/components/policy/core/common/policy_loader_ios.mm
index 8bce12fd3f37f607bf575267857d454d223852d2..0fec8058ed2cffed29f49ddf7e9954cdc3c2572f 100644
--- a/components/policy/core/common/policy_loader_ios.mm
+++ b/components/policy/core/common/policy_loader_ios.mm
@@ -109,8 +109,8 @@ void PolicyLoaderIOS::InitOnBackgroundThread() {
taskRunner:task_runner()]);
}
-scoped_ptr<PolicyBundle> PolicyLoaderIOS::Load() {
- scoped_ptr<PolicyBundle> bundle(new PolicyBundle());
+std::unique_ptr<PolicyBundle> PolicyLoaderIOS::Load() {
+ std::unique_ptr<PolicyBundle> bundle(new PolicyBundle());
NSDictionary* configuration = [[NSUserDefaults standardUserDefaults]
dictionaryForKey:kConfigurationKey];
id chromePolicy = configuration[kChromePolicyKey];
@@ -173,7 +173,7 @@ void PolicyLoaderIOS::LoadNSDictionaryToPolicyBundle(NSDictionary* dictionary,
PolicyBundle* bundle) {
// NSDictionary is toll-free bridged to CFDictionaryRef, which is a
// CFPropertyListRef.
- scoped_ptr<base::Value> value =
+ std::unique_ptr<base::Value> value =
PropertyToValue(static_cast<CFPropertyListRef>(dictionary));
base::DictionaryValue* dict = NULL;
if (value && value->GetAsDictionary(&dict)) {
« no previous file with comments | « components/policy/core/common/policy_loader_ios.h ('k') | components/policy/core/common/policy_loader_ios_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698