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

Unified Diff: base/mac_util.h

Issue 164332: Use real creator code for Keychain items (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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 | « no previous file | base/mac_util.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/mac_util.h
===================================================================
--- base/mac_util.h (revision 23061)
+++ base/mac_util.h (working copy)
@@ -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 NSBundle;
#endif
-#include <string>
-
namespace mac_util {
std::string PathFromFSRef(const FSRef& ref);
@@ -29,14 +29,25 @@
// 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_
« no previous file with comments | « no previous file | base/mac_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698