summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/content_setting_bubble_gtk.cc
diff options
context:
space:
mode:
authorbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-21 15:00:34 +0000
committerbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-21 15:00:34 +0000
commit74b8d3e4e52a6419a98ecc40b6f6710f7911726d (patch)
treee8f076d596363ea2ac0cc61831260c3d395a9436 /chrome/browser/gtk/content_setting_bubble_gtk.cc
parent0b7ba8c5a0f954e8dea8709a34a5b5f0dc40c615 (diff)
downloadchromium_src-74b8d3e4e52a6419a98ecc40b6f6710f7911726d.zip
chromium_src-74b8d3e4e52a6419a98ecc40b6f6710f7911726d.tar.gz
chromium_src-74b8d3e4e52a6419a98ecc40b6f6710f7911726d.tar.bz2
Add a unique identifier for plugin groups and use it to identify blocked plugins.
Currently we use the plugin path as identifier for per-plugin content settings, which is not stable across Chrome updates or plugin moves. The new identifier is either hardcoded (for predefined plugin groups), or the filename without path. BUG=39252 TEST=none Review URL: http://codereview.chromium.org/3384014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60054 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/content_setting_bubble_gtk.cc')
-rw-r--r--chrome/browser/gtk/content_setting_bubble_gtk.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/chrome/browser/gtk/content_setting_bubble_gtk.cc b/chrome/browser/gtk/content_setting_bubble_gtk.cc
index d9edf39..116b3a3 100644
--- a/chrome/browser/gtk/content_setting_bubble_gtk.cc
+++ b/chrome/browser/gtk/content_setting_bubble_gtk.cc
@@ -14,11 +14,13 @@
#include "chrome/browser/gtk/gtk_util.h"
#include "chrome/browser/gtk/options/content_settings_window_gtk.h"
#include "chrome/browser/host_content_settings_map.h"
+#include "chrome/browser/plugin_updater.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/common/content_settings.h"
#include "chrome/common/notification_service.h"
#include "chrome/common/notification_type.h"
+#include "chrome/common/plugin_group.h"
#include "gfx/gtk_util.h"
#include "grit/app_resources.h"
#include "grit/generated_resources.h"
@@ -87,14 +89,13 @@ void ContentSettingBubbleGtk::BuildBubble() {
for (std::set<std::string>::const_iterator it = plugins.begin();
it != plugins.end(); ++it) {
- WebPluginInfo plugin;
std::string name;
- if (NPAPI::PluginList::Singleton()->GetPluginInfoByPath(FilePath(*it),
- &plugin)) {
- name = UTF16ToUTF8(plugin.name);
- } else {
+ PluginUpdater::PluginMap groups;
+ PluginUpdater::GetPluginUpdater()->GetPluginGroups(&groups);
+ if (groups.find(*it) != groups.end())
+ name = UTF16ToUTF8(groups[*it]->GetGroupName());
+ else
name = *it;
- }
GtkWidget* label = gtk_label_new(name.c_str());
GtkWidget* label_box = gtk_hbox_new(FALSE, 0);