chore: remove chrome_process_finder.patch (#16113)
This commit is contained in:
parent
7fc8afa3e5
commit
1c7a47239b
4 changed files with 4 additions and 60 deletions
|
@ -77,19 +77,6 @@ BOOL CALLBACK BrowserWindowEnumeration(HWND window, LPARAM param) {
|
||||||
return !*result;
|
return !*result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert Command line string to argv.
|
|
||||||
base::CommandLine::StringVector CommandLineStringToArgv(
|
|
||||||
const std::wstring& command_line_string) {
|
|
||||||
int num_args = 0;
|
|
||||||
wchar_t** args = NULL;
|
|
||||||
args = ::CommandLineToArgvW(command_line_string.c_str(), &num_args);
|
|
||||||
base::CommandLine::StringVector argv;
|
|
||||||
for (int i = 0; i < num_args; ++i)
|
|
||||||
argv.push_back(std::wstring(args[i]));
|
|
||||||
LocalFree(args);
|
|
||||||
return argv;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ParseCommandLine(const COPYDATASTRUCT* cds,
|
bool ParseCommandLine(const COPYDATASTRUCT* cds,
|
||||||
base::CommandLine::StringVector* parsed_command_line,
|
base::CommandLine::StringVector* parsed_command_line,
|
||||||
base::FilePath* current_directory) {
|
base::FilePath* current_directory) {
|
||||||
|
@ -143,7 +130,7 @@ bool ParseCommandLine(const COPYDATASTRUCT* cds,
|
||||||
// Get command line.
|
// Get command line.
|
||||||
const std::wstring cmd_line =
|
const std::wstring cmd_line =
|
||||||
msg.substr(second_null + 1, third_null - second_null);
|
msg.substr(second_null + 1, third_null - second_null);
|
||||||
*parsed_command_line = CommandLineStringToArgv(cmd_line);
|
*parsed_command_line = base::CommandLine::FromString(cmd_line).argv();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -398,6 +398,9 @@ non-minimized.
|
||||||
This event is guaranteed to be emitted after the `ready` event of `app`
|
This event is guaranteed to be emitted after the `ready` event of `app`
|
||||||
gets emitted.
|
gets emitted.
|
||||||
|
|
||||||
|
**Note:** Extra command line arguments might be added by Chromium,
|
||||||
|
such as `--original-process-start-time`.
|
||||||
|
|
||||||
### Event: 'remote-require'
|
### Event: 'remote-require'
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
|
@ -67,7 +67,6 @@ tts.patch
|
||||||
color_chooser.patch
|
color_chooser.patch
|
||||||
printing.patch
|
printing.patch
|
||||||
verbose_generate_breakpad_symbols.patch
|
verbose_generate_breakpad_symbols.patch
|
||||||
chrome_process_finder.patch
|
|
||||||
customizable_app_indicator_id_prefix.patch
|
customizable_app_indicator_id_prefix.patch
|
||||||
cross_site_document_resource_handler.patch
|
cross_site_document_resource_handler.patch
|
||||||
content_allow_embedder_to_prevent_locking_scheme_registry.patch
|
content_allow_embedder_to_prevent_locking_scheme_registry.patch
|
||||||
|
|
|
@ -1,45 +0,0 @@
|
||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Milan Burda <miburda@microsoft.com>
|
|
||||||
Date: Fri, 26 Oct 2018 20:45:49 +0200
|
|
||||||
Subject: chrome_process_finder.patch
|
|
||||||
|
|
||||||
Fix some problems when using app.makeSingleInstance on Windows
|
|
||||||
* The original command line of new instances are passed instead
|
|
||||||
of the one modified by Chromium.
|
|
||||||
* The command line is passed as Array.
|
|
||||||
|
|
||||||
When using the app.makeSingleInstance API, the command line arguments
|
|
||||||
of the new instance will be passed to existing instance. Without this patch,
|
|
||||||
Chromium would append some new flags (kOriginalProcessStartTime and kFastStart).
|
|
||||||
|
|
||||||
Reference: https://github.com/electron/electron/pull/3175
|
|
||||||
|
|
||||||
diff --git a/chrome/browser/win/chrome_process_finder.cc b/chrome/browser/win/chrome_process_finder.cc
|
|
||||||
index 4fdea2af27020303a66a747304c5ecce5cc698d5..598ba8171631dbcf7ad23bc4b5c74a750bbaa47c 100644
|
|
||||||
--- a/chrome/browser/win/chrome_process_finder.cc
|
|
||||||
+++ b/chrome/browser/win/chrome_process_finder.cc
|
|
||||||
@@ -43,15 +43,6 @@ NotifyChromeResult AttemptToNotifyRunningChrome(HWND remote_window,
|
|
||||||
if (!thread_id || !process_id)
|
|
||||||
return NOTIFY_FAILED;
|
|
||||||
|
|
||||||
- base::CommandLine command_line(*base::CommandLine::ForCurrentProcess());
|
|
||||||
- command_line.AppendSwitchASCII(
|
|
||||||
- switches::kOriginalProcessStartTime,
|
|
||||||
- base::Int64ToString(
|
|
||||||
- base::CurrentProcessInfo::CreationTime().ToInternalValue()));
|
|
||||||
-
|
|
||||||
- if (fast_start)
|
|
||||||
- command_line.AppendSwitch(switches::kFastStart);
|
|
||||||
-
|
|
||||||
// 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.
|
|
||||||
@@ -60,7 +51,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
|
|
Loading…
Add table
Add a link
Reference in a new issue