Index: base/process/process_metrics_linux.cc |
diff --git a/base/process/process_metrics_linux.cc b/base/process/process_metrics_linux.cc |
index 47a79e51e5eb1c92e4b9bdd0cf0244eeb8fc9753..b282ff0a57a38300ded3b3c8be813ad25a2d2f22 100644 |
--- a/base/process/process_metrics_linux.cc |
+++ b/base/process/process_metrics_linux.cc |
@@ -67,8 +67,8 @@ size_t ReadProcStatusAndGetFieldAsSizeT(pid_t pid, const std::string& field) { |
const std::string& key = pairs[i].first; |
const std::string& value_str = pairs[i].second; |
if (key == field) { |
- std::vector<std::string> split_value_str; |
- SplitString(value_str, ' ', &split_value_str); |
+ std::vector<StringPiece> split_value_str = SplitStringPiece( |
+ value_str, " ", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
if (split_value_str.size() != 2 || split_value_str[1] != "kB") { |
NOTREACHED(); |
return 0; |
@@ -368,8 +368,8 @@ bool ProcessMetrics::GetWorkingSetKBytesStatm(WorkingSetKBytes* ws_usage) |
return false; |
} |
- std::vector<std::string> statm_vec; |
- SplitString(statm, ' ', &statm_vec); |
+ std::vector<StringPiece> statm_vec = SplitStringPiece( |
+ statm, " ", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
if (statm_vec.size() != 7) |
return false; // Not the format we expect. |