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

Unified Diff: chrome/browser/ui/views/content_setting_bubble_contents.cc

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/views/content_setting_bubble_contents.cc
diff --git a/chrome/browser/ui/views/content_setting_bubble_contents.cc b/chrome/browser/ui/views/content_setting_bubble_contents.cc
index 48e82aaff6862f283f0ecf1bd03eb2c8be5c9b35..d2954ebf0152cf71626ccaf1327e9479a3f0af7b 100644
--- a/chrome/browser/ui/views/content_setting_bubble_contents.cc
+++ b/chrome/browser/ui/views/content_setting_bubble_contents.cc
@@ -229,12 +229,9 @@ void ContentSettingBubbleContents::InitControlLayout() {
if (!plugins.empty()) {
for (std::set<std::string>::const_iterator it = plugins.begin();
it != plugins.end(); ++it) {
- std::wstring name;
- NPAPI::PluginList::PluginMap groups;
- NPAPI::PluginList::Singleton()->GetPluginGroups(false, &groups);
- if (groups.find(*it) != groups.end())
- name = UTF16ToWide(groups[*it]->GetGroupName());
- else
+ std::wstring name = UTF16ToWide(
+ NPAPI::PluginList::Singleton()->GetPluginGroupName(*it));
+ if (name.empty())
name = UTF8ToWide(*it);
layout->StartRow(0, single_column_set_id);
layout->AddView(new views::Label(name));

Powered by Google App Engine
This is Rietveld 408576698