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

Unified Diff: chrome/browser/devtools/device/adb/adb_client_socket.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/devtools/device/adb/adb_client_socket.cc
diff --git a/chrome/browser/devtools/device/adb/adb_client_socket.cc b/chrome/browser/devtools/device/adb/adb_client_socket.cc
index 41b3c9bed471fec8df79856ee034c20ebdd4fc84..0a40ee1eaed270e76770225285fd5edeeb43b6aa 100644
--- a/chrome/browser/devtools/device/adb/adb_client_socket.cc
+++ b/chrome/browser/devtools/device/adb/adb_client_socket.cc
@@ -7,6 +7,7 @@
#include "base/bind.h"
#include "base/compiler_specific.h"
#include "base/strings/string_number_conversions.h"
+#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "net/base/net_errors.h"
@@ -95,7 +96,9 @@ class AdbQuerySocket : AdbClientSocket {
: AdbClientSocket(port),
current_query_(0),
callback_(callback) {
- if (Tokenize(query, "|", &queries_) == 0) {
+ queries_ = base::SplitString(query, "|", base::KEEP_WHITESPACE,
+ base::SPLIT_WANT_NONEMPTY);
+ if (queries_.empty()) {
CheckNetResultOrDie(net::ERR_INVALID_ARGUMENT);
return;
}

Powered by Google App Engine
This is Rietveld 408576698