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

Unified Diff: components/policy/core/common/mac_util.h

Issue 179813008: Move PolicyLoaderMac::CreateValueFromProperty to a generic file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: POLICY_EXPORT Created 6 years, 10 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
« no previous file with comments | « components/components_tests.gyp ('k') | components/policy/core/common/mac_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/policy/core/common/mac_util.h
diff --git a/components/policy/core/common/mac_util.h b/components/policy/core/common/mac_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..ba450c88cb99fe087cefa31a70047ff94883bea2
--- /dev/null
+++ b/components/policy/core/common/mac_util.h
@@ -0,0 +1,32 @@
+// Copyright (c) 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_POLICY_CORE_COMMON_MAC_UTIL_H_
+#define COMPONENTS_POLICY_CORE_COMMON_MAC_UTIL_H_
+
+#include <CoreFoundation/CoreFoundation.h>
+
+#include "base/memory/scoped_ptr.h"
+#include "components/policy/policy_export.h"
+
+// This file contains utilities shared by both Mac OS X and iOS.
+
+namespace base {
+class Value;
+}
+
+namespace policy {
+
+// Converts a CFPropertyListRef to the equivalent base::Value. CFDictionary
+// entries whose key is not a CFStringRef are ignored.
dconnelly 2014/03/04 21:13:36 why?
Joao da Silva 2014/03/04 23:18:01 Because that's supported in CFDictionaries but not
+// Returns NULL if an invalid CFType was found, such as CFDate or CFData.
+// NSDictionary is toll-free bridged to CFDictionaryRef, which is a
+// CFPropertyListRef, so it can also be passed directly here. Same for the
+// other NS* classes that map to CF* properties.
+POLICY_EXPORT scoped_ptr<base::Value> PropertyToValue(
+ CFPropertyListRef property);
+
+} // namespace policy
+
+#endif // COMPONENTS_POLICY_CORE_COMMON_MAC_UTIL_H_
« no previous file with comments | « components/components_tests.gyp ('k') | components/policy/core/common/mac_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698