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

Unified Diff: content/common/pepper_plugin_list.cc

Issue 1274123003: Update SplitString calls to new form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no media changes Created 5 years, 4 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 | « content/common/gpu/media/video_encode_accelerator_unittest.cc ('k') | content/common/plugin_list.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 704c81996f8fbebfcf25e95a0c0bb542f72f805a..02fbaeebfdfaf5ab8d27de397ea8d0ba8c384332 100644
--- a/content/common/pepper_plugin_list.cc
+++ b/content/common/pepper_plugin_list.cc
@@ -52,8 +52,8 @@ void ComputePluginsFromCommandLine(std::vector<PepperPluginInfo>* plugins) {
// <file-path> +
// ["#" + <name> + ["#" + <description> + ["#" + <version>]]] +
// *1( LWS + ";" + LWS + <mime-type> )
- std::vector<std::string> modules;
- base::SplitString(value, ',', &modules);
+ std::vector<std::string> modules = base::SplitString(
+ value, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
size_t plugins_to_register = modules.size();
if (plugins_to_register > kMaxPluginsToRegisterFromCommandLine) {
@@ -64,15 +64,15 @@ void ComputePluginsFromCommandLine(std::vector<PepperPluginInfo>* plugins) {
}
for (size_t i = 0; i < plugins_to_register; ++i) {
- std::vector<std::string> parts;
- base::SplitString(modules[i], ';', &parts);
+ std::vector<std::string> parts = base::SplitString(
+ modules[i], ";", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
if (parts.size() < 2) {
DVLOG(1) << "Required mime-type not found";
continue;
}
- std::vector<std::string> name_parts;
- base::SplitString(parts[0], '#', &name_parts);
+ std::vector<std::string> name_parts = base::SplitString(
+ parts[0], "#", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
PepperPluginInfo plugin;
plugin.is_out_of_process = out_of_process;
« no previous file with comments | « content/common/gpu/media/video_encode_accelerator_unittest.cc ('k') | content/common/plugin_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698