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

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

Issue 10917189: Remove PluginFinder async interface (Closed) Base URL: http://git.chromium.org/chromium/src.git@separate_finder_thread_safety
Patch Set: .. Created 8 years, 3 months 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_settings/content_setting_bubble_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm b/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm
index 51d7fb23b3b0227d2092f41a9c8b6bfadd94cadb..4d89a3c4f2bcf47270ec653be8471f9d4a964045 100644
--- a/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm
+++ b/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm
@@ -9,6 +9,8 @@
#include "base/sys_string_conversions.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/content_settings/host_content_settings_map.h"
+#include "chrome/browser/plugins/plugin_finder.h"
+#include "chrome/browser/plugins/plugin_metadata.h"
#include "chrome/browser/ui/content_settings/content_setting_bubble_model.h"
#import "chrome/browser/ui/cocoa/hyperlink_button_cell.h"
#import "chrome/browser/ui/cocoa/info_bubble_view.h"
@@ -247,11 +249,14 @@ NSTextField* LabelWithFrame(NSString* text, const NSRect& frame) {
frame.size.height -= delta;
[[self window] setFrame:frame display:NO];
} else {
+ PluginFinder* finder = PluginFinder::GetInstance();
for (std::set<std::string>::iterator it = plugins.begin();
it != plugins.end(); ++it) {
- NSString* name = SysUTF16ToNSString(
- PluginService::GetInstance()->GetPluginGroupName(*it));
- if ([name length] == 0)
+ PluginMetadata* plugin = finder->FindPluginMetadataWithIdentifier(*it);
+ NSString* name = nil;
Peter Kasting 2012/09/21 20:10:56 Nit: Or just NSString* name = plugin ? SysU
ibraaaa 2012/09/24 11:42:29 Done.
+ if (plugin)
+ name = SysUTF16ToNSString(plugin->name());
+ if (!name || [name length] == 0)
name = base::SysUTF8ToNSString(*it);
[pluginArray addObject:name];
}

Powered by Google App Engine
This is Rietveld 408576698