| 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 <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 if (!pairing_registry_privileged_key_.Valid()) { | 286 if (!pairing_registry_privileged_key_.Valid()) { |
| 287 if (!OpenPairingRegistry()) | 287 if (!OpenPairingRegistry()) |
| 288 return false; | 288 return false; |
| 289 } | 289 } |
| 290 | 290 |
| 291 // Duplicate handles to the network process. | 291 // Duplicate handles to the network process. |
| 292 IPC::PlatformFileForTransit privileged_key = GetRegistryKeyForTransit( | 292 IPC::PlatformFileForTransit privileged_key = GetRegistryKeyForTransit( |
| 293 network_process_.Get(), pairing_registry_privileged_key_); | 293 network_process_.Get(), pairing_registry_privileged_key_); |
| 294 IPC::PlatformFileForTransit unprivileged_key = GetRegistryKeyForTransit( | 294 IPC::PlatformFileForTransit unprivileged_key = GetRegistryKeyForTransit( |
| 295 network_process_.Get(), pairing_registry_unprivileged_key_); | 295 network_process_.Get(), pairing_registry_unprivileged_key_); |
| 296 if (!(privileged_key && unprivileged_key)) | 296 if (!(privileged_key.IsValid() && unprivileged_key.IsValid())) |
| 297 return false; | 297 return false; |
| 298 | 298 |
| 299 // Initialize the pairing registry in the network process. This has to be done | 299 // Initialize the pairing registry in the network process. This has to be done |
| 300 // before the host configuration is sent, otherwise the host will not use | 300 // before the host configuration is sent, otherwise the host will not use |
| 301 // the passed handles. | 301 // the passed handles. |
| 302 SendToNetwork(new ChromotingDaemonNetworkMsg_InitializePairingRegistry( | 302 SendToNetwork(new ChromotingDaemonNetworkMsg_InitializePairingRegistry( |
| 303 privileged_key, unprivileged_key)); | 303 privileged_key, unprivileged_key)); |
| 304 | 304 |
| 305 return true; | 305 return true; |
| 306 } | 306 } |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 << "\\" << kPairingRegistrySecretsKeyName; | 382 << "\\" << kPairingRegistrySecretsKeyName; |
| 383 return false; | 383 return false; |
| 384 } | 384 } |
| 385 | 385 |
| 386 pairing_registry_privileged_key_.Set(privileged.Take()); | 386 pairing_registry_privileged_key_.Set(privileged.Take()); |
| 387 pairing_registry_unprivileged_key_.Set(unprivileged.Take()); | 387 pairing_registry_unprivileged_key_.Set(unprivileged.Take()); |
| 388 return true; | 388 return true; |
| 389 } | 389 } |
| 390 | 390 |
| 391 } // namespace remoting | 391 } // namespace remoting |
| OLD | NEW |