| 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/daemon_process.h" | 5 #include "remoting/host/daemon_process.h" |
| 6 | 6 |
| 7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 } | 214 } |
| 215 | 215 |
| 216 scoped_ptr<CommandLine> target(new CommandLine(host_binary)); | 216 scoped_ptr<CommandLine> target(new CommandLine(host_binary)); |
| 217 target->AppendSwitchASCII(kProcessTypeSwitchName, kProcessTypeHost); | 217 target->AppendSwitchASCII(kProcessTypeSwitchName, kProcessTypeHost); |
| 218 target->CopySwitchesFrom(*CommandLine::ForCurrentProcess(), | 218 target->CopySwitchesFrom(*CommandLine::ForCurrentProcess(), |
| 219 kCopiedSwitchNames, | 219 kCopiedSwitchNames, |
| 220 arraysize(kCopiedSwitchNames)); | 220 arraysize(kCopiedSwitchNames)); |
| 221 | 221 |
| 222 scoped_ptr<UnprivilegedProcessDelegate> delegate( | 222 scoped_ptr<UnprivilegedProcessDelegate> delegate( |
| 223 new UnprivilegedProcessDelegate(io_task_runner(), target.Pass())); | 223 new UnprivilegedProcessDelegate(io_task_runner(), target.Pass())); |
| 224 network_launcher_.reset(new WorkerProcessLauncher(delegate.Pass(), this)); | 224 network_launcher_.reset(new WorkerProcessLauncher( |
| 225 delegate.PassAs<WorkerProcessLauncher::Delegate>(), this)); |
| 225 } | 226 } |
| 226 | 227 |
| 227 scoped_ptr<DaemonProcess> DaemonProcess::Create( | 228 scoped_ptr<DaemonProcess> DaemonProcess::Create( |
| 228 scoped_refptr<AutoThreadTaskRunner> caller_task_runner, | 229 scoped_refptr<AutoThreadTaskRunner> caller_task_runner, |
| 229 scoped_refptr<AutoThreadTaskRunner> io_task_runner, | 230 scoped_refptr<AutoThreadTaskRunner> io_task_runner, |
| 230 const base::Closure& stopped_callback) { | 231 const base::Closure& stopped_callback) { |
| 231 scoped_ptr<DaemonProcessWin> daemon_process( | 232 scoped_ptr<DaemonProcessWin> daemon_process( |
| 232 new DaemonProcessWin(caller_task_runner, io_task_runner, | 233 new DaemonProcessWin(caller_task_runner, io_task_runner, |
| 233 stopped_callback)); | 234 stopped_callback)); |
| 234 daemon_process->Initialize(); | 235 daemon_process->Initialize(); |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 << "\\" << kPairingRegistrySecretsKeyName; | 327 << "\\" << kPairingRegistrySecretsKeyName; |
| 327 return false; | 328 return false; |
| 328 } | 329 } |
| 329 | 330 |
| 330 pairing_registry_privileged_key_.Set(privileged.Take()); | 331 pairing_registry_privileged_key_.Set(privileged.Take()); |
| 331 pairing_registry_unprivileged_key_.Set(unprivileged.Take()); | 332 pairing_registry_unprivileged_key_.Set(unprivileged.Take()); |
| 332 return true; | 333 return true; |
| 333 } | 334 } |
| 334 | 335 |
| 335 } // namespace remoting | 336 } // namespace remoting |
| OLD | NEW |