Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1759)

Unified Diff: webkit/glue/plugins/plugin_list.cc

Issue 208026: Fix registration of internal plugins broken by rev 23501... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/plugins/plugin_list.cc
===================================================================
--- webkit/glue/plugins/plugin_list.cc (revision 26592)
+++ webkit/glue/plugins/plugin_list.cc (working copy)
@@ -141,6 +141,7 @@
// other methods if they're called on other threads.
std::vector<FilePath> extra_plugin_paths;
std::vector<FilePath> extra_plugin_dirs;
+ std::vector<PluginVersionInfo> internal_plugins;
{
AutoLock lock(lock_);
if (plugins_loaded_ && !refresh)
@@ -148,6 +149,7 @@
extra_plugin_paths = extra_plugin_paths_;
extra_plugin_dirs = extra_plugin_dirs_;
+ internal_plugins = internal_plugins_;
}
base::TimeTicks start_time = base::TimeTicks::Now();
@@ -157,6 +159,15 @@
std::vector<FilePath> directories_to_scan;
GetPluginDirectories(&directories_to_scan);
+ // Load internal plugins first so that, if both an internal plugin and a
+ // "discovered" plugin want to handle the same type, the internal plugin
+ // will have precedence.
+ for (size_t i = 0; i < internal_plugins.size(); ++i) {
+ if (internal_plugins[i].path.value() == kDefaultPluginLibraryName)
+ continue;
+ LoadPlugin(internal_plugins[i].path, &new_plugins);
+ }
+
for (size_t i = 0; i < extra_plugin_paths.size(); ++i)
LoadPlugin(extra_plugin_paths[i], &new_plugins);
@@ -168,6 +179,7 @@
LoadPluginsFromDir(directories_to_scan[i], &new_plugins);
}
+ // Load the default plugin last.
if (webkit_glue::IsDefaultPluginEnabled())
LoadPlugin(FilePath(kDefaultPluginLibraryName), &new_plugins);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698