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

Unified Diff: webkit/plugins/npapi/plugin_lib_win.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 | « webkit/glue/plugins/plugin_list.h ('k') | webkit/plugins/npapi/plugin_list.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « webkit/glue/plugins/plugin_list.h ('k') | webkit/plugins/npapi/plugin_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698