Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6013)

Unified Diff: chrome/common/chrome_paths_mac.mm

Issue 2066004: Mac: app mode loader (shim). (Closed)
Patch Set: more changes per mark + merged ToT Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/chrome_paths_internal.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « chrome/common/chrome_paths_internal.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698