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

Unified Diff: base/test/launcher/test_launcher.cc

Issue 1272823003: Update SplitString calls to new form (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 | « base/process/process_metrics_linux.cc ('k') | base/trace_event/trace_config.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/launcher/test_launcher.cc
diff --git a/base/test/launcher/test_launcher.cc b/base/test/launcher/test_launcher.cc
index 29ebca7f54ae9fcacf2dfd81587d8b35db79b9ea..4cf2d1d45483cbdea20c0daa43cae6667fd5143c 100644
--- a/base/test/launcher/test_launcher.cc
+++ b/base/test/launcher/test_launcher.cc
@@ -561,8 +561,9 @@ void TestLauncher::OnTestFinished(const TestResult& result) {
<< ": " << print_test_stdio;
}
if (print_snippet) {
- std::vector<std::string> snippet_lines;
- SplitStringDontTrim(result.output_snippet, '\n', &snippet_lines);
+ std::vector<std::string> snippet_lines = SplitString(
+ result.output_snippet, "\n", base::KEEP_WHITESPACE,
+ base::SPLIT_WANT_ALL);
if (snippet_lines.size() > kOutputSnippetLinesLimit) {
size_t truncated_size = snippet_lines.size() - kOutputSnippetLinesLimit;
snippet_lines.erase(
@@ -791,8 +792,8 @@ bool TestLauncher::Init() {
return false;
}
- std::vector<std::string> filter_lines;
- SplitString(filter, '\n', &filter_lines);
+ std::vector<std::string> filter_lines = SplitString(
+ filter, "\n", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
for (size_t i = 0; i < filter_lines.size(); i++) {
if (filter_lines[i].empty())
continue;
@@ -808,13 +809,18 @@ bool TestLauncher::Init() {
std::string filter = command_line->GetSwitchValueASCII(kGTestFilterFlag);
size_t dash_pos = filter.find('-');
if (dash_pos == std::string::npos) {
- SplitString(filter, ':', &positive_test_filter_);
+ positive_test_filter_ = SplitString(
+ filter, ":", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
} else {
// Everything up to the dash.
- SplitString(filter.substr(0, dash_pos), ':', &positive_test_filter_);
+ positive_test_filter_ = SplitString(
+ filter.substr(0, dash_pos), ":", base::TRIM_WHITESPACE,
+ base::SPLIT_WANT_ALL);
// Everything after the dash.
- SplitString(filter.substr(dash_pos + 1), ':', &negative_test_filter_);
+ negative_test_filter_ = SplitString(
+ filter.substr(dash_pos + 1), ":", base::TRIM_WHITESPACE,
+ base::SPLIT_WANT_ALL);
}
}
« no previous file with comments | « base/process/process_metrics_linux.cc ('k') | base/trace_event/trace_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698