List of Chromium Command Line Switches

详情请转到原文:https://peter.sh/experiments/chromium-command-line-switches/

There are lots of command lines which can be used with the Google Chrome browser. Some change behavior of features, others are for debugging or experimenting. This page lists the available switches including their conditions and descriptions. Last automated update occurred on 2019-08-12.

ConditionExplanation
--/prefetch:1[1] /prefetch:# arguments to use when launching various process types. It has been observed that when file reads are consistent for 3 process launches with the same /prefetch:# argument, the Windows prefetcher starts issuing reads in batch at process launch. Because reads depend on the process type, the prefetcher wouldn't be able to observe consistent reads if no /prefetch:# arguments were used. Note that the browser process has no /prefetch:# argument; as such all other processes must have one in order to avoid polluting its profile. Note: # must always be in [1, 8]; otherwise it is ignored by the Windows prefetcher. 
--/prefetch:2[1] No description 
--/prefetch:3[1] No description 
--/prefetch:4[1] No description 
--/prefetch:5[1] /prefetch:# arguments for the browser process launched in background mode and for the watcher process. Use profiles 5, 6 and 7 as documented on kPrefetchArgument* in content_switches.cc. 
--/prefetch:6[1] No description 
--/prefetch:8[1] Prefetch arguments are used by the Windows prefetcher to disambiguate different execution modes (i.e. process types) of the same executable image so that different types of processes don't trample each others' prefetch behavior. Legal values are integers in the range [1, 8]. We reserve 8 to mean "whatever", and this will ultimately lead to processes with /prefetch:8 having inconsistent behavior thus disabling prefetch in practice. TODO(rockot): Make it possible for embedders to override this argument on a per-service basis. 
--10000 No description 
--100000 No description 
--1000000 No description 
--3d-display-mode[1] No description 
--50000 No description 
--500000 No description 
--5000000 No description 
--? No description 
--accept-resource-provider Flag indicating that a resource provider must be set up to provide cast receiver with resources. Apps cannot start until provided resources. This flag implies --alsa-check-close-timeout=0. 
--account-consistency[2] Command line flag for enabling account consistency. Default mode is disabled. Mirror is a legacy mode in which Google accounts are always addded to Chrome, and Chrome then adds them to the Google authentication cookies. Dice is a new experiment in which Chrome is aware of the accounts in the Google authentication cookies. 
--adaboost No description 
--add-gpu-appcontainer-caps[1] Add additional capabilities to the AppContainer sandbox on the GPU process. 
--add-xr-appcontainer-caps[1] Add additional capabilities to the AppContainer sandbox used for XR compositing. 
--agc-startup-min-volume Override the default minimum starting volume of the Automatic Gain Control algorithm in WebRTC used with audio tracks from getUserMedia. The valid range is 12-255. Values outside that range will be clamped to the lowest or highest valid value inside WebRTC. TODO(tommi): Remove this switch when crbug.com/555577 is fixed. 
--aggressive No description 
--aggressive-cache-discard No description 
--aggressive-tab-discard No description 
--all No description 
--all-renderers No description 
--allarticles No description 
--allow-cross-origin-auth-prompt Allows third-party content included on a page to prompt for a HTTP basic auth username/password pair. 
--allow-external-pages Allow access to external pages during web tests. 
--allow-failed-policy-fetch-for-test If this flag is passed, failed policy fetches will not cause profile initialization to fail. This is useful for tests because it means that tests don't have to mock out the policy infrastructure. 
  

How to use a command line switch?

The Chromium Team has made a page on which they briefly explain how to use these switches.

Conditions

These are rather technical. While most are pretty self-explanatory, keep in mind that any condition means that a switch isn't always available.

  1. The constant OS_WIN must be defined.
  2. The constant !BUILDFLAG(ENABLE_MIRROR) must not be defined.
  3. The constant BUILDFLAG(ENABLE_PLUGINS) must be defined.
  4. The constant !BUILDFLAG(IS_OFFICIAL_CHROME_CLEANER_BUILD) must not be defined.
  5. The constants OS_FREEBSD, OS_LINUX and OS_SOLARIS must be defined.
  6. The constant OS_CHROMEOS must be defined.
  7. The constant OS_MACOSX must be defined.
  8. The constant OS_ANDROID must be defined.
  9. The constants OS_CHROMEOS and OS_MACOSX must not be defined, and the constant OS_POSIX must be defined.
  10. The constant OFFICIAL_BUILD must not be defined, and the constant BUILDFLAG(ENABLE_PRINT_PREVIEW) must be defined.
  11. The constant OS_IOS must not be defined, and the constant OS_MACOSX must be defined.
  12. The constants USE_OZONE and USE_X11 must be defined.
  13. The constant OS_CHROMEOS must not be defined, and the constant OS_LINUX must be defined.
  14. The constant OS_CHROMEOS must not be defined.
  15. The constant OS_POSIX must be defined.
  16. The constants OS_ANDROID and OS_CHROMEOS must not be defined, and the constant \ must be defined.
  17. The constants OS_LINUX, OS_MACOSX and OS_WIN must be defined.
  18. The constant OS_LINUX must be defined.
  19. The constant ENABLE_IPC_FUZZER must be defined.
  20. The constant USE_CRAS must be defined.
  21. The constants OS_ANDROID and OS_CHROMEOS must not be defined.

Based on top-of-tree Chromium code, updated daily and open sourceRSS Feed?
Append ?date=YYYY-MM-DD to the URL to get a snapshot of the supported switches at a certain date.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值