| Index: remoting/host/wts_session_process_launcher_win.cc
|
| diff --git a/remoting/host/wts_session_process_launcher_win.cc b/remoting/host/wts_session_process_launcher_win.cc
|
| index 45d81cf7b2ca2a5826097dc0c7d93344cf48b3c0..c19bc17b715c301c71dde3720f794363c6774251 100644
|
| --- a/remoting/host/wts_session_process_launcher_win.cc
|
| +++ b/remoting/host/wts_session_process_launcher_win.cc
|
| @@ -19,6 +19,7 @@
|
| #include "base/threading/thread.h"
|
| #include "base/utf_string_conversions.h"
|
| #include "base/win/scoped_handle.h"
|
| +#include "base/win/scoped_process_information.h"
|
| #include "ipc/ipc_channel_proxy.h"
|
| #include "ipc/ipc_message.h"
|
| #include "ipc/ipc_message_macros.h"
|
| @@ -207,7 +208,7 @@ bool LaunchProcessAsUser(const FilePath& binary,
|
| string16 application_name = binary.value();
|
| string16 desktop = ASCIIToUTF16(kDefaultDesktopName);
|
|
|
| - PROCESS_INFORMATION process_info;
|
| + base::win::ScopedProcessInformation process_info;
|
| STARTUPINFOW startup_info;
|
|
|
| memset(&startup_info, 0, sizeof(startup_info));
|
| @@ -224,14 +225,13 @@ bool LaunchProcessAsUser(const FilePath& binary,
|
| NULL,
|
| NULL,
|
| &startup_info,
|
| - &process_info)) {
|
| + process_info.Receive())) {
|
| LOG_GETLASTERROR(ERROR) <<
|
| "Failed to launch a process with a user token";
|
| return false;
|
| }
|
|
|
| - CloseHandle(process_info.hThread);
|
| - process_out->set_handle(process_info.hProcess);
|
| + process_out->set_handle(process_info.TakeProcessHandle());
|
| return true;
|
| }
|
|
|
|
|