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

Unified Diff: cloud_print/service/win/chrome_launcher.cc

Issue 71013004: Base: Remove Receive() from ScopedHandle. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix delegate_execute for google_chrome_build Created 7 years, 1 month 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
« no previous file with comments | « chrome_frame/test_utils.cc ('k') | cloud_print/virtual_driver/win/install/setup.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cloud_print/service/win/chrome_launcher.cc
diff --git a/cloud_print/service/win/chrome_launcher.cc b/cloud_print/service/win/chrome_launcher.cc
index 51501df82b7388556a8fd15b0f8593d0d3ac30e4..35d760ecdd3a23a60aa9b7b680b46721ab4b0f0a 100644
--- a/cloud_print/service/win/chrome_launcher.cc
+++ b/cloud_print/service/win/chrome_launcher.cc
@@ -67,22 +67,23 @@ void CloseChrome(HANDLE process, DWORD thread_id) {
}
bool LaunchProcess(const CommandLine& cmdline,
- base::ProcessHandle* process_handle,
+ base::win::ScopedHandle* process_handle,
DWORD* thread_id) {
STARTUPINFO startup_info = {};
startup_info.cb = sizeof(startup_info);
startup_info.dwFlags = STARTF_USESHOWWINDOW;
startup_info.wShowWindow = SW_SHOW;
- base::win::ScopedProcessInformation process_info;
+ PROCESS_INFORMATION temp_process_info = {};
if (!CreateProcess(NULL,
const_cast<wchar_t*>(cmdline.GetCommandLineString().c_str()), NULL, NULL,
- FALSE, 0, NULL, NULL, &startup_info, process_info.Receive())) {
+ FALSE, 0, NULL, NULL, &startup_info, &temp_process_info)) {
return false;
}
+ base::win::ScopedProcessInformation process_info(temp_process_info);
if (process_handle)
- *process_handle = process_info.TakeProcessHandle();
+ process_handle->Set(process_info.TakeProcessHandle());
if (thread_id)
*thread_id = process_info.thread_id();
@@ -240,7 +241,7 @@ void ChromeLauncher::Run() {
base::win::ScopedHandle chrome_handle;
base::Time started = base::Time::Now();
DWORD thread_id = 0;
- LaunchProcess(cmd, chrome_handle.Receive(), &thread_id);
+ LaunchProcess(cmd, &chrome_handle, &thread_id);
HANDLE handles[] = {stop_event_.handle(), chrome_handle};
DWORD wait_result = WAIT_TIMEOUT;
@@ -317,7 +318,7 @@ std::string ChromeLauncher::CreateServiceStateFile(
base::win::ScopedHandle chrome_handle;
DWORD thread_id = 0;
- if (!LaunchProcess(cmd, chrome_handle.Receive(), &thread_id)) {
+ if (!LaunchProcess(cmd, &chrome_handle, &thread_id)) {
LOG(ERROR) << "Unable to launch Chrome.";
return result;
}
« no previous file with comments | « chrome_frame/test_utils.cc ('k') | cloud_print/virtual_driver/win/install/setup.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698