Commit | Line | Data |
---|---|---|
867e3830 MB |
1 | Look for extensions in $CHROMIUM_EXTENSION_DIRECTORY instead of |
2 | /usr/share/chromium/extensions. | |
3 | ||
4 | --- a/chrome/common/chrome_paths.cc | |
5 | +++ b/chrome/common/chrome_paths.cc | |
6 | @@ -4,6 +4,7 @@ | |
7 | ||
8 | #include "chrome/common/chrome_paths.h" | |
9 | ||
10 | +#include "base/environment.h" | |
11 | #include "base/files/file_util.h" | |
12 | #include "base/logging.h" | |
13 | #include "base/native_library.h" | |
14 | @@ -511,7 +512,13 @@ | |
15 | #endif | |
16 | #if defined(OS_LINUX) || defined(OS_CHROMEOS) | |
17 | case chrome::DIR_STANDALONE_EXTERNAL_EXTENSIONS: { | |
18 | - cur = base::FilePath(kFilepathSinglePrefExtensions); | |
19 | + std::unique_ptr<base::Environment> environment(base::Environment::Create()); | |
20 | + std::string extension_dir; | |
21 | + if (environment->GetVar("CHROMIUM_EXTENSION_DIRECTORY", &extension_dir)) { | |
22 | + cur = base::FilePath(extension_dir); | |
23 | + } else { | |
24 | + cur = base::FilePath(kFilepathSinglePrefExtensions); | |
25 | + } | |
26 | break; | |
27 | } | |
28 | #endif |