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

Side by Side Diff: webkit/glue/plugins/plugin_list.cc

Issue 5918003: Bugfixes for recent PluginGroup refactoring. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/glue/plugins/plugin_group_unittest.cc ('k') | webkit/glue/plugins/webplugininfo.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « webkit/glue/plugins/plugin_group_unittest.cc ('k') | webkit/glue/plugins/webplugininfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698