| Index: chrome/browser/extensions/api/messaging/native_process_launcher_win.cc
|
| diff --git a/chrome/browser/extensions/api/messaging/native_process_launcher_win.cc b/chrome/browser/extensions/api/messaging/native_process_launcher_win.cc
|
| index 382f482e638d64bd2454351301bf9d1e68434153..63ccaab7e0b6719885b20d8083900efaf6e2f013 100644
|
| --- a/chrome/browser/extensions/api/messaging/native_process_launcher_win.cc
|
| +++ b/chrome/browser/extensions/api/messaging/native_process_launcher_win.cc
|
| @@ -64,7 +64,7 @@ NativeProcessLauncher::FindAndLoadManifest(
|
|
|
| // static
|
| bool NativeProcessLauncher::LaunchNativeProcess(
|
| - const base::FilePath& path,
|
| + const CommandLine& command_line,
|
| base::PlatformFile* read_file,
|
| base::PlatformFile* write_file) {
|
| // Timeout for the IO pipes.
|
| @@ -117,13 +117,15 @@ bool NativeProcessLauncher::LaunchNativeProcess(
|
| scoped_ptr<wchar_t[]> comspec(new wchar_t[comspec_length]);
|
| ::GetEnvironmentVariable(L"COMSPEC", comspec.get(), comspec_length);
|
|
|
| + string16 command_line_string = command_line.GetCommandLineString();
|
| +
|
| // 'start' command has a moronic syntax: if first argument is quoted then it
|
| // interprets it as a command title. Host path must always be in quotes, so
|
| // we always need to specify the title as the first argument.
|
| string16 command = base::StringPrintf(
|
| L"%ls /c start \"Chrome Native Messaging Host\" /b "
|
| - L"\"%ls\" < %ls > %ls",
|
| - comspec.get(), path.value().c_str(),
|
| + L"%ls < %ls > %ls",
|
| + comspec.get(), command_line_string.c_str(),
|
| in_pipe_name.c_str(), out_pipe_name.c_str());
|
|
|
| base::LaunchOptions options;
|
|
|