Chromium Android command line switches at build

402 views
Skip to first unread message

Devin Arthur

unread,
Dec 21, 2016, 11:53:05 AM12/21/16
to Chromium-dev
Hi all - is it possible to pass command line switches at build/compile time so you don't need to enable them in chrome://flags after the fact?

If so, how can this be done? I could not find any documentation for this.

Thanks! :)

PhistucK

unread,
Dec 21, 2016, 12:00:25 PM12/21/16
to devinl...@gmail.com, Chromium-dev
Probably. :)
Use cs.chromium.org to search the code that adds the flags that are enabled in about:flags and just add yours.
I would start by searching "--flag-switches-begin" (the quotes are important, otherwise it is a negated query).


PhistucK

--
--
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+unsubscribe@chromium.org.

Devin Arthur

unread,
Dec 21, 2016, 12:27:09 PM12/21/16
to Chromium-dev, devinl...@gmail.com
Thanks, I did find some code with that line, but I am having trouble finding where the scripts pull those flags from (sorry I am fairly new to this so if I am blind let me know).


PhistucK

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.

Steve Kobes

unread,
Dec 21, 2016, 1:15:14 PM12/21/16
to devinl...@gmail.com, Chromium-dev
Not quite what you asked for, but note that Chrome for Android reads flags from a file in /data/local.  For development we have scripts like adb_chrome_public_command_line to set them, which is much easier than using the chrome://flags UI on the device.

PhistucK

unread,
Dec 21, 2016, 1:17:03 PM12/21/16
to devinl...@gmail.com, Chromium-dev
Well, you asked about adding the flags at build time. I see that this is the earliest call to append command line flags -

Regarding the storage, it is stored in the Local State file in the profile directory (at least on Windows).



PhistucK

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+unsubscribe@chromium.org.

Devin Arthur

unread,
Dec 21, 2016, 1:23:27 PM12/21/16
to Chromium-dev, devinl...@gmail.com
Thanks, I did see that script but you need to run that after installation to generate the file - I guess I could always find a way to include that file in my apk install since I am trying to get some flags enabled by default rather than having to enable them after install.

Tommy Nyquist

unread,
Jan 3, 2017, 5:41:36 PM1/3/17
to devinl...@gmail.com, Chromium-dev
You might also have some luck by setting it in code instead, like here SetChromeSpecificCommandLineFlags in //chrome/browser/android/chrome_startup_flags.cc.
Reply all
Reply to author
Forward
0 new messages