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

Unified Diff: base/mac_util.h

Issue 28214: Add a macutil for the main app bundle and override... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 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 | « no previous file | base/mac_util.mm » ('j') | base/mac_util.mm » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/mac_util.h
===================================================================
--- base/mac_util.h (revision 10790)
+++ base/mac_util.h (working copy)
@@ -6,7 +6,14 @@
#define BASE_MAC_UTIL_H_
struct FSRef;
+class FilePath;
+#ifdef __OBJC__
+@class NSBundle;
+#else
+class NSBundle;
+#endif
+
#include <string>
namespace mac_util {
@@ -17,6 +24,16 @@
// Returns true if the application is running from a bundle
bool AmIBundled();
+// Returns the main bundle or the override, used for code that needs
+// to fetch resources from bundles, but work within a unittest where we
+// aren't a bundle.
+NSBundle* MainAppBundle();
+
+// 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);
+
} // namespace mac_util
#endif // BASE_MAC_UTIL_H_
« no previous file with comments | « no previous file | base/mac_util.mm » ('j') | base/mac_util.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698