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

Unified Diff: base/process/process_linux.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 | « no previous file | base/process/process_metrics_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process/process_linux.cc
diff --git a/base/process/process_linux.cc b/base/process/process_linux.cc
index 6e10dd2301fb6064e4b82ec6984d089517e549d3..958ffd6dafb840792910f3c501de60bad3761aa6 100644
--- a/base/process/process_linux.cc
+++ b/base/process/process_linux.cc
@@ -102,8 +102,8 @@ bool Process::IsProcessBackgrounded() const {
if (base::ReadFileToString(
base::FilePath(StringPrintf(kProcPath, process_)),
&proc)) {
- std::vector<std::string> proc_parts;
- base::SplitString(proc, ':', &proc_parts);
+ std::vector<std::string> proc_parts = base::SplitString(
+ proc, ":", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
DCHECK_EQ(proc_parts.size(), 3u);
bool ret = proc_parts[2] == std::string(kBackground);
return ret;
« no previous file with comments | « no previous file | base/process/process_metrics_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698