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

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

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU Created 4 years, 8 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 }; 46 };
47 47
48 const int kKillProcessTimeoutSeconds = 5; 48 const int kKillProcessTimeoutSeconds = 5;
49 const int kLaunchResultTimeoutSeconds = 5; 49 const int kLaunchResultTimeoutSeconds = 5;
50 50
51 namespace remoting { 51 namespace remoting {
52 52
53 WorkerProcessLauncher::Delegate::~Delegate() {} 53 WorkerProcessLauncher::Delegate::~Delegate() {}
54 54
55 WorkerProcessLauncher::WorkerProcessLauncher( 55 WorkerProcessLauncher::WorkerProcessLauncher(
56 scoped_ptr<WorkerProcessLauncher::Delegate> launcher_delegate, 56 std::unique_ptr<WorkerProcessLauncher::Delegate> launcher_delegate,
57 WorkerProcessIpcDelegate* ipc_handler) 57 WorkerProcessIpcDelegate* ipc_handler)
58 : ipc_handler_(ipc_handler), 58 : ipc_handler_(ipc_handler),
59 launcher_delegate_(std::move(launcher_delegate)), 59 launcher_delegate_(std::move(launcher_delegate)),
60 exit_code_(CONTROL_C_EXIT), 60 exit_code_(CONTROL_C_EXIT),
61 ipc_enabled_(false), 61 ipc_enabled_(false),
62 kill_process_timeout_( 62 kill_process_timeout_(
63 base::TimeDelta::FromSeconds(kKillProcessTimeoutSeconds)), 63 base::TimeDelta::FromSeconds(kKillProcessTimeoutSeconds)),
64 launch_backoff_(&kDefaultBackoffPolicy) { 64 launch_backoff_(&kDefaultBackoffPolicy) {
65 DCHECK(ipc_handler_ != nullptr); 65 DCHECK(ipc_handler_ != nullptr);
66 66
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 ipc_handler_->OnPermanentError(exit_code_); 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
OLDNEW
« no previous file with comments | « remoting/host/win/worker_process_launcher.h ('k') | remoting/host/win/worker_process_launcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698