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

Unified Diff: net/tools/gdig/gdig.cc

Issue 1215933004: New new versions of Starts/EndsWith and SplitString in net (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@starts_with
Patch Set: Created 5 years, 5 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 | « net/tools/flip_server/loadtime_measurement.h ('k') | net/tools/net_watcher/net_watcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/gdig/gdig.cc
diff --git a/net/tools/gdig/gdig.cc b/net/tools/gdig/gdig.cc
index 634c3979b5fa6bfb250375b2b716ea0169fe65be..cc490cd945d2d615c0af46793a1bc98c4380d88a 100644
--- a/net/tools/gdig/gdig.cc
+++ b/net/tools/gdig/gdig.cc
@@ -133,15 +133,15 @@ bool LoadReplayLog(const base::FilePath& file_path, ReplayLog* replay_log) {
std::string replay_log_contents;
base::RemoveChars(original_replay_log_contents, "\r", &replay_log_contents);
- std::vector<std::string> lines;
- base::SplitString(replay_log_contents, '\n', &lines);
+ std::vector<std::string> lines = base::SplitString(
+ replay_log_contents, "\n", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
base::TimeDelta previous_delta;
bool bad_parse = false;
for (unsigned i = 0; i < lines.size(); ++i) {
if (lines[i].empty())
continue;
- std::vector<std::string> time_and_name;
- base::SplitString(lines[i], ' ', &time_and_name);
+ std::vector<std::string> time_and_name = base::SplitString(
+ lines[i], " ", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
if (time_and_name.size() != 2) {
fprintf(
stderr,
« no previous file with comments | « net/tools/flip_server/loadtime_measurement.h ('k') | net/tools/net_watcher/net_watcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698