OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "webkit/glue/plugins/plugin_list.h" | 5 #include "webkit/glue/plugins/plugin_list.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
604 } | 604 } |
605 | 605 |
606 void PluginList::GetPluginGroups( | 606 void PluginList::GetPluginGroups( |
607 bool load_if_necessary, | 607 bool load_if_necessary, |
608 std::vector<PluginGroup>* plugin_groups) { | 608 std::vector<PluginGroup>* plugin_groups) { |
609 if (load_if_necessary) | 609 if (load_if_necessary) |
610 LoadPlugins(false); | 610 LoadPlugins(false); |
611 plugin_groups->clear(); | 611 plugin_groups->clear(); |
612 for (PluginGroup::PluginMap::const_iterator it = plugin_groups_.begin(); | 612 for (PluginGroup::PluginMap::const_iterator it = plugin_groups_.begin(); |
613 it != plugin_groups_.end(); ++it) { | 613 it != plugin_groups_.end(); ++it) { |
614 plugin_groups->push_back(*it->second); | 614 if (!it->second->IsEmpty()) |
| 615 plugin_groups->push_back(*it->second); |
615 } | 616 } |
616 } | 617 } |
617 | 618 |
618 const PluginGroup* PluginList::GetPluginGroup( | 619 const PluginGroup* PluginList::GetPluginGroup( |
619 const WebPluginInfo& web_plugin_info) { | 620 const WebPluginInfo& web_plugin_info) { |
620 AutoLock lock(lock_); | 621 AutoLock lock(lock_); |
621 return AddToPluginGroups(web_plugin_info); | 622 return AddToPluginGroups(web_plugin_info); |
622 } | 623 } |
623 | 624 |
624 string16 PluginList::GetPluginGroupName(std::string identifier) { | 625 string16 PluginList::GetPluginGroupName(std::string identifier) { |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
771 // memory tree green. | 772 // memory tree green. |
772 #if defined(OS_POSIX) | 773 #if defined(OS_POSIX) |
773 if (RUNNING_ON_VALGRIND) { | 774 if (RUNNING_ON_VALGRIND) { |
774 STLDeleteContainerPairSecondPointers(plugin_groups_.begin(), | 775 STLDeleteContainerPairSecondPointers(plugin_groups_.begin(), |
775 plugin_groups_.end()); | 776 plugin_groups_.end()); |
776 } | 777 } |
777 #endif | 778 #endif |
778 } | 779 } |
779 | 780 |
780 } // namespace NPAPI | 781 } // namespace NPAPI |
OLD | NEW |