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

Side by Side Diff: components/policy/core/common/mac_util.h

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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_POLICY_CORE_COMMON_MAC_UTIL_H_ 5 #ifndef COMPONENTS_POLICY_CORE_COMMON_MAC_UTIL_H_
6 #define COMPONENTS_POLICY_CORE_COMMON_MAC_UTIL_H_ 6 #define COMPONENTS_POLICY_CORE_COMMON_MAC_UTIL_H_
7 7
8 #include <CoreFoundation/CoreFoundation.h> 8 #include <CoreFoundation/CoreFoundation.h>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include <memory>
11
11 #include "components/policy/policy_export.h" 12 #include "components/policy/policy_export.h"
12 13
13 // This file contains utilities shared by both Mac OS X and iOS. 14 // This file contains utilities shared by both Mac OS X and iOS.
14 15
15 namespace base { 16 namespace base {
16 class Value; 17 class Value;
17 } 18 }
18 19
19 namespace policy { 20 namespace policy {
20 21
21 // Converts a CFPropertyListRef to the equivalent base::Value. CFDictionary 22 // Converts a CFPropertyListRef to the equivalent base::Value. CFDictionary
22 // entries whose key is not a CFStringRef are ignored. 23 // entries whose key is not a CFStringRef are ignored.
23 // Returns NULL if an invalid CFType was found, such as CFDate or CFData. 24 // Returns NULL if an invalid CFType was found, such as CFDate or CFData.
24 // NSDictionary is toll-free bridged to CFDictionaryRef, which is a 25 // NSDictionary is toll-free bridged to CFDictionaryRef, which is a
25 // CFPropertyListRef, so it can also be passed directly here. Same for the 26 // CFPropertyListRef, so it can also be passed directly here. Same for the
26 // other NS* classes that map to CF* properties. 27 // other NS* classes that map to CF* properties.
27 POLICY_EXPORT scoped_ptr<base::Value> PropertyToValue( 28 POLICY_EXPORT std::unique_ptr<base::Value> PropertyToValue(
28 CFPropertyListRef property); 29 CFPropertyListRef property);
29 30
30 } // namespace policy 31 } // namespace policy
31 32
32 #endif // COMPONENTS_POLICY_CORE_COMMON_MAC_UTIL_H_ 33 #endif // COMPONENTS_POLICY_CORE_COMMON_MAC_UTIL_H_
OLDNEW
« no previous file with comments | « components/policy/core/common/generate_policy_source_unittest.cc ('k') | components/policy/core/common/mac_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698