| Index: chrome/common/chrome_paths_mac.mm
|
| diff --git a/chrome/common/chrome_paths_mac.mm b/chrome/common/chrome_paths_mac.mm
|
| index 21868cdf7ae95b2a0f28cbaea47fc5178d207406..c7db483cdf8262ae141cc952de7c8c3998735b34 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
|
|
|