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

Unified Diff: chrome/browser/chromeos/input_method/textinput_test_helper.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
Index: chrome/browser/chromeos/input_method/textinput_test_helper.cc
diff --git a/chrome/browser/chromeos/input_method/textinput_test_helper.cc b/chrome/browser/chromeos/input_method/textinput_test_helper.cc
index 07bedca65f42cc640175a77973602d833bc258d2..34554d263a42f6dd18080d536bc36dac92dac452 100644
--- a/chrome/browser/chromeos/input_method/textinput_test_helper.cc
+++ b/chrome/browser/chromeos/input_method/textinput_test_helper.cc
@@ -4,6 +4,7 @@
#include "ash/shell.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 "chrome/browser/chromeos/input_method/textinput_test_helper.h"
@@ -164,8 +165,9 @@ void TextInputTestHelper::WaitForSurroundingTextChanged(
bool TextInputTestHelper::ConvertRectFromString(const std::string& str,
gfx::Rect* rect) {
DCHECK(rect);
- std::vector<std::string> rect_piece;
- if (Tokenize(str, ",", &rect_piece) != 4UL)
+ std::vector<base::StringPiece> rect_piece = base::SplitStringPiece(
+ str, ",", base::KEEP_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
+ if (rect_piece.size() != 4UL)
return false;
int x, y, width, height;
if (!base::StringToInt(rect_piece[0], &x))

Powered by Google App Engine
This is Rietveld 408576698