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

Unified Diff: base/test/test_reg_util_win.cc

Issue 1197243004: Replace some Tokenize calls with SplitString. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix android Created 5 years, 6 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 | « base/strings/string_util.h ('k') | base/trace_event/trace_event_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/test_reg_util_win.cc
diff --git a/base/test/test_reg_util_win.cc b/base/test/test_reg_util_win.cc
index e3b1ffc90b048d641b177a2ca63993aa408f5354..a7d07f7ab2c617a86c7e33297f70c63d83ab4841 100644
--- a/base/test/test_reg_util_win.cc
+++ b/base/test/test_reg_util_win.cc
@@ -7,6 +7,7 @@
#include "base/guid.h"
#include "base/logging.h"
#include "base/strings/string_number_conversions.h"
+#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -32,8 +33,10 @@ void DeleteStaleTestKeys(const base::Time& now,
test_key_root.c_str());
for (; iterator_test_root_key.Valid(); ++iterator_test_root_key) {
base::string16 key_name = iterator_test_root_key.Name();
- std::vector<base::string16> tokens;
- if (!Tokenize(key_name, base::string16(kTimestampDelimiter), &tokens))
+ std::vector<base::string16> tokens = base::SplitString(
+ key_name, kTimestampDelimiter, base::KEEP_WHITESPACE,
+ base::SPLIT_WANT_NONEMPTY);
+ if (tokens.empty())
continue;
int64 key_name_as_number = 0;
« no previous file with comments | « base/strings/string_util.h ('k') | base/trace_event/trace_event_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698