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

Unified Diff: chrome/common/chrome_paths.cc

Issue 7718021: Add external extensions json source in proper mac location. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use IsParent() Created 9 years, 4 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
« base/file_util_unittest.cc ('K') | « chrome/common/chrome_paths.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.cc
diff --git a/chrome/common/chrome_paths.cc b/chrome/common/chrome_paths.cc
index 0758f1ee8e4dc6730f45fcfe541384a52292acba..e92d5ec98b4edd3e618d73550b31a33af6871ef6 100644
--- a/chrome/common/chrome_paths.cc
+++ b/chrome/common/chrome_paths.cc
@@ -327,16 +327,9 @@ bool PathProvider(int key, FilePath* result) {
#endif
case chrome::DIR_EXTERNAL_EXTENSIONS:
#if defined(OS_MACOSX)
- if (!PathService::Get(base::DIR_EXE, &cur))
- return false;
-
- // On Mac, built-in extensions are in Contents/Extensions, a sibling of
- // the App dir. If there are none, it may not exist.
- // TODO(skerner): Reading external extensions from a file inside the
- // app budle causes several problems. Change this path to be outside
- // the app bundle. crbug/67203
- cur = cur.DirName();
- cur = cur.Append(FILE_PATH_LITERAL("Extensions"));
+ cur = FilePath(
+ FILE_PATH_LITERAL("/Library/Application Support/Google/Chrome"));
TVL 2011/08/30 15:32:40 This should probably use base::mac::GetLocalDirect
Sam Kerner (Chrome) 2011/09/16 18:12:59 Done.
+ cur = cur.Append("External Extensions");
create_dir = false;
#else
if (!PathService::Get(base::DIR_MODULE, &cur))
@@ -346,6 +339,22 @@ bool PathProvider(int key, FilePath* result) {
create_dir = true;
#endif
break;
+
+#if defined(OS_MACOSX)
+ case DIR_DEPRICATED_EXTERNAL_EXTENSIONS:
+ // TODO(skerner): Reading external extensions from a file inside the
+ // app budle causes several problems. Once users have a chance to
+ // migrate, remove this path. crbug/67203
+ if (!PathService::Get(base::DIR_EXE, &cur))
+ return false;
+
+ cur = cur.DirName();
+ cur = cur.Append(FILE_PATH_LITERAL("Extensions"));
+ create_dir = false;
+
+ break;
+#endif
+
default:
return false;
}
« base/file_util_unittest.cc ('K') | « chrome/common/chrome_paths.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698