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

Unified Diff: tools/gn/runtime_deps.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/input_conversion.cc ('k') | tools/gn/standard_out.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/runtime_deps.cc
diff --git a/tools/gn/runtime_deps.cc b/tools/gn/runtime_deps.cc
index e905d7ca45d54227be4e12fcd928883857d2ccf0..f6441e8cd113b4ddd9ac96ec12e40904a782ba36 100644
--- a/tools/gn/runtime_deps.cc
+++ b/tools/gn/runtime_deps.cc
@@ -241,12 +241,10 @@ bool WriteRuntimeDepsFilesIfNecessary(const Builder& builder, Err* err) {
}
load_trace.Done();
- std::vector<std::string> lines;
- base::SplitString(list_contents, '\n', &lines);
-
SourceDir root_dir("//");
Label default_toolchain_label = builder.loader()->GetDefaultToolchain();
- for (const auto& line : lines) {
+ for (const auto& line : base::SplitString(
+ list_contents, "\n", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL)) {
if (line.empty())
continue;
Label label = Label::Resolve(root_dir, default_toolchain_label,
« no previous file with comments | « tools/gn/input_conversion.cc ('k') | tools/gn/standard_out.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698