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