···
+
diff --git a/chrome/common/chrome_paths.cc b/chrome/common/chrome_paths.cc
+
index 8a205a6..d5c24e1 100644
+
--- a/chrome/common/chrome_paths.cc
+
+++ b/chrome/common/chrome_paths.cc
+
@@ -97,21 +97,14 @@ static base::LazyInstance<base::FilePath>
+
g_invalid_specified_user_data_dir = LAZY_INSTANCE_INITIALIZER;
+
// Gets the path for internal plugins.
+
-bool GetInternalPluginsDirectory(base::FilePath* result) {
+
-#if defined(OS_MACOSX) && !defined(OS_IOS)
+
- // If called from Chrome, get internal plugins from a subdirectory of the
+
- if (base::mac::AmIBundled()) {
+
- *result = chrome::GetFrameworkBundlePath();
+
- DCHECK(!result->empty());
+
- *result = result->Append("Internet Plug-Ins");
+
- // In tests, just look in the module directory (below).
+
- // The rest of the world expects plugins in the module directory.
+
- return PathService::Get(base::DIR_MODULE, result);
+
+bool GetInternalPluginsDirectory(base::FilePath* result,
+
+ const std::string& ident) {
+
+ std::string full_env = std::string("NIX_CHROMIUM_PLUGIN_PATH_") + ident;
+
+ const char* value = getenv(full_env.c_str());
+
+ return PathService::Get(base::DIR_MODULE, result);
+
+ *result = base::FilePath(value);
+
@@ -248,11 +241,11 @@ bool PathProvider(int key, base::FilePath* result) {
+
case chrome::DIR_INTERNAL_PLUGINS:
+
- if (!GetInternalPluginsDirectory(&cur))
+
+ if (!GetInternalPluginsDirectory(&cur, "ALL"))
+
case chrome::DIR_PEPPER_FLASH_PLUGIN:
+
- if (!GetInternalPluginsDirectory(&cur))
+
+ if (!GetInternalPluginsDirectory(&cur, "PEPPERFLASH"))
+
cur = cur.Append(kPepperFlashBaseDirectory);
+
@@ -285,7 +278,7 @@ bool PathProvider(int key, base::FilePath* result) {
+
cur = cur.Append(FILE_PATH_LITERAL("script.log"));
+
case chrome::FILE_FLASH_PLUGIN:
+
- if (!GetInternalPluginsDirectory(&cur))
+
+ if (!GetInternalPluginsDirectory(&cur, "FILEFLASH"))
+
cur = cur.Append(kInternalFlashPluginFileName);
+
@@ -295,7 +288,7 @@ bool PathProvider(int key, base::FilePath* result) {
+
cur = cur.Append(chrome::kPepperFlashPluginFilename);
+
case chrome::FILE_EFFECTS_PLUGIN:
+
- if (!GetInternalPluginsDirectory(&cur))
+
+ if (!GetInternalPluginsDirectory(&cur, "FILE_EFFECTS"))
+
cur = cur.Append(kEffectsPluginFileName);
+
@@ -308,7 +301,7 @@ bool PathProvider(int key, base::FilePath* result) {
+
// We currently need a path here to look up whether the plugin is disabled
+
// and what its permissions are.
+
case chrome::FILE_NACL_PLUGIN:
+
- if (!GetInternalPluginsDirectory(&cur))
+
+ if (!GetInternalPluginsDirectory(&cur, "NACL"))
+
cur = cur.Append(kInternalNaClPluginFileName);
+
@@ -343,7 +336,7 @@ bool PathProvider(int key, base::FilePath* result) {
+
- if (!GetInternalPluginsDirectory(&cur))
+
+ if (!GetInternalPluginsDirectory(&cur, "PNACL"))
+
cur = cur.Append(FILE_PATH_LITERAL("pnacl"));
+
@@ -372,7 +365,7 @@ bool PathProvider(int key, base::FilePath* result) {
+
// In the component case, this is the source adapter. Otherwise, it is the
+
// actual Pepper module that gets loaded.
+
case chrome::FILE_WIDEVINE_CDM_ADAPTER:
+
- if (!GetInternalPluginsDirectory(&cur))
+
+ if (!GetInternalPluginsDirectory(&cur, "WIDEVINE"))
+
cur = cur.AppendASCII(kWidevineCdmAdapterFileName);