diff options
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 |