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

Unified Diff: components/nacl/browser/nacl_process_host.cc

Issue 1234973004: Update SplitString calls in components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes Created 5 years, 5 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
Index: components/nacl/browser/nacl_process_host.cc
diff --git a/components/nacl/browser/nacl_process_host.cc b/components/nacl/browser/nacl_process_host.cc
index cc292bfcb1028ef7a67b5b597120a988c7274f29..3e7f923e4b2b2d15521a2ed984f5f4446933d43a 100644
--- a/components/nacl/browser/nacl_process_host.cc
+++ b/components/nacl/browser/nacl_process_host.cc
@@ -109,12 +109,9 @@ void FindAddressSpace(base::ProcessHandle process,
#ifdef _DLL
bool IsInPath(const std::string& path_env_var, const std::string& dir) {
- std::vector<std::string> split;
- base::SplitString(path_env_var, ';', &split);
- for (std::vector<std::string>::const_iterator i(split.begin());
- i != split.end();
- ++i) {
- if (*i == dir)
+ for (const base::StringPiece& cur : base::SplitStringPiece(
+ path_env_var, ";", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL)) {
+ if (cur == dir)
return true;
}
return false;
@@ -558,11 +555,10 @@ void NaClProcessHost::LaunchNaClGdb() {
#else
base::CommandLine::StringType nacl_gdb =
command_line.GetSwitchValueNative(switches::kNaClGdb);
- base::CommandLine::StringVector argv;
// We don't support spaces inside arguments in --nacl-gdb switch.
- base::SplitString(nacl_gdb, static_cast<base::CommandLine::CharType>(' '),
- &argv);
- base::CommandLine cmd_line(argv);
+ base::CommandLine cmd_line(base::SplitString(
+ nacl_gdb, base::CommandLine::StringType(1, ' '),
+ base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL));
#endif
cmd_line.AppendArg("--eval-command");
base::FilePath::StringType irt_path(
« no previous file with comments | « components/metrics/serialization/serialization_utils.cc ('k') | components/nacl/renderer/ppb_nacl_private_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698