| 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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 DCHECK(caller_task_runner()->BelongsToCurrentThread()); | 207 DCHECK(caller_task_runner()->BelongsToCurrentThread()); |
| 208 DCHECK(!network_launcher_); | 208 DCHECK(!network_launcher_); |
| 209 | 209 |
| 210 // Construct the host binary name. | 210 // Construct the host binary name. |
| 211 base::FilePath host_binary; | 211 base::FilePath host_binary; |
| 212 if (!GetInstalledBinaryPath(kHostBinaryName, &host_binary)) { | 212 if (!GetInstalledBinaryPath(kHostBinaryName, &host_binary)) { |
| 213 Stop(); | 213 Stop(); |
| 214 return; | 214 return; |
| 215 } | 215 } |
| 216 | 216 |
| 217 scoped_ptr<CommandLine> target(new CommandLine(host_binary)); | 217 scoped_ptr<base::CommandLine> target(new base::CommandLine(host_binary)); |
| 218 target->AppendSwitchASCII(kProcessTypeSwitchName, kProcessTypeHost); | 218 target->AppendSwitchASCII(kProcessTypeSwitchName, kProcessTypeHost); |
| 219 target->CopySwitchesFrom(*CommandLine::ForCurrentProcess(), | 219 target->CopySwitchesFrom(*base::CommandLine::ForCurrentProcess(), |
| 220 kCopiedSwitchNames, | 220 kCopiedSwitchNames, arraysize(kCopiedSwitchNames)); |
| 221 arraysize(kCopiedSwitchNames)); | |
| 222 | 221 |
| 223 scoped_ptr<UnprivilegedProcessDelegate> delegate( | 222 scoped_ptr<UnprivilegedProcessDelegate> delegate( |
| 224 new UnprivilegedProcessDelegate(io_task_runner(), target.Pass())); | 223 new UnprivilegedProcessDelegate(io_task_runner(), target.Pass())); |
| 225 network_launcher_.reset(new WorkerProcessLauncher(delegate.Pass(), this)); | 224 network_launcher_.reset(new WorkerProcessLauncher(delegate.Pass(), this)); |
| 226 } | 225 } |
| 227 | 226 |
| 228 scoped_ptr<DaemonProcess> DaemonProcess::Create( | 227 scoped_ptr<DaemonProcess> DaemonProcess::Create( |
| 229 scoped_refptr<AutoThreadTaskRunner> caller_task_runner, | 228 scoped_refptr<AutoThreadTaskRunner> caller_task_runner, |
| 230 scoped_refptr<AutoThreadTaskRunner> io_task_runner, | 229 scoped_refptr<AutoThreadTaskRunner> io_task_runner, |
| 231 const base::Closure& stopped_callback) { | 230 const base::Closure& stopped_callback) { |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 << "\\" << kPairingRegistrySecretsKeyName; | 371 << "\\" << kPairingRegistrySecretsKeyName; |
| 373 return false; | 372 return false; |
| 374 } | 373 } |
| 375 | 374 |
| 376 pairing_registry_privileged_key_.Set(privileged.Take()); | 375 pairing_registry_privileged_key_.Set(privileged.Take()); |
| 377 pairing_registry_unprivileged_key_.Set(unprivileged.Take()); | 376 pairing_registry_unprivileged_key_.Set(unprivileged.Take()); |
| 378 return true; | 377 return true; |
| 379 } | 378 } |
| 380 | 379 |
| 381 } // namespace remoting | 380 } // namespace remoting |
| OLD | NEW |