diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-11 21:27:30 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-11 21:27:30 +0000 |
commit | 4b77bf1d8d5023c6a9232ce41f24d5bfbb3aaff6 (patch) | |
tree | a0e17b93d9e59b3f9abe86b00154d7abbe0888d2 /base/mac_util.h | |
parent | ba0ad5cfc951e80eea8b6a8c3ac2ddd02762b8df (diff) | |
download | chromium_src-4b77bf1d8d5023c6a9232ce41f24d5bfbb3aaff6.zip chromium_src-4b77bf1d8d5023c6a9232ce41f24d5bfbb3aaff6.tar.gz chromium_src-4b77bf1d8d5023c6a9232ce41f24d5bfbb3aaff6.tar.bz2 |
Use real creator code for Keychain items. Instead of hard-coding 'rimZ', use
the correct creator code for the application. This is 'rimZ' for branded
Google Chrome, and 'Cr24' for Chromium.
BUG=19000
TEST=No functional change in Google Chrome-branded builds
Review URL: http://codereview.chromium.org/164332
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23074 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/mac_util.h')
-rw-r--r-- | base/mac_util.h | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/base/mac_util.h b/base/mac_util.h index 43f0e5c..220d68e 100644 --- a/base/mac_util.h +++ b/base/mac_util.h @@ -5,7 +5,9 @@ #ifndef BASE_MAC_UTIL_H_ #define BASE_MAC_UTIL_H_ -struct FSRef; +#include <Carbon/Carbon.h> +#include <string> + class FilePath; #ifdef __OBJC__ @@ -14,8 +16,6 @@ class FilePath; class NSBundle; #endif -#include <string> - namespace mac_util { std::string PathFromFSRef(const FSRef& ref); @@ -29,14 +29,25 @@ bool AmIBundled(); // aren't a bundle. NSBundle* MainAppBundle(); -// Returns the ~/Library directory. -FilePath GetUserLibraryPath(); - // Set the bundle that MainAppBundle will return, overriding the default value // (Restore the default by calling SetOverrideAppBundle(nil)). void SetOverrideAppBundle(NSBundle* bundle); void SetOverrideAppBundlePath(const FilePath& file_path); +// Returns the creator code associated with the CFBundleRef at bundle. +OSType CreatorCodeForCFBundleRef(CFBundleRef bundle); + +// Returns the creator code associated with this application, by calling +// CreatorCodeForCFBundleRef for the application's main bundle. If this +// information cannot be determined, returns kUnknownType ('????'). This +// does not respect the override app bundle because it's based on CFBundle +// instead of NSBundle, and because callers probably don't want the override +// app bundle's creator code anyway. +OSType CreatorCodeForApplication(); + +// Returns the ~/Library directory. +FilePath GetUserLibraryPath(); + } // namespace mac_util #endif // BASE_MAC_UTIL_H_ |