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

Unified Diff: tools/android/forwarder2/host_forwarder_main.cc

Issue 684133002: [Android] Fix gn build for instrumentation tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Follow review Created 6 years, 2 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 | « tools/android/forwarder2/forwarders_manager.cc ('k') | tools/android/forwarder2/socket.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/android/forwarder2/host_forwarder_main.cc
diff --git a/tools/android/forwarder2/host_forwarder_main.cc b/tools/android/forwarder2/host_forwarder_main.cc
index 514ad93bf3c79b5ed1a363711a0e0010ff028f59..74f3351a5e349966c3273e5080da0dcf49513c08 100644
--- a/tools/android/forwarder2/host_forwarder_main.cc
+++ b/tools/android/forwarder2/host_forwarder_main.cc
@@ -49,9 +49,6 @@ namespace {
const char kLogFilePath[] = "/tmp/host_forwarder_log";
const char kDaemonIdentifier[] = "chrome_host_forwarder_daemon";
-const char kKillServerCommand[] = "kill-server";
-const char kForwardCommand[] = "forward";
-
const int kBufSize = 256;
// Needs to be global to be able to be accessed from the signal handler.
@@ -364,14 +361,14 @@ class ClientDelegate : public Daemon::ClientDelegate {
// Daemon::ClientDelegate:
virtual void OnDaemonReady(Socket* daemon_socket) override {
// Send the forward command to the daemon.
- CHECK_EQ(command_pickle_.size(),
+ CHECK_EQ(static_cast<long>(command_pickle_.size()),
daemon_socket->WriteNumBytes(command_pickle_.data(),
command_pickle_.size()));
char buf[kBufSize];
const int bytes_read = daemon_socket->Read(
buf, sizeof(buf) - 1 /* leave space for null terminator */);
CHECK_GT(bytes_read, 0);
- DCHECK(bytes_read < sizeof(buf));
+ DCHECK(static_cast<size_t>(bytes_read) < sizeof(buf));
buf[bytes_read] = 0;
base::StringPiece msg(buf, bytes_read);
if (msg.starts_with("ERROR")) {
« no previous file with comments | « tools/android/forwarder2/forwarders_manager.cc ('k') | tools/android/forwarder2/socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698