summaryrefslogtreecommitdiffstats
path: root/webkit/glue
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-09 21:11:15 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-09 21:11:15 +0000
commit07601687753bd474080679bd49f1c0cad5ed6ada (patch)
tree7f3cd0c80f453525d76af78666f68aec5668ebfb /webkit/glue
parentd15e6321d0d8ab1b8b8eb3a240dc6944c0ddec7d (diff)
downloadchromium_src-07601687753bd474080679bd49f1c0cad5ed6ada.zip
chromium_src-07601687753bd474080679bd49f1c0cad5ed6ada.tar.gz
chromium_src-07601687753bd474080679bd49f1c0cad5ed6ada.tar.bz2
linux: search Chrome-specific plugin directories before Mozilla
As discussed in http://groups.google.com/group/chromium-dev/browse_thread/thread/7a70e5fcbac786a9 Review URL: http://codereview.chromium.org/195044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25783 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r--webkit/glue/plugins/plugin_list_linux.cc22
1 files changed, 14 insertions, 8 deletions
diff --git a/webkit/glue/plugins/plugin_list_linux.cc b/webkit/glue/plugins/plugin_list_linux.cc
index 41c8c43..b09d30c 100644
--- a/webkit/glue/plugins/plugin_list_linux.cc
+++ b/webkit/glue/plugins/plugin_list_linux.cc
@@ -50,6 +50,19 @@ void PluginList::PlatformInit() {
}
void PluginList::GetPluginDirectories(std::vector<FilePath>* plugin_dirs) {
+ // See http://groups.google.com/group/chromium-dev/browse_thread/thread/7a70e5fcbac786a9
+ // for discussion.
+ // We first consult Chrome-specific dirs, then fall back on the logic
+ // Mozilla uses.
+
+ // TODO(evanm): maybe consult our own plugins dir, like
+ // ~/.config/chromium/Plugins?
+
+ // The Chrome binary dir + "plugins/".
+ FilePath dir;
+ PathService::Get(base::DIR_EXE, &dir);
+ plugin_dirs->push_back(dir.Append("plugins"));
+
// Mozilla code to reference:
// http://mxr.mozilla.org/firefox/ident?i=NS_APP_PLUGINS_DIR_LIST
// and tens of accompanying files (mxr is very helpful).
@@ -70,15 +83,8 @@ void PluginList::GetPluginDirectories(std::vector<FilePath>* plugin_dirs) {
const char* home = getenv("HOME");
if (home)
plugin_dirs->push_back(FilePath(home).Append(".mozilla/plugins"));
- // TODO(evanm): maybe consult our own plugins dir, like
- // ~/.config/chromium/Plugins?
-
- // 3) NS_APP_PLUGINS_DIR: the binary dir + "plugins/".
- FilePath dir;
- PathService::Get(base::DIR_EXE, &dir);
- plugin_dirs->push_back(dir.Append("plugins"));
- // 4) NS_SYSTEM_PLUGINS_DIR:
+ // 3) NS_SYSTEM_PLUGINS_DIR:
// This varies across different versions of Firefox, so check 'em all.
plugin_dirs->push_back(FilePath("/usr/lib/mozilla/plugins"));
plugin_dirs->push_back(FilePath("/usr/lib/firefox/plugins"));