diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-22 04:15:13 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-22 04:15:13 +0000 |
commit | 151c4a6e282f4282669fb7360dbcbb59c25b92fa (patch) | |
tree | aced67734d49ef99cbe82508f8f6c544a5dd1b3c /chrome/common/chrome_paths_mac.mm | |
parent | 55397fc328afa661889e11bfac71617667bd3b69 (diff) | |
download | chromium_src-151c4a6e282f4282669fb7360dbcbb59c25b92fa.zip chromium_src-151c4a6e282f4282669fb7360dbcbb59c25b92fa.tar.gz chromium_src-151c4a6e282f4282669fb7360dbcbb59c25b92fa.tar.bz2 |
Use the real Mac browser app's bundle identifier everywhere that a base
bundle identifier is needed on the Mac. This means that everything will use
up using org.chromium.Chromium, com.google.Chrome, or
com.google.Chrome.canary when it's important to get the base bundle
identifier. .helper and .framework will not be appended. Note, however, that
things that run inside the helper and use CFPreferences or NSUserDefaults
will continue to write their defaults as org.chromium.Chromium.helper or
com.google.Chrome.helper. Mostly this just affects the Flash plug-in's
settings for the NSNav open dialog. There is no
com.google.Chrome.canary.helper, but that's not expected to be a problem.
This change ensures that Chromes, canaries, and Chromiums don't get in each
other's way.
BUG=79814
TEST=none
Review URL: http://codereview.chromium.org/6896003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82626 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/chrome_paths_mac.mm')
-rw-r--r-- | chrome/common/chrome_paths_mac.mm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/chrome/common/chrome_paths_mac.mm b/chrome/common/chrome_paths_mac.mm index f88fe2a..6054532 100644 --- a/chrome/common/chrome_paths_mac.mm +++ b/chrome/common/chrome_paths_mac.mm @@ -21,7 +21,7 @@ namespace { const FilePath* g_override_versioned_directory = NULL; -NSBundle* OuterAppBundle() { +NSBundle* OuterAppBundleInternal() { if (!base::mac::AmIBundled()) { // If unbundled (as in a test), there's no app bundle. return nil; @@ -53,7 +53,7 @@ const char* ProductDirNameInternal() { // should not be accessed from non-browser processes, but those processes do // attempt to get the profile directory, so direct them to look in the outer // browser .app's Info.plist for the CrProductDirName key. - NSBundle* bundle = OuterAppBundle(); + NSBundle* bundle = chrome::OuterAppBundle(); NSString* product_dir_name_ns = [bundle objectForInfoDictionaryKey:@"CrProductDirName"]; const char* product_dir_name = [product_dir_name_ns fileSystemRepresentation]; @@ -183,4 +183,10 @@ bool GetLocalLibraryDirectory(FilePath* result) { return base::mac::GetLocalDirectory(NSLibraryDirectory, result); } +NSBundle* OuterAppBundle() { + // Cache this. Foundation leaks it anyway. + static NSBundle* bundle = [OuterAppBundleInternal() retain]; + return bundle; +} + } // namespace chrome |