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

Side by Side Diff: remoting/host/daemon_process_win.cc

Issue 1830853002: Make PlatformFileForTransit a class on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments from mseaborn. 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
« no previous file with comments | « ipc/ipc_platform_file.cc ('k') | remoting/host/desktop_process_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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
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
OLDNEW
« no previous file with comments | « ipc/ipc_platform_file.cc ('k') | remoting/host/desktop_process_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698