summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorderat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-26 02:06:33 +0000
committerderat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-26 02:06:33 +0000
commit5a50cf4aa4340d6674ffd6e7ef4f2dfc9b06ee8f (patch)
tree9bc78ab3aea37c059359f1a21b647012c5eb1293 /webkit
parent4a2e88b5a5a3025f54cde74d508cbacfcea7bf30 (diff)
downloadchromium_src-5a50cf4aa4340d6674ffd6e7ef4f2dfc9b06ee8f.zip
chromium_src-5a50cf4aa4340d6674ffd6e7ef4f2dfc9b06ee8f.tar.gz
chromium_src-5a50cf4aa4340d6674ffd6e7ef4f2dfc9b06ee8f.tar.bz2
chromeos: Only look for plugins in Chrome's /opt directory.
Per discussion with Zelidrag, Chrome OS puts all of its plugins in /opt/google/chrome/plugins, so we can skip looking anywhere outside of there. Embarrassingly, I also missed the Plugins subdirectory of the user data dir in my previous change. BUG=chromium-os:4194 TEST=tried it on a Chrome OS machine Review URL: http://codereview.chromium.org/3159040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57448 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/plugins/plugin_list.cc6
-rw-r--r--webkit/glue/plugins/plugin_list_posix.cc7
2 files changed, 10 insertions, 3 deletions
diff --git a/webkit/glue/plugins/plugin_list.cc b/webkit/glue/plugins/plugin_list.cc
index be0ec58..eeccdee 100644
--- a/webkit/glue/plugins/plugin_list.cc
+++ b/webkit/glue/plugins/plugin_list.cc
@@ -45,8 +45,11 @@ void PluginList::RefreshPlugins() {
}
void PluginList::AddExtraPluginPath(const FilePath& plugin_path) {
+ // Chrome OS only loads plugins from /opt/google/chrome/plugins.
+#if !defined(OS_CHROMEOS)
AutoLock lock(lock_);
extra_plugin_paths_.push_back(plugin_path);
+#endif
}
void PluginList::RemoveExtraPluginPath(const FilePath& plugin_path) {
@@ -59,8 +62,11 @@ void PluginList::RemoveExtraPluginPath(const FilePath& plugin_path) {
}
void PluginList::AddExtraPluginDir(const FilePath& plugin_dir) {
+ // Chrome OS only loads plugins from /opt/google/chrome/plugins.
+#if !defined(OS_CHROMEOS)
AutoLock lock(lock_);
extra_plugin_dirs_.push_back(plugin_dir);
+#endif
}
void PluginList::RegisterInternalPlugin(const PluginVersionInfo& info) {
diff --git a/webkit/glue/plugins/plugin_list_posix.cc b/webkit/glue/plugins/plugin_list_posix.cc
index 4e28d1a..176a615 100644
--- a/webkit/glue/plugins/plugin_list_posix.cc
+++ b/webkit/glue/plugins/plugin_list_posix.cc
@@ -121,6 +121,8 @@ void PluginList::GetPluginDirectories(std::vector<FilePath>* plugin_dirs) {
PathService::Get(base::DIR_EXE, &dir);
plugin_dirs->push_back(dir.Append("plugins"));
+ // Chrome OS only loads plugins from /opt/google/chrome/plugins.
+#if !defined(OS_CHROMEOS)
// 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).
@@ -135,14 +137,12 @@ void PluginList::GetPluginDirectories(std::vector<FilePath>* plugin_dirs) {
plugin_dirs->push_back(FilePath(paths[i]));
}
-#if !defined(OS_CHROMEOS)
// 2) NS_USER_PLUGINS_DIR: ~/.mozilla/plugins.
// This is a de-facto standard, so even though we're not Mozilla, let's
// look in there too.
FilePath home = file_util::GetHomeDir();
if (!home.empty())
plugin_dirs->push_back(home.Append(".mozilla/plugins"));
-#endif
// 3) NS_SYSTEM_PLUGINS_DIR:
// This varies across different browsers and versions, so check 'em all.
@@ -158,7 +158,8 @@ void PluginList::GetPluginDirectories(std::vector<FilePath>* plugin_dirs) {
plugin_dirs->push_back(FilePath("/usr/lib64/mozilla/plugins"));
plugin_dirs->push_back(FilePath("/usr/lib64/firefox/plugins"));
plugin_dirs->push_back(FilePath("/usr/lib64/xulrunner-addons/plugins"));
-#endif
+#endif // defined(ARCH_CPU_64_BITS)
+#endif // !defined(OS_CHROMEOS)
}
void PluginList::LoadPluginsFromDir(const FilePath& dir_path,