| 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 "base/base_switches.h" | 7 #include "base/base_switches.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "ipc/ipc_message.h" | 21 #include "ipc/ipc_message.h" |
| 22 #include "ipc/ipc_message_macros.h" | 22 #include "ipc/ipc_message_macros.h" |
| 23 #include "remoting/base/auto_thread_task_runner.h" | 23 #include "remoting/base/auto_thread_task_runner.h" |
| 24 #include "remoting/base/scoped_sc_handle_win.h" | 24 #include "remoting/base/scoped_sc_handle_win.h" |
| 25 #include "remoting/host/branding.h" | 25 #include "remoting/host/branding.h" |
| 26 #include "remoting/host/chromoting_messages.h" | 26 #include "remoting/host/chromoting_messages.h" |
| 27 #include "remoting/host/desktop_session_win.h" | 27 #include "remoting/host/desktop_session_win.h" |
| 28 #include "remoting/host/host_exit_codes.h" | 28 #include "remoting/host/host_exit_codes.h" |
| 29 #include "remoting/host/host_main.h" | 29 #include "remoting/host/host_main.h" |
| 30 #include "remoting/host/ipc_constants.h" | 30 #include "remoting/host/ipc_constants.h" |
| 31 #include "remoting/host/pairing_registry_delegate_win.h" |
| 31 #include "remoting/host/screen_resolution.h" | 32 #include "remoting/host/screen_resolution.h" |
| 32 #include "remoting/host/win/launch_process_with_token.h" | 33 #include "remoting/host/win/launch_process_with_token.h" |
| 33 #include "remoting/host/win/unprivileged_process_delegate.h" | 34 #include "remoting/host/win/unprivileged_process_delegate.h" |
| 34 #include "remoting/host/win/worker_process_launcher.h" | 35 #include "remoting/host/win/worker_process_launcher.h" |
| 35 | 36 |
| 36 using base::win::ScopedHandle; | 37 using base::win::ScopedHandle; |
| 37 using base::TimeDelta; | 38 using base::TimeDelta; |
| 38 | 39 |
| 39 namespace { | 40 namespace { |
| 40 | 41 |
| 41 #if defined(OFFICIAL_BUILD) | |
| 42 const wchar_t kPairingRegistryKeyName[] = | |
| 43 L"SOFTWARE\\Google\\Chrome Remote Desktop\\paired-clients"; | |
| 44 #else | |
| 45 const wchar_t kPairingRegistryKeyName[] = | |
| 46 L"SOFTWARE\\Chromoting\\paired-clients"; | |
| 47 #endif | |
| 48 | |
| 49 const wchar_t kPrivilegedKeyName[] = L"secrets"; | |
| 50 const wchar_t kUnprivilegedKeyName[] = L"clients"; | |
| 51 | |
| 52 // Duplicates |key| into |target_process| and returns the value that can be sent | 42 // Duplicates |key| into |target_process| and returns the value that can be sent |
| 53 // over IPC. | 43 // over IPC. |
| 54 IPC::PlatformFileForTransit GetRegistryKeyForTransit( | 44 IPC::PlatformFileForTransit GetRegistryKeyForTransit( |
| 55 base::ProcessHandle target_process, | 45 base::ProcessHandle target_process, |
| 56 const base::win::RegKey& key) { | 46 const base::win::RegKey& key) { |
| 57 base::PlatformFile handle = | 47 base::PlatformFile handle = |
| 58 reinterpret_cast<base::PlatformFile>(key.Handle()); | 48 reinterpret_cast<base::PlatformFile>(key.Handle()); |
| 59 return IPC::GetFileHandleForProcess(handle, target_process, false); | 49 return IPC::GetFileHandleForProcess(handle, target_process, false); |
| 60 } | 50 } |
| 61 | 51 |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 << kUnprivilegedKeyName; | 326 << kUnprivilegedKeyName; |
| 337 return false; | 327 return false; |
| 338 } | 328 } |
| 339 | 329 |
| 340 pairing_registry_privileged_key_.Set(privileged.Take()); | 330 pairing_registry_privileged_key_.Set(privileged.Take()); |
| 341 pairing_registry_unprivileged_key_.Set(unprivileged.Take()); | 331 pairing_registry_unprivileged_key_.Set(unprivileged.Take()); |
| 342 return true; | 332 return true; |
| 343 } | 333 } |
| 344 | 334 |
| 345 } // namespace remoting | 335 } // namespace remoting |
| OLD | NEW |