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

Unified Diff: content/common/pepper_plugin_list.cc

Issue 1821103002: Migrate a bunch of LayoutTests from NPAPI to PPAPI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_open-and-close-window-with-plugin
Patch Set: rebase; fix expectations for plugin-initiate-popup-window-expected Created 4 years, 9 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 | « no previous file | content/public/test/ppapi_test_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/pepper_plugin_list.cc
diff --git a/content/common/pepper_plugin_list.cc b/content/common/pepper_plugin_list.cc
index ea24ff7eb9768efa999e163f86f37d4559e8fa8a..610670e20b26ec4dcbe0d7f0c8c6691f3c2cddee 100644
--- a/content/common/pepper_plugin_list.cc
+++ b/content/common/pepper_plugin_list.cc
@@ -54,7 +54,8 @@ void ComputePluginsFromCommandLine(std::vector<PepperPluginInfo>* plugins) {
// plugin-entry =
// <file-path> +
// ["#" + <name> + ["#" + <description> + ["#" + <version>]]] +
- // *1( LWS + ";" + LWS + <mime-type> )
+ // *1( LWS + ";" + LWS + <mime-type-data> )
+ // mime-type-data = <mime-type> + [ LWS + "#" + LWS + <extension> ]
std::vector<std::string> modules = base::SplitString(
value, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
@@ -105,8 +106,14 @@ void ComputePluginsFromCommandLine(std::vector<PepperPluginInfo>* plugins) {
if (name_parts.size() > 3)
plugin.version = name_parts[3];
for (size_t j = 1; j < parts.size(); ++j) {
- WebPluginMimeType mime_type(parts[j],
- std::string(),
+ std::vector<std::string> mime_parts = base::SplitString(
+ parts[j], "#", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
+ DCHECK_GE(mime_parts.size(), 1u);
+ std::string mime_extension;
+ if (mime_parts.size() > 1)
+ mime_extension = mime_parts[1];
+ WebPluginMimeType mime_type(mime_parts[0],
+ mime_extension,
plugin.description);
plugin.mime_types.push_back(mime_type);
}
« no previous file with comments | « no previous file | content/public/test/ppapi_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698