summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-13 20:52:06 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-13 20:52:06 +0000
commitc9269361cab439a91ed127e81bb340e19d1529d7 (patch)
tree18298feb9153e1a1c05c0a0dfc46a0b83207ec07 /app
parent0106f48a2008ac170dd2b9b836af499b38487440 (diff)
downloadchromium_src-c9269361cab439a91ed127e81bb340e19d1529d7.zip
chromium_src-c9269361cab439a91ed127e81bb340e19d1529d7.tar.gz
chromium_src-c9269361cab439a91ed127e81bb340e19d1529d7.tar.bz2
Mac-ify the app-based extensions folder name.
BUG=http://crbug.com/16484 TEST=ensure no "extensions" folder is created as a sibling of the app binary Review URL: http://codereview.chromium.org/155425 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20525 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app')
-rw-r--r--app/app_paths.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/app_paths.cc b/app/app_paths.cc
index 30c6a01..315efec8 100644
--- a/app/app_paths.cc
+++ b/app/app_paths.cc
@@ -18,12 +18,16 @@ bool PathProvider(int key, FilePath* result) {
FilePath cur;
switch (key) {
+#if !defined(OS_MACOSX)
+ // These are not "themes" that are user-created, but rather the dlls and
+ // pak files. On the Mac, we keep the pak files in the lproj folders.
case app::DIR_THEMES:
if (!PathService::Get(base::DIR_MODULE, &cur))
return false;
cur = cur.Append(FILE_PATH_LITERAL("themes"));
create_dir = true;
break;
+#endif
case app::DIR_LOCALES:
if (!PathService::Get(base::DIR_MODULE, &cur))
return false;
@@ -40,8 +44,16 @@ bool PathProvider(int key, FilePath* result) {
case app::DIR_EXTERNAL_EXTENSIONS:
if (!PathService::Get(base::DIR_MODULE, &cur))
return false;
+#if defined(OS_MACOSX)
+ // On Mac, built-in extensions are in Contents/Extensions, a sibling of
+ // the App dir. If there are none, it may not exist.
+ cur = cur.DirName();
+ cur = cur.Append(FILE_PATH_LITERAL("Extensions"));
+ create_dir = false;
+#else
cur = cur.Append(FILE_PATH_LITERAL("extensions"));
create_dir = true;
+#endif
break;
// The following are only valid in the development environment, and
// will fail if executed from an installed executable (because the