How to correctly add a custom startup command?

122 views
Skip to first unread message

守护技术

unread,
Oct 20, 2022, 1:42:25 PM10/20/22
to Chromium-dev
I want to add a new start command.
Pass parameters: --start-tx
Through the following code:
base::CommandLine* command_line =base::CommandLine::ForCurrentProcess();
command_line->HasSwitch("start-tx");
Could not detect the presence of start-tx.

Christian Biesinger

unread,
Oct 20, 2022, 2:11:16 PM10/20/22
to shouh...@gmail.com, Chromium-dev
What process are you calling HasSwitch in? (Or if unsure, what source file?)

Christian

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/e6f9bb2e-b151-4a63-a8fd-a52f249781fbn%40chromium.org.

守护技术

unread,
Oct 20, 2022, 7:04:02 PM10/20/22
to Chromium-dev, cbies...@chromium.org, Chromium-dev, 守护技术
Currently used for simple testing, I choose to judge under the directory: third_party\blink\renderer\core\frame\navigator_concurrent_hardware.cc file.

守护技术

unread,
Oct 21, 2022, 2:36:49 AM10/21/22
to Chromium-dev, 守护技术, cbies...@chromium.org, Chromium-dev
The reason why I can't get it is because I have to enable subprocess (cefsharp), how can I get the complete parameters when using subprocess?

Xianzhu Wang

unread,
Oct 21, 2022, 11:49:10 AM10/21/22
to shouh...@gmail.com, Chromium-dev, cbies...@chromium.org
You need to list your command line switch in this function to make it passed to the renderer process.

Reply all
Reply to author
Forward
0 new messages