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

Unified Diff: mojo/runner/context.cc

Issue 1284833004: Remove remaining legacy SplitString calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « jingle/notifier/communicator/single_login_attempt.cc ('k') | mojo/runner/init.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/runner/context.cc
diff --git a/mojo/runner/context.cc b/mojo/runner/context.cc
index 39d0536973c48d12b19486658aa6ba6f5844bf9e..40c62772cdaa23706a034b7670a9624a915595ae 100644
--- a/mojo/runner/context.cc
+++ b/mojo/runner/context.cc
@@ -133,8 +133,8 @@ void InitContentHandlers(shell::ApplicationManager* manager,
base::ReplaceSubstringsAfterOffset(&handlers_spec, 0, "\\,", ",");
#endif
- std::vector<std::string> parts;
- base::SplitString(handlers_spec, ',', &parts);
+ std::vector<std::string> parts = base::SplitString(
+ handlers_spec, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
if (parts.size() % 2 != 0) {
LOG(ERROR) << "Invalid value for switch " << switches::kContentHandlers
<< ": must be a comma-separated list of mimetype/url pairs."
@@ -157,9 +157,9 @@ void InitContentHandlers(shell::ApplicationManager* manager,
void InitNativeOptions(shell::ApplicationManager* manager,
const base::CommandLine& command_line) {
- std::vector<std::string> force_in_process_url_list;
- base::SplitString(command_line.GetSwitchValueASCII(switches::kForceInProcess),
- ',', &force_in_process_url_list);
+ std::vector<std::string> force_in_process_url_list = base::SplitString(
+ command_line.GetSwitchValueASCII(switches::kForceInProcess), ",",
+ base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
for (const auto& force_in_process_url : force_in_process_url_list) {
GURL gurl(force_in_process_url);
if (!gurl.is_valid()) {
« no previous file with comments | « jingle/notifier/communicator/single_login_attempt.cc ('k') | mojo/runner/init.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698