summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
Diffstat (limited to 'base')
-rw-r--r--base/mac_util.h1
-rw-r--r--base/mac_util.mm5
2 files changed, 6 insertions, 0 deletions
diff --git a/base/mac_util.h b/base/mac_util.h
index 2235377..0baab02 100644
--- a/base/mac_util.h
+++ b/base/mac_util.h
@@ -31,6 +31,7 @@ bool IsBackgroundOnlyProcess();
// to fetch resources from bundles, but work within a unittest where we
// aren't a bundle.
NSBundle* MainAppBundle();
+FilePath MainAppBundlePath();
// Set the bundle that MainAppBundle will return, overriding the default value
// (Restore the default by calling SetOverrideAppBundle(nil)).
diff --git a/base/mac_util.mm b/base/mac_util.mm
index 2aa86f2..014342c 100644
--- a/base/mac_util.mm
+++ b/base/mac_util.mm
@@ -61,6 +61,11 @@ NSBundle* MainAppBundle() {
return [NSBundle mainBundle];
}
+FilePath MainAppBundlePath() {
+ NSBundle* bundle = MainAppBundle();
+ return FilePath([[bundle bundlePath] fileSystemRepresentation]);
+}
+
void SetOverrideAppBundle(NSBundle* bundle) {
if (bundle != g_override_app_bundle) {
[g_override_app_bundle release];