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 "remoting/host/win/worker_process_launcher.h" | 5 #include "remoting/host/win/worker_process_launcher.h" |
6 | 6 |
7 #include "base/location.h" | 7 #include "base/location.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 bool WorkerProcessLauncher::OnMessageReceived( | 131 bool WorkerProcessLauncher::OnMessageReceived( |
132 const IPC::Message& message) { | 132 const IPC::Message& message) { |
133 DCHECK(CalledOnValidThread()); | 133 DCHECK(CalledOnValidThread()); |
134 | 134 |
135 if (!ipc_enabled_) | 135 if (!ipc_enabled_) |
136 return false; | 136 return false; |
137 | 137 |
138 return ipc_handler_->OnMessageReceived(message); | 138 return ipc_handler_->OnMessageReceived(message); |
139 } | 139 } |
140 | 140 |
141 void WorkerProcessLauncher::OnChannelConnected(int32 peer_pid) { | 141 void WorkerProcessLauncher::OnChannelConnected(int32_t peer_pid) { |
142 DCHECK(CalledOnValidThread()); | 142 DCHECK(CalledOnValidThread()); |
143 | 143 |
144 if (!ipc_enabled_) | 144 if (!ipc_enabled_) |
145 return; | 145 return; |
146 | 146 |
147 // This can result in |this| being deleted, so this call must be the last in | 147 // This can result in |this| being deleted, so this call must be the last in |
148 // this method. | 148 // this method. |
149 ipc_handler_->OnChannelConnected(peer_pid); | 149 ipc_handler_->OnChannelConnected(peer_pid); |
150 } | 150 } |
151 | 151 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 ipc_handler_->OnPermanentError(exit_code_); | 259 ipc_handler_->OnPermanentError(exit_code_); |
260 return; | 260 return; |
261 } | 261 } |
262 | 262 |
263 // Schedule the next attempt to launch the worker process. | 263 // Schedule the next attempt to launch the worker process. |
264 launch_timer_.Start(FROM_HERE, launch_backoff_.GetTimeUntilRelease(), this, | 264 launch_timer_.Start(FROM_HERE, launch_backoff_.GetTimeUntilRelease(), this, |
265 &WorkerProcessLauncher::LaunchWorker); | 265 &WorkerProcessLauncher::LaunchWorker); |
266 } | 266 } |
267 | 267 |
268 } // namespace remoting | 268 } // namespace remoting |
OLD | NEW |