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

Unified Diff: chrome/browser/plugin_service.cc

Issue 6162008: plugins: drop PluginVersionInfo for internal plugins (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 9 years, 11 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
« no previous file with comments | « chrome/browser/chromeos/gview_request_interceptor_unittest.cc ('k') | webkit/glue/plugins/plugin_list.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/plugin_service.cc
diff --git a/chrome/browser/plugin_service.cc b/chrome/browser/plugin_service.cc
index 1f178d9b327a94d7d3ca57653648bef2e7bf81e2..863e2bfbb0567d0284031b0d45d2df131a697b2b 100644
--- a/chrome/browser/plugin_service.cc
+++ b/chrome/browser/plugin_service.cc
@@ -408,20 +408,25 @@ void PluginService::RegisterPepperPlugins() {
std::vector<PepperPluginInfo> plugins;
PepperPluginRegistry::GetList(&plugins);
for (size_t i = 0; i < plugins.size(); ++i) {
- webkit::npapi::PluginVersionInfo info;
+ webkit::npapi::WebPluginInfo info;
info.path = plugins[i].path;
- info.product_name = plugins[i].name.empty() ?
- plugins[i].path.BaseName().ToWStringHack() :
- ASCIIToWide(plugins[i].name);
- info.file_description = ASCIIToWide(plugins[i].description);
- info.file_extensions = ASCIIToWide(plugins[i].file_extensions);
- info.file_description = ASCIIToWide(plugins[i].type_descriptions);
- info.mime_types = ASCIIToWide(JoinString(plugins[i].mime_types, '|'));
-
- // These NPAPI entry points will never be called. TODO(darin): Come up
- // with a cleaner way to register pepper plugins with the NPAPI PluginList,
- // or perhaps refactor the PluginList to be less specific to NPAPI.
- memset(&info.entry_points, 0, sizeof(info.entry_points));
+ info.name = plugins[i].name.empty() ?
+ WideToUTF16(plugins[i].path.BaseName().ToWStringHack()) :
+ ASCIIToUTF16(plugins[i].name);
+ info.desc = ASCIIToUTF16(plugins[i].description);
+ info.enabled = true;
+
+ // TODO(evan): Pepper shouldn't require us to parse strings to get
+ // the list of mime types out.
+ if (!webkit::npapi::PluginList::ParseMimeTypes(
+ JoinString(plugins[i].mime_types, '|'),
+ plugins[i].file_extensions,
+ ASCIIToUTF16(plugins[i].type_descriptions),
+ &info.mime_types)) {
+ LOG(ERROR) << "Error parsing mime types for "
+ << plugins[i].path.ToWStringHack();
+ return;
+ }
webkit::npapi::PluginList::Singleton()->RegisterInternalPlugin(info);
}
« no previous file with comments | « chrome/browser/chromeos/gview_request_interceptor_unittest.cc ('k') | webkit/glue/plugins/plugin_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698