| 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 // 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |