| Index: webkit/glue/plugins/plugin_list_mac.mm
|
| diff --git a/webkit/glue/plugins/plugin_list_mac.mm b/webkit/glue/plugins/plugin_list_mac.mm
|
| index e7a23375859904c12fdb211195ce98770048a24c..67c75be06c499cae59a76cc66d1b7e279a11f262 100644
|
| --- a/webkit/glue/plugins/plugin_list_mac.mm
|
| +++ b/webkit/glue/plugins/plugin_list_mac.mm
|
| @@ -77,7 +77,7 @@ void PluginList::GetPluginDirectories(std::vector<FilePath>* plugin_dirs) {
|
| }
|
|
|
| void PluginList::LoadPluginsFromDir(const FilePath &path,
|
| - std::vector<WebPluginInfo>* plugins,
|
| + std::vector<WebPluginInfo*>* plugins,
|
| std::set<FilePath>* visited_plugins) {
|
| file_util::FileEnumerator enumerator(path,
|
| false, // not recursive
|
| @@ -90,16 +90,19 @@ void PluginList::LoadPluginsFromDir(const FilePath &path,
|
| }
|
|
|
| bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info,
|
| - std::vector<WebPluginInfo>* plugins) {
|
| + std::vector<WebPluginInfo*>* plugins) {
|
| if (IsBlacklistedPlugin(info))
|
| return false;
|
|
|
| // Hierarchy check
|
| // (we're loading plugins hierarchically from Library folders, so plugins we
|
| // encounter earlier must override plugins we encounter later)
|
| - for (size_t i = 0; i < plugins->size(); ++i) {
|
| - if ((*plugins)[i].path.BaseName() == info.path.BaseName()) {
|
| - return false; // We already have a loaded plugin higher in the hierarchy.
|
| + for (std::vector<WebPluginInfo*>::iterator it = plugins->begin();
|
| + it != plugins->end();
|
| + ++it) {
|
| + if ((*it)->path.BaseName() == info.path.BaseName()) {
|
| + // We already have a loaded plugin higher in the hierarchy.
|
| + return false;
|
| }
|
| }
|
|
|
|
|