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

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

Issue 2695883003: Change uses of base::JoinString to pass StringPieces where possible. (Closed)
Patch Set: Remove dependency CL. Created 3 years, 9 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/feature_list_unittest.cc ('k') | base/trace_event/trace_log.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 1c4a66337c9506768d049967f0f248dfbee400d9..eb9e3699d6dd59cf2f3a47020e3107d4bb3cd1f1 100644
--- a/base/test/launcher/test_launcher.cc
+++ b/base/test/launcher/test_launcher.cc
@@ -27,6 +27,7 @@
#include "base/single_thread_task_runner.h"
#include "base/strings/pattern.h"
#include "base/strings/string_number_conversions.h"
+#include "base/strings/string_piece.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/stringize_macros.h"
@@ -615,9 +616,9 @@ void TestLauncher::OnTestFinished(const TestResult& original_result) {
<< ": " << print_test_stdio;
}
if (print_snippet) {
- std::vector<std::string> snippet_lines = SplitString(
- result.output_snippet, "\n", base::KEEP_WHITESPACE,
- base::SPLIT_WANT_ALL);
+ std::vector<base::StringPiece> snippet_lines =
+ SplitStringPiece(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(
« no previous file with comments | « base/feature_list_unittest.cc ('k') | base/trace_event/trace_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698