summaryrefslogtreecommitdiffstats
path: root/chrome/browser/metrics/thread_watcher.cc
diff options
context:
space:
mode:
authorbrettw <brettw@chromium.org>2015-07-21 14:37:38 -0700
committerCommit bot <commit-bot@chromium.org>2015-07-21 21:38:12 +0000
commitc6f82b158f374c172a46326699f03d97777faa8e (patch)
treec96472fa185ca20b22fad773cd195689e4097894 /chrome/browser/metrics/thread_watcher.cc
parentdb484c3eff68c46ddf1530dd60441dba4614cb5c (diff)
downloadchromium_src-c6f82b158f374c172a46326699f03d97777faa8e.zip
chromium_src-c6f82b158f374c172a46326699f03d97777faa8e.tar.gz
chromium_src-c6f82b158f374c172a46326699f03d97777faa8e.tar.bz2
Update SplitString calls in chrome.
In many places that iterated over the results, the code was changed to use a range-based for loop over the result of the SplitStirng call. Review URL: https://codereview.chromium.org/1240183002 Cr-Commit-Position: refs/heads/master@{#339753}
Diffstat (limited to 'chrome/browser/metrics/thread_watcher.cc')
-rw-r--r--chrome/browser/metrics/thread_watcher.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/chrome/browser/metrics/thread_watcher.cc b/chrome/browser/metrics/thread_watcher.cc
index 12e04bf..370fc9c 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;