diff options
author | jeremya@chromium.org <jeremya@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-05 23:27:21 +0000 |
---|---|---|
committer | jeremya@chromium.org <jeremya@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-05 23:27:21 +0000 |
commit | 7944d2483bb03fa9fd6694670aa5377cfdfdc495 (patch) | |
tree | 991c06749e2c759ecf6d9330ee8c7cb274a27b5b /chrome/common/chrome_paths_internal.h | |
parent | 2f99c553fc0c843dc67091300f833d2a9e7ac58b (diff) | |
download | chromium_src-7944d2483bb03fa9fd6694670aa5377cfdfdc495.zip chromium_src-7944d2483bb03fa9fd6694670aa5377cfdfdc495.tar.gz chromium_src-7944d2483bb03fa9fd6694670aa5377cfdfdc495.tar.bz2 |
[mac] Make app shims look in the correct user data dir on Canary.
On Canary, the user data directory is affected by
[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CrProductDirName"].
Unfortunately in app shims, [NSBundle mainBundle] refers to the app shim's
bundle, not Chrome's bundle. This patch parameterises the
user-data-directory-figuring-out code on the NSBundle, so that app shims can
pass an NSBundle for the real Chrome bundle.
R=thakis@chromium.org
Review URL: https://chromiumcodereview.appspot.com/12663023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192644 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/chrome_paths_internal.h')
-rw-r--r-- | chrome/common/chrome_paths_internal.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/chrome/common/chrome_paths_internal.h b/chrome/common/chrome_paths_internal.h index 5f9b18b..f2e38a6 100644 --- a/chrome/common/chrome_paths_internal.h +++ b/chrome/common/chrome_paths_internal.h @@ -92,6 +92,15 @@ bool GetGlobalApplicationSupportDirectory(base::FilePath* result); // inside the helper. In unbundled applications, such as tests, returns nil. NSBundle* OuterAppBundle(); +// Get the user data directory for the Chrome browser bundle at |bundle|. +// |bundle| should be the same value that would be returned from +[NSBundle +// mainBundle] if Chrome were launched normaly. This is used by app shims, +// which run from a bundle which isn't Chrome itself, but which need access to +// the user data directory to connect to a UNIX-domain socket therein. +// Returns false if there was a problem fetching the app data directory. +bool GetUserDataDirectoryForBrowserBundle(NSBundle* bundle, + base::FilePath* result); + #endif // OS_MACOSX && !OS_IOS // Checks if the |process_type| has the rights to access the profile. |