Chromium Command Line Switches

List of Chromium Command Line Switches

There are a lot of command line switches 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 2013-02-13.

The values the kOmniboxInlineHistoryQuickProvider switch may have, as in “–omnibox-inline-history-quick-provider-allowed=1” allowed: if HistoryQuickProvider thinks it appropriate, it can inline ( == current behavior as of 2/2012). ↪

Enables the sandboxed processes to run without a job object assigned to them. This flag is required to allow Chrome to run in RemoteApps or Citrix. This flag can reduce the security of the sandboxed processes and allow them to do certain API calls like shut down Windows or access the clipboard. Also we lose the chance to kill some processes until the outer job that owns them finishes. ↪

A setting to cause extension/app installs from the webstore skip the normal confirmation dialog. A value of ‘accept’ means to always act as if the dialog was accepted, and ‘cancel’ means to always act as if the dialog was cancelled. ↪

Enables an animated transition from the boot splash screen (Chrome logo on a white background) to the login screen. Implies |kAshCopyHostBackgroundAtBoot| and doesn’t make much sense if used in conjunction with |kDisableBootAnimation| (since the transition begins at the same time as the white/grayscale login screen animation). ↪

Copies the host window’s content to the system background layer at startup. Can make boot slightly slower, but also hides an even-longer awkward period where we display a white background if the login wallpaper takes a long time to load. ↪

Specifies the layout mode and offsets for the secondary display for testing. The format is “<t|r|b|l>,<offset>” where t=TOP, r=RIGHT, b=BOTTOM and L=LEFT. For example, ‘r,-100’ means the secondary display is positioned on the right with -100 offset. (above than primary) ↪

(Most) Chrome OS hardware reports ACPI power button releases correctly. Standard hardware reports releases immediately after presses. If set, we lock the screen or shutdown the system immediately in response to a press instead of displaying an interactive animation. ↪

HTTP authentication schemes to enable. This is a comma-separated list of authentication schemes (basic, digest, ntlm, and negotiate). By default all schemes are enabled. The primary use of this command line flag is to help triage authentication-related issues reported by end-users. ↪

Comma-separated list of BrowserThreads that cause browser process to crash if the given browser thread is not responsive. UI,IO,DB,FILE,CACHE are the list of BrowserThreads that are supported. For example: –crash-on-hang-threads=UI:3:18,IO:3:18 –> Crash the browser if UI or IO is not responsive for 18 seconds and the number of browser threads that are responding is less than or equal to 3. ↪

Some platforms like ChromeOS default to empty desktop. Browser tests may need to add this switch so that at least one browser instance is created on startup. TODO(nkostylev): Investigate if this switch could be removed. (http://crbug.com/148675) ↪

If the program includes base/debug/debug_on_start_win.h, the process will (on Windows only) start the JIT system-registered debugger on itself and will wait for 60 seconds for the debugger to attach to itself. Then a break point will be hit. ↪

Disables client-visible 3D APIs, in particular WebGL and Pepper 3D. This is controlled by policy and is kept separate from the other enable/disable switches to avoid accidentally regressing the policy support for controlling access to these APIs. ↪

Disables the client-side phishing detection feature. Note that even if client-side phishing detection is enabled, it will only be active if the user has opted in to UMA stats and SafeBrowsing is enabled in the preferences. ↪

Suppresses hang monitor dialogs in renderer processes. This may allow slow unload handlers on a page to prevent the tab from closing, but the Task Manager can be used to terminate the offending process in this case. ↪

Don’t resolve hostnames to IPv6 addresses. This can be used when debugging issues relating to IPv6, but shouldn’t otherwise be needed. Be sure to file bugs if something isn’t working properly in the presence of IPv6. This flag can be overidden by the “enable-ipv6” flag. ↪

Normally when the user attempts to navigate to a page that was the result of a post we prompt to make sure they want to. This switch may be used to disable that check. This switch is used during automated testing. ↪

Some tests seem to require the application to close when the last browser window is closed. Thus, we need a switch to force this behavior for ChromeOS Aura, disable “zero window mode”. TODO(pkotwicz): Investigate if this bug can be removed. (http://crbug.com/119175) ↪

Specifies if the |DOMAutomationController| needs to be bound in the renderer. This binding happens on per-frame basis and hence can potentially be a performance bottleneck. One should only enable it when automating dom based tests. Also enables sending/receiving renderer automation messages through the |AutomationRenderViewHelper|. TODO(kkania): Rename this to enable-renderer-automation after moving the |DOMAutomationController| to the |AutomationRenderViewHelper|. ↪

Enables the pre- and auto-login features. When a user signs in to sync, the browser’s cookie jar is pre-filled with GAIA cookies. When the user visits a GAIA login page, an info bar can help the user login. ↪

A flag, generated internally by Chrome for renderer and other helper process command lines on Linux and Mac. It tells the helper process to enable crash dumping and reporting, because helpers cannot access the profile or other files needed to make this decision. ↪

By default, a page is laid out to fill the entire width of the window. This flag fixes the layout of the page to a default of 980 CSS pixels, or to a specified width and height using –enable-fixed-layout=w,h ↪

Enable/Disable the creation of compositing layers for fixed position elements. Three options are needed to support four possible scenarios: 1. Default (disabled) 2. Enabled always (to allow dogfooding) 3. Disabled always (to give safety fallback for users) 4. Enabled only if we detect a highDPI display Option #4 may soon be the default, because the feature is needed soon for high DPI, but cannot be used (yet) for low DPI. Options #2 and #3 will override Option #4. ↪

Enables IPv6 support, even if probes suggest that it may not be fully supported. Some probes may require internet connections, and this flag will allow support independent of application testing. This flag overrides “disable-ipv6” which appears elswhere in this file. ↪

Enables tracking of tasks in profiler for viewing via about:profiler. To predominantly disable tracking (profiling), use the command line switch: –enable-profiling=0 Some tracking will still take place at startup, but it will be turned off during chrome_browser_main. ↪

Controls the support for SDCH filtering (dictionary based expansion of content). By default SDCH filtering is enabled. To disable SDCH filtering, use “–enable-sdch=0” as command line argument. SDCH is currently only supported server-side for searches on google.com. ↪

Experimentally ensures that each renderer process: 1) Only handles rendering for pages from a single site, apart from iframes. (Note that a page can reference content from multiple origins due to images, JavaScript files, etc. Cross-site iframes are also loaded in-process.) 2) Only has authority to see or use cookies for the page’s top-level origin. (So if a.com iframes b.com, the b.com network request will be sent without cookies.) This is expected to break compatibility with many pages for now. Unlike the –site-per-process flag, this allows cross-site iframes, but it blocks all cookies on cross-site requests. ↪

Spawns threads to watch for excessive delays in specified message loops. User should set breakpoints on Alarm() to examine problematic thread. Usage: -enable-watchdog=[ui][io] Order of the listed sub-arguments does not matter. ↪

Fakes the channel of the browser for purposes of Variations filtering. This is to be used for testing only. Possible values are “stable”, “beta”, “dev” and “canary”. Note that this only applies if the browser’s reported channel is UNKNOWN. ↪

Some field trials may be randomized in the browser, and the randomly selected outcome needs to be propagated to the renderer. For instance, this is used to modify histograms recorded in the renderer, or to get the renderer to also set of its state (initialize, or not initialize components) to match the experiment(s). The option is also useful for forcing field trials when testing changes locally. The argument is a list of name and value pairs, separated by slashes. See FieldTrialList::CreateTrialsFromString() in field_trial.h for details. ↪

Inform Chrome that a GPU context will not be lost in power saving mode, screen saving mode, etc. Note that this flag does not ensure that a GPU context will never be lost in any situations, say, a GPU reset. ↪

Makes Windows happy by allowing it to show “Enable access to this program” checkbox in Add/Remove Programs->Set Program Access and Defaults. This only shows an error box because the only way to hide Chrome is by uninstalling it. ↪

If a resource is requested at a scale factor at which it is not available or the resource is the incorrect size (based on the size of the 1x resource), generates the missing resource and applies a red mask to the generated resource. Resources for which hidpi is not supported because of software reasons will show up pixelated. ↪

The maximum number of concurrent host resolve requests (i.e. DNS) to allow (not counting backup attempts which would also consume threads). –host-resolver-retry-attempts must be set to zero for this to be exact. ↪

Comma-separated list of rules that control how hostnames are mapped. For example: “MAP * 127.0.0.1” –> Forces all hostnames to be mapped to 127.0.0.1 “MAP *.google.com proxy” –> Forces all google.com subdomains to be resolved to “proxy”. “MAP test.com [::1]:77 –> Forces “test.com” to resolve to IPv6 loopback. Will also force the port of the resulting socket address to be 77. “MAP * baz, EXCLUDE http://www.google.com&#8221; –> Remaps everything to “baz”, except for “www.google.com”. These mappings apply to the endpoint host in a net::URLRequest (the TCP connect and host resolver in a direct connection, and the CONNECT in an http proxy connection, and the endpoint host in a SOCKS proxy connection). ↪

Takes the JSON-formatted HSTS specification and loads it as if it were a preloaded HSTS entry. Takes precedence over both website-specified rules and built-in rules. The JSON format is the same as that persisted in <profile_dir>/Default/TransportSecurity ↪

Causes net::URLFetchers to ignore requests for SSL client certificates, causing them to attempt an unauthenticated SSL/TLS session. This is intended for use when testing various service URLs (eg: kPromoServerURL, kInstantURL, kSbURLPrefix, kSyncServiceURL, kWalletServiceUrl, etc) ↪

Loads the opencryptoki library into NSS at startup. This is only needed temporarily for developers who need to work on WiFi/VPN certificate code. TODO(gspencer): Remove this switch once cryptohomed work is finished: http://crosbug.com/12295 and http://crosbug.com/12304↪

Allows to override the first login screen. The value should be the name of the first login screen to show (see chrome/browser/chromeos/login/login_wizard_view.cc for actual names). Ignored if kLoginManager is not specified. TODO(avayvod): Remove when the switch is no longer needed for testing. ↪

Enables the recording of metrics reports but disables reporting. In contrast to kDisableMetrics, this executes all the code that a normal client would use for reporting, except the report is dropped rather than sent to the server. This is useful for finding issues in the metrics code during UI and performance tests. ↪

Uses NaCl manifest URL to choose whether NaCl program will be debugged by debug stub. Switch value format: [!]pattern1,pattern2,…,patternN. Each pattern uses the same syntax as patterns in Chrome extension manifest. The only difference is that * scheme matches all schemes instead of matching only http and https. If the value doesn’t start with !, a program will be debugged if manifest URL matches any pattern. If the value starts with !, a program will be debugged if manifest URL does not match any pattern. ↪

Disables all experiments set on about:flags. Does not disable about:flags itself. Useful if an experiment makes chrome crash at startup: One can start chrome with –no-experiments, disable the problematic lab at about:flags and then restart chrome without this switch again. ↪

Support a separate switch that enables the v8 playback extension. The extension causes javascript calls to Date.now() and Math.random() to return consistent values, such that subsequent loads of the same page will result in consistent js-generated data and XHR requests. Pages may still be able to generate inconsistent data from plugins. ↪

Allows for disabling the overlapped I/O for TCP reads. Possible values are “on” or “off”. The default is “on” which matches the existing behavior. “off” switches to use non-blocking reads and WSAEventSelect. ↪

Launches PerformanceMonitor at startup, which will gather statistics about Chrome’s CPU and memory usage, page load times, startup times, and network usage, and will also store information about events which may be of interest, such as extension-related occurrences and crashes. Optionally, this may be run with an integer value representing the interval between the timed metric gatherings, measured in seconds (if invalid or not provided, the default interval is used). ↪

Runs a single process for each site (i.e., group of pages from the same registered domain) the user visits. We default to using a renderer process for each site instance (i.e., group of pages from the same registered domain with script connections to each other). ↪

Runs each set of script-connected tabs (i.e., a BrowsingInstance) in its own renderer process. We default to using a renderer process for each site instance (i.e., group of pages from the same registered domain with script connections to each other). ↪

Starts the sampling based profiler for the browser process at startup. This will only work if chrome has been built with the gyp variable profiling=1. The output will go to the value of kProfilingFile. ↪

Specifies a location for profiling output. This will only work if chrome has been built with the gyp variable profiling=1. {pid} if present will be replaced by the pid of the process. {count} if present will be incremented each time a profile is generated for this process. The default is chrome-profile-{pid}. ↪

Controls whether profile data is periodically flushed to a file. Normally the data gets written on exit but cases exist where chrome doesn’t exit cleanly (especially when using single-process). A time in seconds can be specified. ↪

Specifies a list of hosts for whom we bypass proxy settings and use direct connections. Ignored if –proxy-auto-detect or –no-proxy-server are also specified. This is a comma-separated list of bypass rules. See: “net/proxy/proxy_bypass_rules.h” for the format of these rules. ↪

Adds a “Purge memory” button to the Task Manager, which tries to dump as much memory as possible. This is mostly useful for testing how well the MemoryPurger functionality works. NOTE: This is only implemented for Views. ↪

Chrome supports a playback and record mode. Record mode saves *everything* to the cache. Playback mode reads data exclusively from the cache. This allows us to record a session into the cache and then replay it at will. See also kPlaybackMode. ↪

Indicates the last session should be restored on startup. This overrides the preferences value and is primarily intended for testing. The value of this switch is the number of tabs to wait until loaded before ‘load completed’ is sent to the ui_test. ↪

TODO(lzheng): Remove this flag once the feature works fine (http://crbug.com/74848). Disables safebrowsing feature that checks download url and downloads content’s hash to make sure the content are not malicious. ↪

Disable saving pages as HTML-only, disable saving pages as HTML Complete (with a directory of sub-resources). Enable only saving pages as MHTML. See http://crbug.com/120416 for how to remove this switch. ↪

Experimentally enforces a one-site-per-process security policy. All cross-site navigations force process swaps, and we can restrict a renderer process’s access rights based on its site. For details, see: http://www.chromium.org/developers/design-documents/site-isolation Unlike –enable-strict-site-isolation (which allows cross-site iframes), this flag blocks cross-site documents even in iframes, until out-of-process iframe support is available. Cross-site network requests do attach the normal set of cookies, but a renderer process is only allowed to view or modify cookies for its own site (via JavaScript). TODO(irobert): Implement the cross-site document blocking in http://crbug.com/159215. ↪

Indicates that a stub implementation of CrosSettings that stores settings in memory without signing should be used, treating current user as the owner. This option is for testing the chromeos build of chrome on the desktop only. ↪

Causes TRACE_EVENT flags to be recorded from startup. Optionally, can specify the specific trace categories to include (e.g. –trace-startup=base,net) otherwise, all events are recorded. Setting this flag results in the first call to BeginTracing() to receive all trace events since startup. In Chrome, you may find –trace-startup-file and –trace-startup-duration to control the auto-saving of the trace (not supported in the base-only TraceLog component). ↪

If supplied, sets the file which startup tracing will be stored into, if omitted the default will be used “chrometrace.log” in the current directory. Has no effect unless –trace-startup is also supplied. Example: –trace-startup –trace-startup-file=/tmp/trace_event.log As a special case, can be set to ‘none’ – this disables automatically saving the result to a file and the first manually recorded trace will then receive all events since startup. ↪

Gives the per-module maximal V-logging levels to override the value given by –v. E.g. “my_module=2,foo*=3” would change the logging level for all code in source files “my_module.*” and “foo*.*” (“-inl” suffixes are also disregarded for this matching). Any pattern containing a forward or backward slash will be tested against the whole pathname and not just the module. E.g., “*/foo/bar/*=2” would change the logging level for all code in source files under a “foo/bar” directory. ↪

Share this:

Like this:

One thought on “Chromium Command Line Switches”

Thank God for –force-device-scale-factor !!! With Chrome 36 my netbook suddenly had Chrome scaled to 2x normal size, which made it utterly unusable. In particular, when scaled up, the settings pane came up empty – not even a cropped version of the content – empty – so there wasn’t even a way to try to access the settings to correct the scaling. Not that there was any solution available, but of course that’s the first place a user would look when the app behaviour changes – not on a 3rd party blog! [ PS – Thankyou! ]