| OLD | NEW |
| 1 | 1 |
| 2 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
| 4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
| 5 // | 5 // |
| 6 // This file implements the Windows service controlling Me2Me host processes | 6 // This file implements the Windows service controlling Me2Me host processes |
| 7 // running within user sessions. | 7 // running within user sessions. |
| 8 | 8 |
| 9 #include "remoting/host/win/unprivileged_process_delegate.h" | 9 #include "remoting/host/win/unprivileged_process_delegate.h" |
| 10 | 10 |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 handles.Swap(*handles_out); | 211 handles.Swap(*handles_out); |
| 212 return true; | 212 return true; |
| 213 } | 213 } |
| 214 | 214 |
| 215 } // namespace | 215 } // namespace |
| 216 | 216 |
| 217 UnprivilegedProcessDelegate::UnprivilegedProcessDelegate( | 217 UnprivilegedProcessDelegate::UnprivilegedProcessDelegate( |
| 218 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, | 218 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, |
| 219 scoped_ptr<base::CommandLine> target_command) | 219 scoped_ptr<base::CommandLine> target_command) |
| 220 : io_task_runner_(io_task_runner), | 220 : io_task_runner_(io_task_runner), |
| 221 event_handler_(nullptr), | 221 target_command_(target_command.Pass()), |
| 222 target_command_(target_command.Pass()) { | 222 event_handler_(nullptr) { |
| 223 } | 223 } |
| 224 | 224 |
| 225 UnprivilegedProcessDelegate::~UnprivilegedProcessDelegate() { | 225 UnprivilegedProcessDelegate::~UnprivilegedProcessDelegate() { |
| 226 DCHECK(CalledOnValidThread()); | 226 DCHECK(CalledOnValidThread()); |
| 227 DCHECK(!channel_); | 227 DCHECK(!channel_); |
| 228 DCHECK(!worker_process_.IsValid()); | 228 DCHECK(!worker_process_.IsValid()); |
| 229 } | 229 } |
| 230 | 230 |
| 231 void UnprivilegedProcessDelegate::LaunchProcess( | 231 void UnprivilegedProcessDelegate::LaunchProcess( |
| 232 WorkerProcessLauncher* event_handler) { | 232 WorkerProcessLauncher* event_handler) { |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 PLOG(ERROR) << "Failed to duplicate a handle"; | 413 PLOG(ERROR) << "Failed to duplicate a handle"; |
| 414 ReportFatalError(); | 414 ReportFatalError(); |
| 415 return; | 415 return; |
| 416 } | 416 } |
| 417 ScopedHandle limited_handle(temp_handle); | 417 ScopedHandle limited_handle(temp_handle); |
| 418 | 418 |
| 419 event_handler_->OnProcessLaunched(limited_handle.Pass()); | 419 event_handler_->OnProcessLaunched(limited_handle.Pass()); |
| 420 } | 420 } |
| 421 | 421 |
| 422 } // namespace remoting | 422 } // namespace remoting |
| OLD | NEW |