summaryrefslogtreecommitdiffstats
path: root/base/mac_util.h
diff options
context:
space:
mode:
authormnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-29 13:09:55 +0000
committermnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-29 13:09:55 +0000
commit7c5972380d2432472b0bfe25fbd07db134731007 (patch)
tree06c7114340907eeb3abf5dc72053090c7160b95f /base/mac_util.h
parent8127442bb787fcdfe6af0c40131d11103072af17 (diff)
downloadchromium_src-7c5972380d2432472b0bfe25fbd07db134731007.zip
chromium_src-7c5972380d2432472b0bfe25fbd07db134731007.tar.gz
chromium_src-7c5972380d2432472b0bfe25fbd07db134731007.tar.bz2
Dynamic policy refresh support for the Mac.
Adapt the file watching code we already had for ConfigDirPolicyProvider to support a loader delegate, make the old code use it and change the Mac policy provider to watch for changes to the plist file in /Library/Managed Preferences/<username>. BUG=52040 TEST=unit tests Review URL: http://codereview.chromium.org/4062002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64415 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/mac_util.h')
-rw-r--r--base/mac_util.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/base/mac_util.h b/base/mac_util.h
index e590d30..182fcc8 100644
--- a/base/mac_util.h
+++ b/base/mac_util.h
@@ -24,8 +24,10 @@ class NSWindow;
// Adapted from NSPathUtilities.h and NSObjCRuntime.h.
#if __LP64__ || NS_BUILD_32_LIKE_64
typedef unsigned long NSSearchPathDirectory;
+typedef unsigned long NSSearchPathDomainMask;
#else
typedef unsigned int NSSearchPathDirectory;
+typedef unsigned int NSSearchPathDomainMask;
#endif
namespace mac_util {
@@ -74,11 +76,23 @@ OSType CreatorCodeForCFBundleRef(CFBundleRef bundle);
// app bundle's creator code anyway.
OSType CreatorCodeForApplication();
+// Searches for directories for the given key in only the given |domain_mask|.
+// If found, fills result (which must always be non-NULL) with the
+// first found directory and returns true. Otherwise, returns false.
+bool GetSearchPathDirectory(NSSearchPathDirectory directory,
+ NSSearchPathDomainMask domain_mask,
+ FilePath* result);
+
// Searches for directories for the given key in only the user domain.
// If found, fills result (which must always be non-NULL) with the
// first found directory and returns true. Otherwise, returns false.
bool GetUserDirectory(NSSearchPathDirectory directory, FilePath* result);
+// Searches for directories for the given key in only the local domain.
+// If found, fills result (which must always be non-NULL) with the
+// first found directory and returns true. Otherwise, returns false.
+bool GetLocalDirectory(NSSearchPathDirectory directory, FilePath* result);
+
// Returns the ~/Library directory.
FilePath GetUserLibraryPath();