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

Side by Side Diff: remoting/host/remoting_me2me_host.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 | « remoting/host/desktop_session_proxy.cc ('k') | no next file » | 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 // This file implements a standalone host process for Me2Me. 5 // This file implements a standalone host process for Me2Me.
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 972 matching lines...) Expand 10 before | Expand all | Expand 10 after
983 NOTREACHED(); 983 NOTREACHED();
984 #endif // !defined(OS_WIN) 984 #endif // !defined(OS_WIN)
985 } 985 }
986 986
987 #if defined(OS_WIN) 987 #if defined(OS_WIN)
988 void HostProcess::InitializePairingRegistry( 988 void HostProcess::InitializePairingRegistry(
989 IPC::PlatformFileForTransit privileged_key, 989 IPC::PlatformFileForTransit privileged_key,
990 IPC::PlatformFileForTransit unprivileged_key) { 990 IPC::PlatformFileForTransit unprivileged_key) {
991 DCHECK(context_->network_task_runner()->BelongsToCurrentThread()); 991 DCHECK(context_->network_task_runner()->BelongsToCurrentThread());
992 // |privileged_key| can be nullptr but not |unprivileged_key|. 992 // |privileged_key| can be nullptr but not |unprivileged_key|.
993 DCHECK(unprivileged_key); 993 DCHECK(unprivileged_key.IsValid());
994 // |pairing_registry_| should only be initialized once. 994 // |pairing_registry_| should only be initialized once.
995 DCHECK(!pairing_registry_); 995 DCHECK(!pairing_registry_);
996 996
997 HKEY privileged_hkey = reinterpret_cast<HKEY>( 997 HKEY privileged_hkey = reinterpret_cast<HKEY>(
998 IPC::PlatformFileForTransitToPlatformFile(privileged_key)); 998 IPC::PlatformFileForTransitToPlatformFile(privileged_key));
999 HKEY unprivileged_hkey = reinterpret_cast<HKEY>( 999 HKEY unprivileged_hkey = reinterpret_cast<HKEY>(
1000 IPC::PlatformFileForTransitToPlatformFile(unprivileged_key)); 1000 IPC::PlatformFileForTransitToPlatformFile(unprivileged_key));
1001 1001
1002 scoped_ptr<PairingRegistryDelegateWin> delegate( 1002 scoped_ptr<PairingRegistryDelegateWin> delegate(
1003 new PairingRegistryDelegateWin()); 1003 new PairingRegistryDelegateWin());
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
1746 base::TimeDelta::FromSeconds(kShutdownTimeoutSeconds)); 1746 base::TimeDelta::FromSeconds(kShutdownTimeoutSeconds));
1747 new HostProcess(std::move(context), &exit_code, &shutdown_watchdog); 1747 new HostProcess(std::move(context), &exit_code, &shutdown_watchdog);
1748 1748
1749 // Run the main (also UI) message loop until the host no longer needs it. 1749 // Run the main (also UI) message loop until the host no longer needs it.
1750 message_loop.Run(); 1750 message_loop.Run();
1751 1751
1752 return exit_code; 1752 return exit_code;
1753 } 1753 }
1754 1754
1755 } // namespace remoting 1755 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/desktop_session_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698