| 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 971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 982 NOTREACHED(); | 982 NOTREACHED(); |
| 983 #endif // !defined(OS_WIN) | 983 #endif // !defined(OS_WIN) |
| 984 } | 984 } |
| 985 | 985 |
| 986 #if defined(OS_WIN) | 986 #if defined(OS_WIN) |
| 987 void HostProcess::InitializePairingRegistry( | 987 void HostProcess::InitializePairingRegistry( |
| 988 IPC::PlatformFileForTransit privileged_key, | 988 IPC::PlatformFileForTransit privileged_key, |
| 989 IPC::PlatformFileForTransit unprivileged_key) { | 989 IPC::PlatformFileForTransit unprivileged_key) { |
| 990 DCHECK(context_->network_task_runner()->BelongsToCurrentThread()); | 990 DCHECK(context_->network_task_runner()->BelongsToCurrentThread()); |
| 991 // |privileged_key| can be nullptr but not |unprivileged_key|. | 991 // |privileged_key| can be nullptr but not |unprivileged_key|. |
| 992 DCHECK(unprivileged_key); | 992 DCHECK(unprivileged_key.IsValid()); |
| 993 // |pairing_registry_| should only be initialized once. | 993 // |pairing_registry_| should only be initialized once. |
| 994 DCHECK(!pairing_registry_); | 994 DCHECK(!pairing_registry_); |
| 995 | 995 |
| 996 HKEY privileged_hkey = reinterpret_cast<HKEY>( | 996 HKEY privileged_hkey = reinterpret_cast<HKEY>( |
| 997 IPC::PlatformFileForTransitToPlatformFile(privileged_key)); | 997 IPC::PlatformFileForTransitToPlatformFile(privileged_key)); |
| 998 HKEY unprivileged_hkey = reinterpret_cast<HKEY>( | 998 HKEY unprivileged_hkey = reinterpret_cast<HKEY>( |
| 999 IPC::PlatformFileForTransitToPlatformFile(unprivileged_key)); | 999 IPC::PlatformFileForTransitToPlatformFile(unprivileged_key)); |
| 1000 | 1000 |
| 1001 scoped_ptr<PairingRegistryDelegateWin> delegate( | 1001 scoped_ptr<PairingRegistryDelegateWin> delegate( |
| 1002 new PairingRegistryDelegateWin()); | 1002 new PairingRegistryDelegateWin()); |
| (...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1745 base::TimeDelta::FromSeconds(kShutdownTimeoutSeconds)); | 1745 base::TimeDelta::FromSeconds(kShutdownTimeoutSeconds)); |
| 1746 new HostProcess(std::move(context), &exit_code, &shutdown_watchdog); | 1746 new HostProcess(std::move(context), &exit_code, &shutdown_watchdog); |
| 1747 | 1747 |
| 1748 // Run the main (also UI) message loop until the host no longer needs it. | 1748 // Run the main (also UI) message loop until the host no longer needs it. |
| 1749 message_loop.Run(); | 1749 message_loop.Run(); |
| 1750 | 1750 |
| 1751 return exit_code; | 1751 return exit_code; |
| 1752 } | 1752 } |
| 1753 | 1753 |
| 1754 } // namespace remoting | 1754 } // namespace remoting |
| OLD | NEW |