Index: cloud_print/service/win/chrome_launcher.cc |
=================================================================== |
--- cloud_print/service/win/chrome_launcher.cc (revision 237598) |
+++ cloud_print/service/win/chrome_launcher.cc (working copy) |
@@ -67,23 +67,22 @@ |
} |
bool LaunchProcess(const CommandLine& cmdline, |
- base::win::ScopedHandle* process_handle, |
+ base::ProcessHandle* process_handle, |
DWORD* thread_id) { |
STARTUPINFO startup_info = {}; |
startup_info.cb = sizeof(startup_info); |
startup_info.dwFlags = STARTF_USESHOWWINDOW; |
startup_info.wShowWindow = SW_SHOW; |
- PROCESS_INFORMATION temp_process_info = {}; |
+ base::win::ScopedProcessInformation process_info; |
if (!CreateProcess(NULL, |
const_cast<wchar_t*>(cmdline.GetCommandLineString().c_str()), NULL, NULL, |
- FALSE, 0, NULL, NULL, &startup_info, &temp_process_info)) { |
+ FALSE, 0, NULL, NULL, &startup_info, process_info.Receive())) { |
return false; |
} |
- base::win::ScopedProcessInformation process_info(temp_process_info); |
if (process_handle) |
- process_handle->Set(process_info.TakeProcessHandle()); |
+ *process_handle = process_info.TakeProcessHandle(); |
if (thread_id) |
*thread_id = process_info.thread_id(); |
@@ -241,7 +240,7 @@ |
base::win::ScopedHandle chrome_handle; |
base::Time started = base::Time::Now(); |
DWORD thread_id = 0; |
- LaunchProcess(cmd, &chrome_handle, &thread_id); |
+ LaunchProcess(cmd, chrome_handle.Receive(), &thread_id); |
HANDLE handles[] = {stop_event_.handle(), chrome_handle}; |
DWORD wait_result = WAIT_TIMEOUT; |
@@ -318,7 +317,7 @@ |
base::win::ScopedHandle chrome_handle; |
DWORD thread_id = 0; |
- if (!LaunchProcess(cmd, &chrome_handle, &thread_id)) { |
+ if (!LaunchProcess(cmd, chrome_handle.Receive(), &thread_id)) { |
LOG(ERROR) << "Unable to launch Chrome."; |
return result; |
} |