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

Unified Diff: tools/gn/standard_out.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 | « tools/gn/runtime_deps.cc ('k') | tools/ipc_fuzzer/fuzzer/fuzzer_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/standard_out.cc
diff --git a/tools/gn/standard_out.cc b/tools/gn/standard_out.cc
index 1ca74a6089adc3f890fadbd85042467a9038a06d..6d3960e6f4863b418cc333c92fbeb527c9a5511d 100644
--- a/tools/gn/standard_out.cc
+++ b/tools/gn/standard_out.cc
@@ -204,12 +204,10 @@ void PrintShortHelp(const std::string& line) {
void PrintLongHelp(const std::string& text) {
EnsureInitialized();
- std::vector<std::string> lines;
- base::SplitStringDontTrim(text, '\n', &lines);
-
bool first_header = true;
bool in_body = false;
- for (const auto& line : lines) {
+ for (const std::string& line : base::SplitString(
+ text, "\n", base::KEEP_WHITESPACE, base::SPLIT_WANT_ALL)) {
// Check for a heading line.
if (!line.empty() && line[0] != ' ') {
if (is_markdown) {
« no previous file with comments | « tools/gn/runtime_deps.cc ('k') | tools/ipc_fuzzer/fuzzer/fuzzer_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698