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

Unified Diff: chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc

Issue 12406002: Pass ID of the calling extension to the native messaging host. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 months 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 cd2d0582508fd73874928dc8bbd939ce85fc5d13..8cb3e46ea5708bcfdbe2774fc60150a456b49ffc 100644
--- a/chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc
+++ b/chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc
@@ -37,7 +37,7 @@ NativeProcessLauncher::FindAndLoadManifest(
// static
bool NativeProcessLauncher::LaunchNativeProcess(
- const base::FilePath& path,
+ const CommandLine& command_line,
base::PlatformFile* read_file,
base::PlatformFile* write_file) {
base::FileHandleMappingVector fd_map;
@@ -60,11 +60,10 @@ bool NativeProcessLauncher::LaunchNativeProcess(
file_util::ScopedFD write_pipe_write_fd(&write_pipe_fds[1]);
fd_map.push_back(std::make_pair(*write_pipe_read_fd, STDIN_FILENO));
- CommandLine line(path);
base::LaunchOptions options;
options.fds_to_remap = &fd_map;
int process_id;
- if (!base::LaunchProcess(line, options, &process_id)) {
+ if (!base::LaunchProcess(command_line, options, &process_id)) {
LOG(ERROR) << "Error launching process";
return false;
}

Powered by Google App Engine
This is Rietveld 408576698