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

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

Issue 24646002: Don't use start command when starting native messaging hosts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9913f5fce5e39db1925b54535595c480189de43e..d019580b448a1aaf8c12a708310181ea48001166 100644
--- a/chrome/browser/extensions/api/messaging/native_process_launcher_win.cc
+++ b/chrome/browser/extensions/api/messaging/native_process_launcher_win.cc
@@ -128,12 +128,8 @@ bool NativeProcessLauncher::LaunchNativeProcess(
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 may need to 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",
+ L"%ls /c %ls < %ls > %ls",
comspec.get(), command_line_string.c_str(),
in_pipe_name.c_str(), out_pipe_name.c_str());
@@ -158,19 +154,6 @@ bool NativeProcessLauncher::LaunchNativeProcess(
return false;
}
- // Check that cmd.exe has completed with 0 exit code to make sure it was
- // able to connect IO pipes.
- int error_code;
- if (!base::WaitForExitCodeWithTimeout(
- cmd_handle, &error_code,
- base::TimeDelta::FromMilliseconds(kTimeoutMs)) ||
- error_code != 0) {
- LOG(ERROR) << "cmd.exe did not exit cleanly";
- base::KillProcess(cmd_handle, 0, false);
- base::CloseProcessHandle(cmd_handle);
- return false;
- }
-
base::CloseProcessHandle(cmd_handle);
*read_file = stdout_pipe.Take();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698