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 the Windows service controlling Me2Me host processes | 5 // This file implements the Windows service controlling Me2Me host processes |
6 // running within user sessions. | 6 // running within user sessions. |
7 | 7 |
8 #include "remoting/host/win/wts_session_process_delegate.h" | 8 #include "remoting/host/win/wts_session_process_delegate.h" |
9 | 9 |
10 #include "base/base_switches.h" | 10 #include "base/base_switches.h" |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 return false; | 330 return false; |
331 } | 331 } |
332 | 332 |
333 channel_ = channel.Pass(); | 333 channel_ = channel.Pass(); |
334 pipe_ = pipe.Pass(); | 334 pipe_ = pipe.Pass(); |
335 *process_exit_event_out = process_exit_event.Pass(); | 335 *process_exit_event_out = process_exit_event.Pass(); |
336 return true; | 336 return true; |
337 } | 337 } |
338 | 338 |
339 bool WtsSessionProcessDelegate::Core::Initialize(uint32 session_id) { | 339 bool WtsSessionProcessDelegate::Core::Initialize(uint32 session_id) { |
340 if (base::win::GetVersion() == base::win::VERSION_XP) | 340 if (base::win::GetVersion() < base::win::VERSION_VISTA) |
341 launch_elevated_ = false; | 341 launch_elevated_ = false; |
342 | 342 |
343 if (launch_elevated_) { | 343 if (launch_elevated_) { |
344 // GetNamedPipeClientProcessId() is available starting from Vista. | 344 // GetNamedPipeClientProcessId() is available starting from Vista. |
345 HMODULE kernel32 = ::GetModuleHandle(L"kernel32.dll"); | 345 HMODULE kernel32 = ::GetModuleHandle(L"kernel32.dll"); |
346 CHECK(kernel32 != NULL); | 346 CHECK(kernel32 != NULL); |
347 | 347 |
348 get_named_pipe_client_pid_ = | 348 get_named_pipe_client_pid_ = |
349 reinterpret_cast<GetNamedPipeClientProcessIdFn>( | 349 reinterpret_cast<GetNamedPipeClientProcessIdFn>( |
350 GetProcAddress(kernel32, "GetNamedPipeClientProcessId")); | 350 GetProcAddress(kernel32, "GetNamedPipeClientProcessId")); |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 bool WtsSessionProcessDelegate::LaunchProcess( | 524 bool WtsSessionProcessDelegate::LaunchProcess( |
525 IPC::Listener* delegate, | 525 IPC::Listener* delegate, |
526 base::win::ScopedHandle* process_exit_event_out) { | 526 base::win::ScopedHandle* process_exit_event_out) { |
527 if (!core_) | 527 if (!core_) |
528 return false; | 528 return false; |
529 | 529 |
530 return core_->LaunchProcess(delegate, process_exit_event_out); | 530 return core_->LaunchProcess(delegate, process_exit_event_out); |
531 } | 531 } |
532 | 532 |
533 } // namespace remoting | 533 } // namespace remoting |
OLD | NEW |