diff options
Diffstat (limited to 'tools/android/forwarder2')
-rw-r--r-- | tools/android/forwarder2/device_forwarder_main.cc | 4 | ||||
-rw-r--r-- | tools/android/forwarder2/device_listener.cc | 4 | ||||
-rw-r--r-- | tools/android/forwarder2/forwarders_manager.cc | 8 | ||||
-rw-r--r-- | tools/android/forwarder2/host_controller.cc | 2 | ||||
-rw-r--r-- | tools/android/forwarder2/host_forwarder_main.cc | 6 |
5 files changed, 12 insertions, 12 deletions
diff --git a/tools/android/forwarder2/device_forwarder_main.cc b/tools/android/forwarder2/device_forwarder_main.cc index 8b5df26c..fdf5fe5 100644 --- a/tools/android/forwarder2/device_forwarder_main.cc +++ b/tools/android/forwarder2/device_forwarder_main.cc @@ -55,7 +55,7 @@ class ServerDelegate : public Daemon::ServerDelegate { // thread. Make sure that it gets deleted on that same thread. Note that // DeleteSoon() is not used here since it would imply reading |controller_| // from the main thread while it's set on the internal thread. - controller_thread_->message_loop_proxy()->PostTask( + controller_thread_->task_runner()->PostTask( FROM_HERE, base::Bind(&ServerDelegate::DeleteControllerOnInternalThread, base::Unretained(this))); @@ -63,7 +63,7 @@ class ServerDelegate : public Daemon::ServerDelegate { void DeleteControllerOnInternalThread() { DCHECK( - controller_thread_->message_loop_proxy()->RunsTasksOnCurrentThread()); + controller_thread_->task_runner()->RunsTasksOnCurrentThread()); controller_.reset(); } diff --git a/tools/android/forwarder2/device_listener.cc b/tools/android/forwarder2/device_listener.cc index e04d61e..d6f1d8d 100644 --- a/tools/android/forwarder2/device_listener.cc +++ b/tools/android/forwarder2/device_listener.cc @@ -51,7 +51,7 @@ void DeviceListener::Start() { } void DeviceListener::SetAdbDataSocket(scoped_ptr<Socket> adb_data_socket) { - thread_.message_loop_proxy()->PostTask( + thread_.task_runner()->PostTask( FROM_HERE, base::Bind(&DeviceListener::OnAdbDataSocketReceivedOnInternalThread, base::Unretained(this), base::Passed(&adb_data_socket))); @@ -74,7 +74,7 @@ DeviceListener::DeviceListener(scoped_ptr<Socket> listener_socket, } void DeviceListener::AcceptNextClientSoon() { - thread_.message_loop_proxy()->PostTask( + thread_.task_runner()->PostTask( FROM_HERE, base::Bind(&DeviceListener::AcceptClientOnInternalThread, base::Unretained(this))); diff --git a/tools/android/forwarder2/forwarders_manager.cc b/tools/android/forwarder2/forwarders_manager.cc index 0c0c904..3460968 100644 --- a/tools/android/forwarder2/forwarders_manager.cc +++ b/tools/android/forwarder2/forwarders_manager.cc @@ -35,7 +35,7 @@ void ForwardersManager::CreateAndStartNewForwarder(scoped_ptr<Socket> socket1, scoped_ptr<Socket> socket2) { // Note that the internal Forwarder vector is populated on the internal thread // which is the only thread from which it's accessed. - thread_.message_loop_proxy()->PostTask( + thread_.task_runner()->PostTask( FROM_HERE, base::Bind(&ForwardersManager::CreateNewForwarderOnInternalThread, base::Unretained(this), base::Passed(&socket1), @@ -49,19 +49,19 @@ void ForwardersManager::CreateAndStartNewForwarder(scoped_ptr<Socket> socket1, void ForwardersManager::CreateNewForwarderOnInternalThread( scoped_ptr<Socket> socket1, scoped_ptr<Socket> socket2) { - DCHECK(thread_.message_loop_proxy()->RunsTasksOnCurrentThread()); + DCHECK(thread_.task_runner()->RunsTasksOnCurrentThread()); forwarders_.push_back(new Forwarder(socket1.Pass(), socket2.Pass())); } void ForwardersManager::WaitForEventsOnInternalThreadSoon() { - thread_.message_loop_proxy()->PostTask( + thread_.task_runner()->PostTask( FROM_HERE, base::Bind(&ForwardersManager::WaitForEventsOnInternalThread, base::Unretained(this))); } void ForwardersManager::WaitForEventsOnInternalThread() { - DCHECK(thread_.message_loop_proxy()->RunsTasksOnCurrentThread()); + DCHECK(thread_.task_runner()->RunsTasksOnCurrentThread()); fd_set read_fds; fd_set write_fds; diff --git a/tools/android/forwarder2/host_controller.cc b/tools/android/forwarder2/host_controller.cc index 3364ad2..e6f02f8 100644 --- a/tools/android/forwarder2/host_controller.cc +++ b/tools/android/forwarder2/host_controller.cc @@ -85,7 +85,7 @@ HostController::HostController( } void HostController::ReadNextCommandSoon() { - thread_.message_loop_proxy()->PostTask( + thread_.task_runner()->PostTask( FROM_HERE, base::Bind(&HostController::ReadCommandOnInternalThread, base::Unretained(this))); diff --git a/tools/android/forwarder2/host_forwarder_main.cc b/tools/android/forwarder2/host_forwarder_main.cc index 16a7b51..ddb56c09 100644 --- a/tools/android/forwarder2/host_forwarder_main.cc +++ b/tools/android/forwarder2/host_forwarder_main.cc @@ -93,7 +93,7 @@ class HostControllersManager { if (!thread_.get()) return; // Delete the controllers on the thread they were created on. - thread_->message_loop_proxy()->DeleteSoon( + thread_->task_runner()->DeleteSoon( FROM_HERE, controllers_.release()); } @@ -104,7 +104,7 @@ class HostControllersManager { scoped_ptr<Socket> client_socket) { // Lazy initialize so that the CLI process doesn't get this thread created. InitOnce(); - thread_->message_loop_proxy()->PostTask( + thread_->task_runner()->PostTask( FROM_HERE, base::Bind(&HostControllersManager::HandleRequestOnInternalThread, base::Unretained(this), adb_path, device_serial, device_port, @@ -143,7 +143,7 @@ class HostControllersManager { // then all the controllers (including |controller|) were also deleted. return; } - DCHECK(manager->thread_->message_loop_proxy()->RunsTasksOnCurrentThread()); + DCHECK(manager->thread_->task_runner()->RunsTasksOnCurrentThread()); // Note that this will delete |controller| which is owned by the map. DeleteRefCountedValueInMap( MakeHostControllerMapKey( |