summaryrefslogtreecommitdiffstats
path: root/cloud_print/virtual_driver
diff options
context:
space:
mode:
authorrvargas <rvargas@chromium.org>2014-12-04 19:14:54 -0800
committerCommit bot <commit-bot@chromium.org>2014-12-05 03:15:21 +0000
commit61812774784a9ad2e874e737ebc1b6507da314e2 (patch)
tree7ed2073300274a2167234a72cf96a9b5b105f328 /cloud_print/virtual_driver
parent0dffffd306e8e21bd027b26e947ec8b5ffcdfa51 (diff)
downloadchromium_src-61812774784a9ad2e874e737ebc1b6507da314e2.zip
chromium_src-61812774784a9ad2e874e737ebc1b6507da314e2.tar.gz
chromium_src-61812774784a9ad2e874e737ebc1b6507da314e2.tar.bz2
Upgrade the windows specific version of LaunchProcess to avoid raw handles.
This change implies that extensions::LaunchNativeProcess also changes to return base::Process, and that requires base::EnsureProcessTerminated to deal with base:Process (as it basically claims ownership of the process). This CL fixes some leaks all around. BUG=417532 Committed: https://crrev.com/6b687a5e232c80539772dc3dbe35b98095064c38 Cr-Commit-Position: refs/heads/master@{#306687} Review URL: https://codereview.chromium.org/759903002 Cr-Commit-Position: refs/heads/master@{#306963}
Diffstat (limited to 'cloud_print/virtual_driver')
-rw-r--r--cloud_print/virtual_driver/win/install/setup.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/cloud_print/virtual_driver/win/install/setup.cc b/cloud_print/virtual_driver/win/install/setup.cc
index 6597758..ad51a8e 100644
--- a/cloud_print/virtual_driver/win/install/setup.cc
+++ b/cloud_print/virtual_driver/win/install/setup.cc
@@ -138,16 +138,16 @@ HRESULT RegisterPortMonitor(bool install, const base::FilePath& install_path) {
base::LaunchOptions options;
options.wait = true;
- base::win::ScopedHandle regsvr32_handle;
- if (!base::LaunchProcess(command_line.GetCommandLineString(), options,
- &regsvr32_handle)) {
+ base::Process regsvr32_process =
+ base::LaunchProcess(command_line.GetCommandLineString(), options);
+ if (!regsvr32_process.IsValid()) {
LOG(ERROR) << "Unable to launch regsvr32.exe.";
return HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED);
}
DWORD exit_code = S_OK;
if (install) {
- if (!GetExitCodeProcess(regsvr32_handle.Get(), &exit_code)) {
+ if (!GetExitCodeProcess(regsvr32_process.Handle(), &exit_code)) {
LOG(ERROR) << "Unable to get regsvr32.exe exit code.";
return GetLastHResult();
}