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

Unified Diff: chrome/browser/metrics/variations/variations_service_unittest.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/variations/variations_service_unittest.cc
diff --git a/chrome/browser/metrics/variations/variations_service_unittest.cc b/chrome/browser/metrics/variations/variations_service_unittest.cc
index d01707e99d35d79bdac6e50c531c52d36bea635d..ff08fedefc8b9a0d4d0d0a1a9c2cc9d0d8f28d65 100644
--- a/chrome/browser/metrics/variations/variations_service_unittest.cc
+++ b/chrome/browser/metrics/variations/variations_service_unittest.cc
@@ -484,9 +484,9 @@ TEST_F(VariationsServiceTest, LoadPermanentConsistencyCountry) {
if (test.pref_value_before) {
base::ListValue list_value;
- std::vector<std::string> list_components;
- base::SplitString(test.pref_value_before, ',', &list_components);
- for (const std::string& component : list_components)
+ for (const std::string& component : base::SplitString(
+ test.pref_value_before, ",",
+ base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL))
list_value.AppendString(component);
prefs.Set(prefs::kVariationsPermanentConsistencyCountry, list_value);
}
@@ -500,9 +500,9 @@ TEST_F(VariationsServiceTest, LoadPermanentConsistencyCountry) {
base::Version(test.version), seed));
base::ListValue expected_list_value;
- std::vector<std::string> list_components;
- base::SplitString(test.expected_pref_value_after, ',', &list_components);
- for (const std::string& component : list_components)
+ for (const std::string& component : base::SplitString(
+ test.expected_pref_value_after, ",",
+ base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL))
expected_list_value.AppendString(component);
EXPECT_TRUE(expected_list_value.Equals(
prefs.GetList(prefs::kVariationsPermanentConsistencyCountry)));
« no previous file with comments | « chrome/browser/metrics/thread_watcher_unittest.cc ('k') | chrome/browser/nacl_host/nacl_browser_delegate_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698