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

Unified Diff: chrome/browser/ui/cocoa/content_setting_bubble_cocoa.mm

Issue 5516004: Clean up PluginGroup and related code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/content_setting_bubble_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/content_setting_bubble_cocoa.mm b/chrome/browser/ui/cocoa/content_setting_bubble_cocoa.mm
index 26c38279652c04986d242431bc428dccb19c1e21..4ac68c0173549eeb89849ff7cf615e57a9dcdeec 100644
--- a/chrome/browser/ui/cocoa/content_setting_bubble_cocoa.mm
+++ b/chrome/browser/ui/cocoa/content_setting_bubble_cocoa.mm
@@ -242,12 +242,9 @@ NSTextField* LabelWithFrame(NSString* text, const NSRect& frame) {
} else {
for (std::set<std::string>::iterator it = plugins.begin();
it != plugins.end(); ++it) {
- NSString* name;
- NPAPI::PluginList::PluginMap groups;
- NPAPI::PluginList::Singleton()->GetPluginGroups(false, &groups);
- if (groups.find(*it) != groups.end())
- name = base::SysUTF16ToNSString(groups[*it]->GetGroupName());
- else
+ NSString* name = SysUTF16ToNSString(
+ NPAPI::PluginList::Singleton()->GetPluginGroupName(*it));
+ if ([name length] == 0)
name = base::SysUTF8ToNSString(*it);
[pluginArray addObject:name];
}

Powered by Google App Engine
This is Rietveld 408576698