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

Unified Diff: chrome/test/chromedriver/net/adb_client_socket.cc

Issue 2136453004: Reland of place string::find(prefix) == 0 pattern with base::StartsWith(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « chrome/browser/ui/find_bar/find_bar_controller.cc ('k') | chrome/test/chromedriver/session_commands.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/net/adb_client_socket.cc
diff --git a/chrome/test/chromedriver/net/adb_client_socket.cc b/chrome/test/chromedriver/net/adb_client_socket.cc
index 0a398acf8d3cdc0928d17bb95e6c203529058ffc..9a5a672c6bc7e69fc06f35237c67cd837b01f100 100644
--- a/chrome/test/chromedriver/net/adb_client_socket.cc
+++ b/chrome/test/chromedriver/net/adb_client_socket.cc
@@ -271,7 +271,8 @@
bool is_void = current_query_ < queries_.size() - 1;
// The |shell| command is a special case because it is the only command that
// doesn't include a length at the beginning of the data stream.
- bool has_length = query.find("shell:") != 0;
+ bool has_length =
+ !base::StartsWith(query, "shell:", base::CompareCase::SENSITIVE);
SendCommand(query, is_void, has_length,
base::Bind(&AdbQuerySocket::OnResponse, base::Unretained(this)));
}
« no previous file with comments | « chrome/browser/ui/find_bar/find_bar_controller.cc ('k') | chrome/test/chromedriver/session_commands.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698