diff options
author | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-18 22:09:40 +0000 |
---|---|---|
committer | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-18 22:09:40 +0000 |
commit | adf0225bfea22dd085a1e0816871af9e8f1fe372 (patch) | |
tree | 96fd5362f73388c6a72359db01b33dfbc6d15f81 /chrome/common/chrome_paths_mac.mm | |
parent | 98e94a40052f163889a5d6026a24d750edf28818 (diff) | |
download | chromium_src-adf0225bfea22dd085a1e0816871af9e8f1fe372.zip chromium_src-adf0225bfea22dd085a1e0816871af9e8f1fe372.tar.gz chromium_src-adf0225bfea22dd085a1e0816871af9e8f1fe372.tar.bz2 |
Mac: app mode loader (shim).
Define an interface using which Chrome can be loaded from a minimal loader.
Produce a binary for this loader (which can be put into a bundle).
BUG=13148
TEST=not yet
Review URL: http://codereview.chromium.org/2066004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47576 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/chrome_paths_mac.mm')
-rw-r--r-- | chrome/common/chrome_paths_mac.mm | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/chrome/common/chrome_paths_mac.mm b/chrome/common/chrome_paths_mac.mm index 21868cd..c7db483 100644 --- a/chrome/common/chrome_paths_mac.mm +++ b/chrome/common/chrome_paths_mac.mm @@ -12,6 +12,10 @@ #include "base/path_service.h" #include "chrome/common/chrome_constants.h" +namespace { +const FilePath* g_override_versioned_directory = NULL; +} // namespace + namespace chrome { bool GetDefaultUserDataDirectory(FilePath* result) { @@ -53,6 +57,9 @@ bool GetUserDesktop(FilePath* result) { } FilePath GetVersionedDirectory() { + if (g_override_versioned_directory) + return *g_override_versioned_directory; + // Start out with the path to the running executable. FilePath path; PathService::Get(base::FILE_EXE, &path); @@ -75,6 +82,13 @@ FilePath GetVersionedDirectory() { return path; } +void SetOverrideVersionedDirectory(const FilePath* path) { + if (path != g_override_versioned_directory) { + delete g_override_versioned_directory; + g_override_versioned_directory = path; + } +} + FilePath GetFrameworkBundlePath() { // It's tempting to use +[NSBundle bundleWithIdentifier:], but it's really // slow (about 30ms on 10.5 and 10.6), despite Apple's documentation stating |