Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Side by Side Diff: remoting/host/win/worker_process_launcher.cc

Issue 2950993003: [Chromoting] Use ProcessStatsSender in DaemonProcess (daemon process) (Closed)
Patch Set: Resolve review comments Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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();
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
OLDNEW
« no previous file with comments | « remoting/host/process_stats_sender.cc ('k') | remoting/host/win/worker_process_launcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698