diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-19 23:27:24 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-19 23:27:24 +0000 |
commit | 1703df2515eb39b3389465d3124878c006376b5b (patch) | |
tree | 85bba3b436a279ddbc34d59a2a226e7f34b5ce0c /webkit/glue/plugins/plugin_list.h | |
parent | 740cdea3ee2838d49a1589c07668c6e88251c2f6 (diff) | |
download | chromium_src-1703df2515eb39b3389465d3124878c006376b5b.zip chromium_src-1703df2515eb39b3389465d3124878c006376b5b.tar.gz chromium_src-1703df2515eb39b3389465d3124878c006376b5b.tar.bz2 |
Don't attempt to load a failed plugin twice.
We keep track of which plugins we've already considered loading,
and skip them if we encounter them again. This situation is common
on Linux where people have many different symlinks pointing to the
same plugin.
BUG=38764
TEST=See bug for bad output without this patch; output with this patch is now good.
Review URL: http://codereview.chromium.org/1149005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42170 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/plugins/plugin_list.h')
-rw-r--r-- | webkit/glue/plugins/plugin_list.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/webkit/glue/plugins/plugin_list.h b/webkit/glue/plugins/plugin_list.h index c920397..0017399 100644 --- a/webkit/glue/plugins/plugin_list.h +++ b/webkit/glue/plugins/plugin_list.h @@ -7,6 +7,7 @@ #include <string> #include <vector> +#include <set> #include "base/basictypes.h" #include "base/file_path.h" @@ -143,9 +144,13 @@ class PluginList { // Load all plugins from the default plugins directory void LoadPlugins(bool refresh); - // Load all plugins from a specific directory + // Load all plugins from a specific directory. + // |plugins| is updated with loaded plugin information. + // |visited_plugins| is updated with paths to all plugins that were considered + // (including those we didn't load) void LoadPluginsFromDir(const FilePath& path, - std::vector<WebPluginInfo>* plugins); + std::vector<WebPluginInfo>* plugins, + std::set<FilePath>* visited_plugins); // Returns true if we should load the given plugin, or false otherwise. // plugins is the list of plugins we have crawled in the current plugin |