Chromium Code Reviews| Index: webkit/glue/plugins/plugin_list_posix.cc |
| diff --git a/webkit/glue/plugins/plugin_list_posix.cc b/webkit/glue/plugins/plugin_list_posix.cc |
| index 654c0c5792fc09141be47bb51ffdef7cdc8766e4..6a9c5fd4f30018357b3b926b459a0bf5fcd4c92a 100644 |
| --- a/webkit/glue/plugins/plugin_list_posix.cc |
| +++ b/webkit/glue/plugins/plugin_list_posix.cc |
| @@ -247,14 +247,16 @@ bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info, |
| << info.path.value() << " is undesirable."; |
| // See if we have a better version of this plugin. |
| - for (size_t i = 0; i < plugins->size(); ++i) { |
| - if (plugins->at(i).name == info.name && |
| - !IsUndesirablePlugin(plugins->at(i))) { |
| + for (std::vector<WebPluginInfo>::iterator it = plugins->begin(); |
|
jam
2010/12/17 19:14:45
please leave as before
pastarmovj
2010/12/20 19:57:37
Done.
|
| + it != plugins->end(); |
| + ++it) { |
| + if (it->name == info.name && |
| + !IsUndesirablePlugin(*it)) { |
| // Skip the current undesirable one so we can use the better one |
| // we just found. |
| LOG_IF(ERROR, PluginList::DebugPluginLoading()) |
| << "Skipping " << info.path.value() << ", preferring " |
| - << plugins->at(i).path.value(); |
| + << it->path.value(); |
| return false; |
| } |
| } |