OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/forwarders_manager.h" | 5 #include "tools/android/forwarder2/forwarders_manager.h" |
6 | 6 |
| 7 #include <stddef.h> |
7 #include <sys/select.h> | 8 #include <sys/select.h> |
8 #include <unistd.h> | 9 #include <unistd.h> |
9 | 10 |
10 #include <algorithm> | 11 #include <algorithm> |
11 | 12 |
12 #include "base/basictypes.h" | |
13 #include "base/bind.h" | 13 #include "base/bind.h" |
14 #include "base/callback_helpers.h" | 14 #include "base/callback_helpers.h" |
15 #include "base/location.h" | 15 #include "base/location.h" |
16 #include "base/logging.h" | 16 #include "base/logging.h" |
| 17 #include "base/macros.h" |
17 #include "base/posix/eintr_wrapper.h" | 18 #include "base/posix/eintr_wrapper.h" |
18 #include "tools/android/forwarder2/forwarder.h" | 19 #include "tools/android/forwarder2/forwarder.h" |
19 #include "tools/android/forwarder2/socket.h" | 20 #include "tools/android/forwarder2/socket.h" |
20 | 21 |
21 namespace forwarder2 { | 22 namespace forwarder2 { |
22 | 23 |
23 ForwardersManager::ForwardersManager() : thread_("ForwardersManagerThread") { | 24 ForwardersManager::ForwardersManager() : thread_("ForwardersManagerThread") { |
24 thread_.Start(); | 25 thread_.Start(); |
25 WaitForEventsOnInternalThreadSoon(); | 26 WaitForEventsOnInternalThreadSoon(); |
26 } | 27 } |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 ++i; | 123 ++i; |
123 continue; | 124 continue; |
124 } | 125 } |
125 | 126 |
126 std::swap(forwarders_[i], forwarders_.back()); | 127 std::swap(forwarders_[i], forwarders_.back()); |
127 forwarders_.pop_back(); | 128 forwarders_.pop_back(); |
128 } | 129 } |
129 } | 130 } |
130 | 131 |
131 } // namespace forwarder2 | 132 } // namespace forwarder2 |
OLD | NEW |