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

Unified Diff: remoting/host/win/launch_process_with_token.cc

Issue 10831271: [Chromoting] Adding uiAccess='true' to the remoting_me2me_host.exe's manifest as it is required to … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More CR feedback. Created 8 years, 4 months 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 side-by-side diff with in-line comments
Download patch
Index: remoting/host/win/launch_process_with_token.cc
diff --git a/remoting/host/win/launch_process_with_token.cc b/remoting/host/win/launch_process_with_token.cc
index ae0e1e69d97e74dd14867149f425c7fd3702b4f3..1320e2a3dd911fa932d1c3fafc93f62109e045f1 100644
--- a/remoting/host/win/launch_process_with_token.cc
+++ b/remoting/host/win/launch_process_with_token.cc
@@ -103,6 +103,7 @@ bool CreateRemoteSessionProcess(
uint32 session_id,
const FilePath::StringType& application_name,
const CommandLine::StringType& command_line,
+ DWORD creation_flags,
PROCESS_INFORMATION* process_information_out)
{
DCHECK(base::win::GetVersion() == base::win::VERSION_XP);
@@ -203,8 +204,9 @@ bool CreateRemoteSessionProcess(
CreateProcessRequest* request =
reinterpret_cast<CreateProcessRequest*>(buffer.get());
request->size = size;
- request->use_default_token = TRUE;
request->process_id = GetCurrentProcessId();
+ request->use_default_token = TRUE;
+ request->creation_flags = creation_flags;
request->startup_info.cb = sizeof(request->startup_info);
size_t buffer_offset = sizeof(CreateProcessRequest);
@@ -345,7 +347,9 @@ bool CreateSessionToken(uint32 session_id, ScopedHandle* token_out) {
bool LaunchProcessWithToken(const FilePath& binary,
const CommandLine::StringType& command_line,
HANDLE user_token,
- ScopedHandle* process_out) {
+ DWORD creation_flags,
+ ScopedHandle* process_out,
+ ScopedHandle* thread_out) {
FilePath::StringType application_name = binary.value();
base::win::ScopedProcessInformation process_info;
@@ -363,7 +367,7 @@ bool LaunchProcessWithToken(const FilePath& binary,
NULL,
NULL,
FALSE,
- 0,
+ creation_flags,
NULL,
NULL,
&startup_info,
@@ -389,6 +393,7 @@ bool LaunchProcessWithToken(const FilePath& binary,
result = CreateRemoteSessionProcess(session_id,
application_name,
command_line,
+ creation_flags,
process_info.Receive());
} else {
// Restore the error status returned by CreateProcessAsUser().
@@ -405,6 +410,7 @@ bool LaunchProcessWithToken(const FilePath& binary,
CHECK(process_info.IsValid());
process_out->Set(process_info.TakeProcessHandle());
+ thread_out->Set(process_info.TakeThreadHandle());
return true;
}

Powered by Google App Engine
This is Rietveld 408576698