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 "remoting/host/setup/daemon_controller.h" | 5 #include "remoting/host/setup/daemon_controller.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
10 #include "base/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
11 #include "base/values.h" | 11 #include "base/values.h" |
| 12 #include "build/build_config.h" |
12 #include "remoting/base/auto_thread.h" | 13 #include "remoting/base/auto_thread.h" |
13 #include "remoting/base/auto_thread_task_runner.h" | 14 #include "remoting/base/auto_thread_task_runner.h" |
14 | 15 |
15 namespace remoting { | 16 namespace remoting { |
16 | 17 |
17 // Name of the Daemon Controller's worker thread. | 18 // Name of the Daemon Controller's worker thread. |
18 const char kDaemonControllerThreadName[] = "Daemon Controller thread"; | 19 const char kDaemonControllerThreadName[] = "Daemon Controller thread"; |
19 | 20 |
20 DaemonController::DaemonController(scoped_ptr<Delegate> delegate) | 21 DaemonController::DaemonController(scoped_ptr<Delegate> delegate) |
21 : caller_task_runner_(base::ThreadTaskRunnerHandle::Get()), | 22 : caller_task_runner_(base::ThreadTaskRunnerHandle::Get()), |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 if (!servicing_request) | 190 if (!servicing_request) |
190 ServiceNextRequest(); | 191 ServiceNextRequest(); |
191 } | 192 } |
192 | 193 |
193 void DaemonController::ServiceNextRequest() { | 194 void DaemonController::ServiceNextRequest() { |
194 if (!pending_requests_.empty()) | 195 if (!pending_requests_.empty()) |
195 delegate_task_runner_->PostTask(FROM_HERE, pending_requests_.front()); | 196 delegate_task_runner_->PostTask(FROM_HERE, pending_requests_.front()); |
196 } | 197 } |
197 | 198 |
198 } // namespace remoting | 199 } // namespace remoting |
OLD | NEW |