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.h" | 10 #include "base/time.h" |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 launcher_delegate_->KillProcess(); | 250 launcher_delegate_->KillProcess(); |
251 | 251 |
252 // Do not relaunch the worker process if the caller has asked us to stop. | 252 // Do not relaunch the worker process if the caller has asked us to stop. |
253 if (stopping()) | 253 if (stopping()) |
254 return; | 254 return; |
255 | 255 |
256 // Stop trying to restart the worker process if it exited due to | 256 // Stop trying to restart the worker process if it exited due to |
257 // misconfiguration. | 257 // misconfiguration. |
258 if (kMinPermanentErrorExitCode <= exit_code_ && | 258 if (kMinPermanentErrorExitCode <= exit_code_ && |
259 exit_code_ <= kMaxPermanentErrorExitCode) { | 259 exit_code_ <= kMaxPermanentErrorExitCode) { |
260 ipc_handler_->OnPermanentError(); | 260 ipc_handler_->OnPermanentError(exit_code_); |
261 return; | 261 return; |
262 } | 262 } |
263 | 263 |
264 // Schedule the next attempt to launch the worker process. | 264 // Schedule the next attempt to launch the worker process. |
265 launch_timer_.Start(FROM_HERE, launch_backoff_.GetTimeUntilRelease(), this, | 265 launch_timer_.Start(FROM_HERE, launch_backoff_.GetTimeUntilRelease(), this, |
266 &WorkerProcessLauncher::LaunchWorker); | 266 &WorkerProcessLauncher::LaunchWorker); |
267 } | 267 } |
268 | 268 |
269 } // namespace remoting | 269 } // namespace remoting |
OLD | NEW |