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

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

Issue 15008004: Add device port unmapping support to forwarder2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address David's comments Created 7 years, 7 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/daemon.cc ('k') | tools/android/forwarder2/device_forwarder_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/android/forwarder2/device_controller.cc
diff --git a/tools/android/forwarder2/device_controller.cc b/tools/android/forwarder2/device_controller.cc
index 212b0db5bafde66e35532e11d063ac4db3abf8e9..7338d5a584e6602b2beaa4f80cdc94b27096430a 100644
--- a/tools/android/forwarder2/device_controller.cc
+++ b/tools/android/forwarder2/device_controller.cc
@@ -18,7 +18,7 @@ namespace forwarder2 {
DeviceController::DeviceController(int exit_notifier_fd)
: exit_notifier_fd_(exit_notifier_fd) {
- kickstart_adb_socket_.set_exit_notifier_fd(exit_notifier_fd);
+ kickstart_adb_socket_.AddEventFd(exit_notifier_fd);
}
DeviceController::~DeviceController() {
@@ -60,7 +60,7 @@ void DeviceController::Start() {
CleanUpDeadListeners();
scoped_ptr<Socket> socket(new Socket);
if (!kickstart_adb_socket_.Accept(socket.get())) {
- if (!kickstart_adb_socket_.exited()) {
+ if (!kickstart_adb_socket_.DidReceiveEvent()) {
LOG(ERROR) << "Could not Accept DeviceController socket: "
<< safe_strerror(errno);
} else {
@@ -69,7 +69,7 @@ void DeviceController::Start() {
break;
}
// So that |socket| doesn't block on read if it has notifications.
- socket->set_exit_notifier_fd(exit_notifier_fd_);
+ socket->AddEventFd(exit_notifier_fd_);
int port;
command::Type command;
if (!ReadCommand(socket.get(), &port, &command)) {
« no previous file with comments | « tools/android/forwarder2/daemon.cc ('k') | tools/android/forwarder2/device_forwarder_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698