| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "tools/android/forwarder2/device_controller.h" | 5 #include "tools/android/forwarder2/device_controller.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/callback_helpers.h" | 11 #include "base/callback_helpers.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/single_thread_task_runner.h" | 13 #include "base/single_thread_task_runner.h" |
| 14 #include "base/thread_task_runner_handle.h" | 14 #include "base/threading/thread_task_runner_handle.h" |
| 15 #include "tools/android/forwarder2/command.h" | 15 #include "tools/android/forwarder2/command.h" |
| 16 #include "tools/android/forwarder2/device_listener.h" | 16 #include "tools/android/forwarder2/device_listener.h" |
| 17 #include "tools/android/forwarder2/socket.h" | 17 #include "tools/android/forwarder2/socket.h" |
| 18 #include "tools/android/forwarder2/util.h" | 18 #include "tools/android/forwarder2/util.h" |
| 19 | 19 |
| 20 namespace forwarder2 { | 20 namespace forwarder2 { |
| 21 | 21 |
| 22 // static | 22 // static |
| 23 std::unique_ptr<DeviceController> DeviceController::Create( | 23 std::unique_ptr<DeviceController> DeviceController::Create( |
| 24 const std::string& adb_unix_socket, | 24 const std::string& adb_unix_socket, |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 return; | 146 return; |
| 147 } | 147 } |
| 148 DCHECK(controller->construction_task_runner_->RunsTasksOnCurrentThread()); | 148 DCHECK(controller->construction_task_runner_->RunsTasksOnCurrentThread()); |
| 149 bool listener_did_exist = DeleteRefCountedValueInMap( | 149 bool listener_did_exist = DeleteRefCountedValueInMap( |
| 150 listener->listener_port(), &controller->listeners_); | 150 listener->listener_port(), &controller->listeners_); |
| 151 DCHECK(listener_did_exist); | 151 DCHECK(listener_did_exist); |
| 152 // Note that |listener| was deleted by DeleteRefCountedValueInMap(). | 152 // Note that |listener| was deleted by DeleteRefCountedValueInMap(). |
| 153 } | 153 } |
| 154 | 154 |
| 155 } // namespace forwarder | 155 } // namespace forwarder |
| OLD | NEW |