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 /base/shared_memory_posix.cc | |
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 'base/shared_memory_posix.cc')
-rw-r--r-- | base/shared_memory_posix.cc | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/base/shared_memory_posix.cc b/base/shared_memory_posix.cc index 873432a..b8e004d 100644 --- a/base/shared_memory_posix.cc +++ b/base/shared_memory_posix.cc @@ -17,6 +17,10 @@ #include "base/threading/thread_restrictions.h" #include "base/utf_string_conversions.h" +#if defined(OS_MACOSX) +#include "base/mac/foundation_util.h" +#endif // OS_MACOSX + namespace base { namespace { @@ -287,7 +291,16 @@ bool SharedMemory::FilePathForMemoryName(const std::string& mem_name, if (!file_util::GetShmemTempDir(&temp_dir)) return false; - *path = temp_dir.AppendASCII("com.google.chrome.shmem." + mem_name); +#if !defined(OS_MACOSX) +#if defined(GOOGLE_CHROME_BUILD) + std::string name_base = std::string("com.google.Chrome"); +#else + std::string name_base = std::string("org.chromium.Chromium"); +#endif +#else // OS_MACOSX + std::string name_base = std::string(base::mac::BaseBundleID()); +#endif // OS_MACOSX + *path = temp_dir.AppendASCII(name_base + ".shmem." + mem_name); return true; } |