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

Unified Diff: chrome/browser/gtk/content_setting_bubble_gtk.cc

Issue 5516004: Clean up PluginGroup and related code. (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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/gtk/content_setting_bubble_gtk.cc
diff --git a/chrome/browser/gtk/content_setting_bubble_gtk.cc b/chrome/browser/gtk/content_setting_bubble_gtk.cc
index b626c84ada26ea7115e8effa1bd4aee189291379..ec41c57e7094e9cd6636fdd49656e36c6cd140e8 100644
--- a/chrome/browser/gtk/content_setting_bubble_gtk.cc
+++ b/chrome/browser/gtk/content_setting_bubble_gtk.cc
@@ -4,6 +4,10 @@
#include "chrome/browser/gtk/content_setting_bubble_gtk.h"
+#include <set>
+#include <string>
+#include <vector>
+
#include "app/l10n_util.h"
#include "app/text_elider.h"
#include "base/i18n/rtl.h"
@@ -104,12 +108,9 @@ void ContentSettingBubbleGtk::BuildBubble() {
for (std::set<std::string>::const_iterator it = plugins.begin();
it != plugins.end(); ++it) {
- std::string name;
- NPAPI::PluginList::PluginMap groups;
- NPAPI::PluginList::Singleton()->GetPluginGroups(false, &groups);
- if (groups.find(*it) != groups.end())
- name = UTF16ToUTF8(groups[*it]->GetGroupName());
- else
+ std::string name = UTF16ToUTF8(
+ NPAPI::PluginList::Singleton()->GetPluginGroupName(*it));
+ if (name.empty())
name = *it;
GtkWidget* label = gtk_label_new(BuildElidedText(name).c_str());

Powered by Google App Engine
This is Rietveld 408576698