Chromium Code Reviews| 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..5fcca5ed0b9391d06b3c3526d6ba15e3dbf95445 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> ) |
|
dcheng
2016/03/22 18:03:05
Nit: I think this should be *1, since there can on
piman
2016/03/23 05:30:24
[] actually. *1 is 1 or more. I intended to suppor
|
| 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_GT(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); |
| } |