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

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: 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/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 18118acb4a36a8f7fa4df51cc8759c174f90ccdf..3bf61456824a4462ee41c245b004f30ff1dd0e07 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());
« no previous file with comments | « no previous file | chrome/browser/mock_plugin_exceptions_table_model.h » ('j') | webkit/glue/plugins/plugin_group.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698