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

Unified Diff: chrome/installer/test/alternate_version_generator.cc

Issue 759903002: Upgrade the windows specific version of LaunchProcess to avoid raw handles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review feedback Created 6 years 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: chrome/installer/test/alternate_version_generator.cc
diff --git a/chrome/installer/test/alternate_version_generator.cc b/chrome/installer/test/alternate_version_generator.cc
index 0d505c844be9bf7868d9b9e5b16e05a892f3d402..fd66c012f153e5082dd6938d2f013810d4a2f347 100644
--- a/chrome/installer/test/alternate_version_generator.cc
+++ b/chrome/installer/test/alternate_version_generator.cc
@@ -214,13 +214,13 @@ bool MappedFile::Initialize(base::File file) {
bool RunProcessAndWait(const wchar_t* exe_path, const std::wstring& cmdline,
int* exit_code) {
bool result = true;
- base::win::ScopedHandle process;
base::LaunchOptions options;
options.wait = true;
options.start_hidden = true;
- if (base::LaunchProcess(cmdline, options, &process)) {
+ base::Process process = base::LaunchProcess(cmdline, options);
+ if (process.IsValid()) {
if (exit_code) {
- if (!GetExitCodeProcess(process.Get(),
+ if (!GetExitCodeProcess(process.Handle(),
reinterpret_cast<DWORD*>(exit_code))) {
PLOG(DFATAL) << "Failed getting the exit code for \""
<< cmdline << "\".";

Powered by Google App Engine
This is Rietveld 408576698