summaryrefslogtreecommitdiffstats
path: root/app/app_paths.cc
diff options
context:
space:
mode:
authorfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-16 23:11:26 +0000
committerfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-16 23:11:26 +0000
commit560541ea404af23c1e91f0ef83b4ed11022a84c7 (patch)
tree63dd18b24d2b6fac408e167bbd71282b813265c9 /app/app_paths.cc
parentcff79266d87a5a5371dc80279517cf53760262a5 (diff)
downloadchromium_src-560541ea404af23c1e91f0ef83b4ed11022a84c7.zip
chromium_src-560541ea404af23c1e91f0ef83b4ed11022a84c7.tar.gz
chromium_src-560541ea404af23c1e91f0ef83b4ed11022a84c7.tar.bz2
Bug 14202: Support relative paths when installing external extensions through prefs.
First we try the path as absolute path. If the file is not found, we try a relative path: [installation path]\extensions This will make installing extensions easier from pre-installed prefs, since we can drop them into an extensions directory under the program directory. BUG=14202 TEST=Specify relative path when installing extensions through prefs. Best to test this with an installer that supports deploying extensions (blocked on 14201) Review URL: http://codereview.chromium.org/125219 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18554 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app/app_paths.cc')
-rw-r--r--app/app_paths.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/app_paths.cc b/app/app_paths.cc
index ab4751c..30c6a01 100644
--- a/app/app_paths.cc
+++ b/app/app_paths.cc
@@ -37,6 +37,12 @@ bool PathProvider(int key, FilePath* result) {
#endif
create_dir = true;
break;
+ case app::DIR_EXTERNAL_EXTENSIONS:
+ if (!PathService::Get(base::DIR_MODULE, &cur))
+ return false;
+ cur = cur.Append(FILE_PATH_LITERAL("extensions"));
+ create_dir = true;
+ break;
// The following are only valid in the development environment, and
// will fail if executed from an installed executable (because the
// generated path won't exist).