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

Unified Diff: chromecast/base/metrics/cast_metrics_helper.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 | « chrome/browser/ui/webui/about_ui.cc ('k') | chromecast/net/net_util_cast.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/base/metrics/cast_metrics_helper.cc
diff --git a/chromecast/base/metrics/cast_metrics_helper.cc b/chromecast/base/metrics/cast_metrics_helper.cc
index 9a6cdfd3051b76b663ba7509af4f1e408b1ad454..89c3d008e33aa92012aff2d329d7f7050cf24fb2 100644
--- a/chromecast/base/metrics/cast_metrics_helper.cc
+++ b/chromecast/base/metrics/cast_metrics_helper.cc
@@ -54,8 +54,9 @@ bool CastMetricsHelper::DecodeAppInfoFromMetricsName(
if (metrics_name.find(kMetricsNameAppInfoDelimiter) == std::string::npos)
return false;
- std::vector<std::string> tokens;
- base::SplitString(metrics_name, kMetricsNameAppInfoDelimiter, &tokens);
+ std::vector<std::string> tokens = base::SplitString(
+ metrics_name, std::string(1, kMetricsNameAppInfoDelimiter),
+ base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
DCHECK_EQ(tokens.size(), 4u);
// The order of tokens should match EncodeAppInfoIntoMetricsName().
*action_name = tokens[0];
« no previous file with comments | « chrome/browser/ui/webui/about_ui.cc ('k') | chromecast/net/net_util_cast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698