10 ms·
Chromium has over 1600 command-line switches
- hu3 2y agoI wonder if services like Gmail have hundreds of feature flags at any given point.
- Analemma_ 2y agoThey do: Borg (Google's internal orchestration system) is very, very flag-driven and it's commonplace for services to have hundreds or thousands. That's presumably how Chromium ended up the same way.
- mcrute 2y agoYes, everything internally has many flags (hundreds or thousands), so much so that they raise the command line size limit (ARG_MAX) in the kernel. I think it was around 2GB when I left. The internal frameworks really encourage using flags too, there's a @Flag decorator for Java that's sprinkled all over the code and sometimes nested extremely deeply down chains of classes that promote this behavior (abseil, (https://abseil.io/docs/cpp/guides/flags https://abseil.io/docs/cpp/guides/flags) has macros for this too).
- genshii 2y agoIt made me chuckle that the comment in "--accept-lang" states "When commenting your switch, please use the same voice as surrounding comments", and the very next flag breaks that rule.
- deleted 2y ago[deleted]
- bonestamp2 2y agoMy favorite is the one that disables CORS... makes it easy to write local clients/tools that can get data from anywhere: --disable-web-security
- ikekkdcjkfke 2y agoWeren't we able to have custom frontends for facebook at some time?
- ysabri 2y agoI also found this extension to be useful and more configurable: https://chromewebstore.google.com/detail/allow-cors-access-control/lhobafahddgcelffkeicbaginigeejlf https://chromewebstore.google.com/detail/allow-cors-access-c...
- bonestamp2 2y agoLove it! Thank you.
- raihansaputra 2y agodo you or anyone else happen to know an extension that allows getUserMedia to work without https? i just need a photo from a webcam (a la <input file capture> that opens a camera on a smartphone) for a local network webapp. configuring https just for this is fickle.
- ycombinatrix 2y agoit should work over http in the special case of localhost. try port forwarding localhost:80 to the webapp.
- julienreszka 2y agoamazing stuff. I love feature toggles
- h2odragon 2y ago`--birch-is-evening` > sets the birch ranker to assume it is evening for birch chip ranking purposes. i begin to suspect there might be a better way of organizing all this functionality
- lovethevoid 2y agoThat’s when `—organize-functionality` gets added
- hooverd 2y agoGoogle pivoting to the mulch business?
- dijit 2y agoI've been nerd sniped and am trawling through the code trying to understand what this means. Apparently there is something called a "Birch Bar" which I've never heard of, it seems to be related to calendar events... which, is weird as I have never seen a native calendar in chrome. https://sourcegraph.com/github.com/chromium/chromium/-/blob/ash/wm/overview/birch/birch_bar_controller.cc?L35-37 https://sourcegraph.com/github.com/chromium/chromium/-/blob/...
- gavinsyancey 2y agoI think that's part of the ChromeOS window manager. Note that the file you posted is in the "ash" namespace. > Ash is the “Aura Shell”, the window manager and system UI for Chrome OS. https://chromium.googlesource.com/chromium/src.git/+/refs/heads/main/ash/README.md https://chromium.googlesource.com/chromium/src.git/+/refs/he... I'd guess someone at Google decided to use tree-related codenames for ash components :)
- graypegg 2y agohttps://chromium.googlesource.com/chromium/src.git/+/lkgr/ash/#historical-notes https://chromium.googlesource.com/chromium/src.git/+/lkgr/as... “Shelf party” was an Easter-egg feature that made shelf icons fly around the screen. It did not launch and was removed in June 2023. Now I want to see if I can find a May 2023 build of chromium with a --enable-shelf-party flag.
- jbmny 2y agoI'd like to think `--all` just turns them all on at once.
- jeffbee 2y agoWe're talking about the company that had to contribute arbitrary-length command lines to the Linux kernel, and whose flags library supports reading the flags from a file, in case your appetite for flags is insatiable. https://github.com/torvalds/linux/commit/b6a2fea39318e43fee84fa7b0b90d68bed92d2ba https://github.com/torvalds/linux/commit/b6a2fea39318e43fee8...
- mike_hearn 2y agoLots of flag libraries support @argfiles, it's useful for Windows amongst other places. The real fun story about Google and flags is from the days when their flags library supported flags being passed in gzipped base64 form ... via a flag. I think the reason was there was a server that could take the whole configuration in the form of a flag, but it had got too large for Linux at some point and they didn't want to load the config from a file because there was better support for canaried/partial rollouts of flag changes than data file changes. Or something like that.
- danbruc 2y ago--false Value indicating whether flag from command line switch is false. So I can have fun with --false=true --true=false?
- ysabri 2y agoWait, what? I missed this one, what does it actually do haha
- chambored 2y agoAny insight into what —? could be?
- codetrotter 2y agoIt links to https://source.chromium.org/chromium/chromium/src/+/main:ui/gl/gl_switches.cc https://source.chromium.org/chromium/chromium/src/+/main:ui/... and so does --vulkan and --metal and similar ones. In the code they have const char kANGLEImplementationMetalName[] = "metal"; const char kANGLEImplementationNoneName[] = ""; So either they intentionally made -- be the none one, or they unintentionally ended up having it be that because the argument names are extracted from the strings and someone put an empty string for the none one. It seems weird that it would be intentional though so my guess it was by accident. (For example separate people made the arg parsing thing from the person that put an empty string there.) I say it seems weird because conventionally many cli utilities use -- to mean end of arguments. For example so that an argument that is the name of a file can start with dash dash followed by something without being interpreted as a flag. And also so that a command that executes another can separate its own arts from the args of the command it is executing. Things like that.
- dheera 2y agoAll this and yet input methods still don't work on Wayland
- krackers 2y agoIt's actually even more. --enable-features takes a list of features, and --force-fieldtrials takes a list of field trials. And each argument of --enable-features can itself have "sub-features", so you can have syntax like --enable-features=CoolFeature:Widget/1/Bells/cow* I don't know if the syntax for all of this is actually documented anywhere, but anything in chrome://flags seems to be plumbed through via --enable-features. You can see the syntax in chrome://versions?show-cmd-variations. It would be cool if someone updated the autogen table to also include the list of available features and field trials.
- ysabri 2y agoI didn't know that's where the feature flags lived. I imagine documenting them is tough because it'll heavily depend on the version since they graduate to become standard features over time.
- SyntaxSage 2y agoFormer chromium dev here - I wouldn't be surprised if many of these are deprecated and just need to be cleaned up (removed from the codebase).
- ysabri 2y agoHow many if you had to estimate? While testing, I noticed that some flags do nothing or contradict each other, but I wasn't sure if I was correctly using/understanding the flags.
- neilv 2y agoI had to use some odd Chrome command line arguments to keep a particular fragile kiosk-mode-like use of a prototype working long enough. It worked for our purposes, but we feared an update might break it. I went to some effort to prevent updates outside our control. (The command line arguments can be removed over time. Also, the behavior/correctness can change over time. I wouldn't expect all combinations of arguments to be tested in all future releases.)
- nikisweeting 2y agoI've tested 300+ of them for the purpose of reducing browser fingerprintability while building ArchiveBox's puppeteer support. It was quite a journey! Lots of subtle GPU rendering stuff that can easily give away a headless browser, or that differs between OS's in ways that can be used to detect when a browser doesn't match the expected behavior for the OS it reports to be running on. Some of my favorite lesser-known ones: '--install-autogenerated-theme=169,32,85', '--allow-legacy-extension-manifests', '--no-pings', '--no-first-run', '--no-default-browser-check', '--suppress-message-center-popups', '--ash-no-nudges', '--disable-infobars', '--use-mock-keychain', '--disable-cookie-encryption', '--js-flags=--random-seed=1157259159',
- ysabri 2y agoI wonder if there is a reference behind '--ash-no-nudges', I tried looking but found nothing.
- Lockal 2y agoash is common abbreviation from "Aura shell"; read it like Gtk/Qt. Nudges is also a common term recently - see https://medium.com/@helloannapo/behavioural-design-basics-contextual-nudges-in-apps-1d3232c46cea https://medium.com/@helloannapo/behavioural-design-basics-co...
- ryandrake 2y agoThis could be a good thing. Too many applications are overly opinionated, make decisions on behalf of the user (without the ability to override), minimize user choice, don't respect the user's configuration, and in general, do things their way rather than the user's way. More switches is often better.
- ysabri 2y agoI agree; it also makes using Chromium for all sorts of automation a lot easier. I found these because I wanted to automate generating PDFs of a report page.
- DemocracyFTW2 2y agoI've actually made it a design principle that whenever two or more choices seem to present themselves and I have to decide whether to do it the one or the other way, provided it's not too difficult to implement both, I do that and then I have the much lesser burden of deciding on the most reasonable default. This is also the result of decades-long frustrations with app behavior that is artificially restricted
- deleted 2y ago[deleted]
- deleted 2y ago[deleted]
- AlbertCory 2y agoI remember doing this expansion when I worked there: every module you include has its own set of command flags, and none get suppressed when you include them, so you end up with colossal unions like this. It's not as though any one team said, "Hey, let's have 1600 flags!"
- drivingmenuts 2y agoBut, apparently, no one has said "Hey, let's not have 1600 flags", either.
- AlbertCory 2y agoMy candidate for Hardest Thing in Tech: Getting rid of anything that's already out there. Someone, somewhere, is using it. Google's apparently mastered that art, at least.
- bananapub 2y agothis is because it's also how Google works internally - every binary has a trillion flags so everything is binary-start configurable.
- jpcookie 2y agoThis is amazing. My kind of program
- kkfx 2y agoMany seems the old joke from Monty Python's about "makeSnafucated" method documented as "/* make snafucated */"...
- deleted 2y ago[deleted]