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

Unified Diff: chrome/browser/metrics/thread_watcher.cc

Issue 1240183002: Update SplitString calls in chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
Index: chrome/browser/metrics/thread_watcher.cc
diff --git a/chrome/browser/metrics/thread_watcher.cc b/chrome/browser/metrics/thread_watcher.cc
index 12e04bf62c0cc7bc6bc66fb5fdeb4580eb534046..370fc9c013f17d098e5ba64d2f9f9be9b257410f 100644
--- a/chrome/browser/metrics/thread_watcher.cc
+++ b/chrome/browser/metrics/thread_watcher.cc
@@ -492,11 +492,10 @@ void ThreadWatcherList::ParseCommandLineCrashOnHangThreads(
uint32 default_crash_seconds,
CrashOnHangThreadMap* crash_on_hang_threads) {
base::StringTokenizer tokens(crash_on_hang_thread_names, ",");
- std::vector<std::string> values;
while (tokens.GetNext()) {
- const std::string& token = tokens.token();
- base::SplitString(token, ':', &values);
- std::string thread_name = values[0];
+ std::vector<base::StringPiece> values = base::SplitStringPiece(
+ tokens.token_piece(), ":", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
+ std::string thread_name = values[0].as_string();
uint32 live_threads_threshold = default_live_threads_threshold;
uint32 crash_seconds = default_crash_seconds;

Powered by Google App Engine
This is Rietveld 408576698