Index: webkit/plugins/npapi/plugin_lib_win.cc |
diff --git a/webkit/plugins/npapi/plugin_lib_win.cc b/webkit/plugins/npapi/plugin_lib_win.cc |
index 29d014f08cb045501a449b09cd6d68ed8c4b05f7..049dc9f04845e756e5b1621b7f1ff438ef0167ee 100644 |
--- a/webkit/plugins/npapi/plugin_lib_win.cc |
+++ b/webkit/plugins/npapi/plugin_lib_win.cc |
@@ -32,16 +32,25 @@ bool PluginLib::ReadWebPluginInfo(const FilePath &filename, |
FileVersionInfoWin* version_info_win = |
static_cast<FileVersionInfoWin*>(version_info.get()); |
- PluginVersionInfo pvi; |
- pvi.mime_types = version_info_win->GetStringValue(L"MIMEType"); |
- pvi.file_extensions = version_info_win->GetStringValue(L"FileExtents"); |
- pvi.type_descriptions = version_info_win->GetStringValue(L"FileOpenName"); |
- pvi.product_name = version_info->product_name(); |
- pvi.file_description = version_info->file_description(); |
- pvi.file_version = version_info->file_version(); |
- pvi.path = filename; |
- |
- return PluginList::CreateWebPluginInfo(pvi, info); |
+ |
+ info->name = version_info->product_name(); |
+ info->desc = version_info->file_description(); |
+ info->version = version_info->file_version(); |
+ info->path = filename; |
+ info->enabled = true; |
+ |
+ // TODO(evan): Move the ParseMimeTypes code inline once Pepper is updated. |
+ if (!PluginList::ParseMimeTypes( |
+ UTF16ToASCII(version_info_win->GetStringValue(L"MIMEType")), |
+ UTF16ToASCII(version_info_win->GetStringValue(L"FileExtents")), |
+ version_info_win->GetStringValue(L"FileOpenName"), |
+ &info->mime_types)) { |
+ LOG_IF(ERROR, PluginList::DebugPluginLoading()) |
+ << "Plugin " << info->name << " has bad MIME types, skipping"; |
+ return false; |
+ } |
+ |
+ return true; |
} |
} // namespace npapi |