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

Unified Diff: chrome/browser/extensions/api/messaging/native_process_launcher_posix.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: Fix chrome build 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/browser/extensions/api/messaging/native_process_launcher_posix.cc
diff --git a/chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc b/chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc
index aac9ce247dc24ca14aa0bed6082c18c7e1e42d5b..bd2b3162ffe0a97e367115e4503662abdf7547ea 100644
--- a/chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc
+++ b/chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc
@@ -50,7 +50,7 @@ base::FilePath NativeProcessLauncher::FindManifest(
// static
bool NativeProcessLauncher::LaunchNativeProcess(
const CommandLine& command_line,
- base::ProcessHandle* process_handle,
+ base::Process* process,
base::File* read_file,
base::File* write_file) {
base::FileHandleMappingVector fd_map;
@@ -81,7 +81,8 @@ bool NativeProcessLauncher::LaunchNativeProcess(
options.allow_new_privs = true;
#endif
- if (!base::LaunchProcess(command_line, options, process_handle)) {
+ base::ProcessHandle process_handle;
+ if (!base::LaunchProcess(command_line, options, &process_handle)) {
LOG(ERROR) << "Error launching process";
return false;
}
@@ -90,6 +91,7 @@ bool NativeProcessLauncher::LaunchNativeProcess(
write_pipe_read_fd.reset();
read_pipe_write_fd.reset();
+ *process = base::Process(process_handle);
*read_file = base::File(read_pipe_read_fd.release());
*write_file = base::File(write_pipe_write_fd.release());

Powered by Google App Engine
This is Rietveld 408576698