@@ -0,0 +1,70 @@
1+diff --git a/chrome/common/chrome_paths.cc b/chrome/common/chrome_paths.cc
2+index f4e119d..d9775bd 100644
3+--- a/chrome/common/chrome_paths.cc
4++++ b/chrome/common/chrome_paths.cc
5+@@ -68,21 +68,14 @@ static base::LazyInstance<base::FilePath>
6+ g_invalid_specified_user_data_dir = LAZY_INSTANCE_INITIALIZER;
8+ // Gets the path for internal plugins.
9+-bool GetInternalPluginsDirectory(base::FilePath* result) {
10+-#if defined(OS_MACOSX)
11+- // If called from Chrome, get internal plugins from a subdirectory of the
13+- if (base::mac::AmIBundled()) {
14+- *result = chrome::GetFrameworkBundlePath();
15+- DCHECK(!result->empty());
16+- *result = result->Append("Internet Plug-Ins");
19+- // In tests, just look in the module directory (below).
22+- // The rest of the world expects plugins in the module directory.
23+- return PathService::Get(base::DIR_MODULE, result);
24++bool GetInternalPluginsDirectory(base::FilePath* result,
25++ const std::string& ident) {
26++ std::string full_env = std::string("NIX_CHROMIUM_PLUGIN_PATH_") + ident;
27++ const char* value = getenv(full_env.c_str());
29++ return PathService::Get(base::DIR_MODULE, result);
31++ *result = base::FilePath(value);
34+ // Gets the path for bundled implementations of components. Note that these
35+@@ -272,7 +265,7 @@ bool PathProvider(int key, base::FilePath* result) {
38+ case chrome::DIR_INTERNAL_PLUGINS:
39+- if (!GetInternalPluginsDirectory(&cur))
40++ if (!GetInternalPluginsDirectory(&cur, "ALL"))
43+ case chrome::DIR_COMPONENTS:
44+@@ -280,7 +273,7 @@ bool PathProvider(int key, base::FilePath* result) {
47+ case chrome::DIR_PEPPER_FLASH_PLUGIN:
48+- if (!GetInternalPluginsDirectory(&cur))
49++ if (!GetInternalPluginsDirectory(&cur, "PEPPERFLASH"))
51+ cur = cur.Append(kPepperFlashBaseDirectory);
53+@@ -323,7 +316,7 @@ bool PathProvider(int key, base::FilePath* result) {
54+ // We currently need a path here to look up whether the plugin is disabled
55+ // and what its permissions are.
56+ case chrome::FILE_NACL_PLUGIN:
57+- if (!GetInternalPluginsDirectory(&cur))
58++ if (!GetInternalPluginsDirectory(&cur, "NACL"))
60+ cur = cur.Append(kInternalNaClPluginFileName);
62+@@ -358,7 +351,7 @@ bool PathProvider(int key, base::FilePath* result) {
66+- if (!GetInternalPluginsDirectory(&cur))
67++ if (!GetInternalPluginsDirectory(&cur, "PNACL"))
70+ cur = cur.Append(FILE_PATH_LITERAL("pnacl"));