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

Side by Side Diff: remoting/host/win/wts_session_process_delegate.cc

Issue 11411279: Correctly detect Windows XP Pro x64 and Windows 2003 as not supporting elevation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 | Annotate | Revision Log
« no previous file with comments | « remoting/host/win/launch_process_with_token.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 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
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
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
OLDNEW
« no previous file with comments | « remoting/host/win/launch_process_with_token.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698