]> khamidou — GitHub mirrors - electron.git/commitdiff
win: Pass original command line
authorCheng Zhao <zcbenz@gmail.com>
Thu, 22 Oct 2015 09:51:51 +0000 (17:51 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Thu, 22 Oct 2015 09:52:06 +0000 (17:52 +0800)
chromium_src/chrome/browser/chrome_process_finder_win.cc

index 299877a65db69797d2b7d1174986b753218bc2c6..5a662258a0be7b073a92df531b95574cba25ce80 100644 (file)
@@ -42,8 +42,6 @@ NotifyChromeResult AttemptToNotifyRunningChrome(HWND remote_window,
   if (!thread_id || !process_id)
     return NOTIFY_FAILED;
 
-  base::CommandLine command_line(*base::CommandLine::ForCurrentProcess());
-
   // Send the command line to the remote chrome window.
   // Format is "START\0<<<current directory>>>\0<<<commandline>>>".
   std::wstring to_send(L"START\0", 6);  // want the NULL in the string.
@@ -52,7 +50,7 @@ NotifyChromeResult AttemptToNotifyRunningChrome(HWND remote_window,
     return NOTIFY_FAILED;
   to_send.append(cur_dir.value());
   to_send.append(L"\0", 1);  // Null separator.
-  to_send.append(command_line.GetCommandLineString());
+  to_send.append(::GetCommandLineW());
   to_send.append(L"\0", 1);  // Null separator.
 
   // Allow the current running browser window to make itself the foreground