1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/common/chrome_switches.h"
7 #include "base/base_switches.h"
8 #include "base/command_line.h"
12 // -----------------------------------------------------------------------------
13 // Can't find the switch you are looking for? try looking in
14 // base/base_switches.cc instead.
16 // When commenting your switch, please use the same voice as surrounding
17 // comments. Imagine "This switch..." at the beginning of the phrase, and it'll
19 // -----------------------------------------------------------------------------
21 // Enables or disables the "action box" UI in the toolbar.
22 const char kActionBox
[] = "action-box";
24 // Allows third-party content included on a page to prompt for a HTTP basic
25 // auth username/password pair.
26 const char kAllowCrossOriginAuthPrompt
[] = "allow-cross-origin-auth-prompt";
28 // On ChromeOS, file:// access is disabled except for certain whitelisted
29 // directories. This switch re-enables file:// for testing.
30 const char kAllowFileAccess
[] = "allow-file-access";
32 // Allows non-https URL for background_page for hosted apps.
33 const char kAllowHTTPBackgroundPage
[] = "allow-http-background-page";
35 // Allows the browser to load extensions that lack a modern manifest when that
36 // would otherwise be forbidden.
37 const char kAllowLegacyExtensionManifests
[] =
38 "allow-legacy-extension-manifests";
40 // Specifies comma-separated list of extension ids to grant access to TCP/UDP
42 const char kAllowNaClSocketAPI
[] = "allow-nacl-socket-api";
44 // Don't block outdated plugins.
45 const char kAllowOutdatedPlugins
[] = "allow-outdated-plugins";
47 // By default, an https page cannot run JavaScript, CSS or plug-ins from http
48 // URLs. This provides an override to get the old insecure behavior.
49 const char kAllowRunningInsecureContent
[] = "allow-running-insecure-content";
51 // Allows injecting extensions and user scripts on the extensions gallery
52 // site. Normally prevented for security reasons, but can be useful for
53 // automation testing of the gallery.
54 const char kAllowScriptingGallery
[] = "allow-scripting-gallery";
56 // Prevents Chrome from requiring authorization to run certain widely installed
57 // but less commonly used plug-ins.
58 const char kAlwaysAuthorizePlugins
[] = "always-authorize-plugins";
60 // Specifies that the extension-app with the specified id should be launched
61 // according to its configuration.
62 const char kAppId
[] = "app-id";
64 // Specifies that the associated value should be launched in "application"
66 const char kApp
[] = "app";
68 // Flag to enable apps_devtool app.
69 const char kAppsDevtool
[] = "apps-devtool";
71 // Specifies the initial size for application windows launched with --app.
72 // --app-window-size=w,h
73 const char kAppWindowSize
[] = "app-window-size";
75 // Overrides the apps checkout URL, which is used to determine when to expose
77 const char kAppsCheckoutURL
[] = "apps-checkout-url";
79 // The URL that the webstore APIs download extensions from.
80 // Note: the URL must contain one '%s' for the extension ID.
81 const char kAppsGalleryDownloadURL
[] = "apps-gallery-download-url";
83 // A setting to cause extension/app installs from the webstore skip the normal
84 // confirmation dialog. A value of 'accept' means to always act as if the dialog
85 // was accepted, and 'cancel' means to always act as if the dialog was
87 const char kAppsGalleryInstallAutoConfirmForTests
[] =
88 "apps-gallery-install-auto-confirm-for-tests";
90 // The URL to use for the gallery link in the app launcher.
91 const char kAppsGalleryURL
[] = "apps-gallery-url";
93 // The update url used by gallery/webstore extensions.
94 const char kAppsGalleryUpdateURL
[] = "apps-gallery-update-url";
96 // Value of OAuth2 refresh token for --force-app-mode.
97 const char kAppModeOAuth2Token
[] = "app-mode-oauth-token";
99 // Whether to always use the new app install bubble when installing an app.
100 const char kAppsNewInstallBubble
[] = "apps-new-install-bubble";
102 // Disable throbber for extension apps.
103 const char kAppsNoThrob
[] = "apps-no-throb";
105 // Whitelist of servers that Negotiate will generate delegated Kerberos tickets
107 const char kAuthNegotiateDelegateWhitelist
[] =
108 "auth-negotiate-delegate-whitelist";
110 // HTTP authentication schemes to enable. This is a comma-separated list of
111 // authentication schemes (basic, digest, ntlm, and negotiate). By default all
112 // schemes are enabled. The primary use of this command line flag is to help
113 // triage authentication-related issues reported by end-users.
114 const char kAuthSchemes
[] = "auth-schemes";
116 // Whitelist of servers which NTLM and Negotiate can automatically authenticate
117 // with using the default credentials of the currently logged in user.
118 const char kAuthServerWhitelist
[] = "auth-server-whitelist";
120 // A flag that is used to tell Chrome that it was launched automatically at
121 // computer startup and not by some user action.
122 const char kAutoLaunchAtStartup
[] = "auto-launch-at-startup";
124 // The value of this switch tells the app to listen for and broadcast
125 // automation-related messages on IPC channel with the given ID.
126 const char kAutomationClientChannelID
[] = "automation-channel";
128 // Causes the automation provider to reinitialize its IPC channel instead of
129 // shutting down when a client disconnects.
130 const char kAutomationReinitializeOnChannelError
[] =
131 "automation-reinitialize-on-channel-error";
133 // How often (in seconds) to check for updates. Should only be used for testing
135 const char kCheckForUpdateIntervalSec
[] = "check-for-update-interval";
137 // Checks the cloud print connector policy, informing the service process if
138 // the policy is set to disallow the connector, then quits.
139 const char kCheckCloudPrintConnectorPolicy
[] =
140 "check-cloud-print-connector-policy";
142 // Run Chrome in Chrome Frame mode. This means that Chrome expects to be run
143 // as a dependent process of the Chrome Frame plugin.
144 const char kChromeFrame
[] = "chrome-frame";
146 // Tells Chrome to delay shutdown (for a specified number of seconds) when a
147 // Chrome Frame automation channel is closed.
148 const char kChromeFrameShutdownDelay
[] = "chrome-frame-shutdown-delay";
150 // Tells chrome to load the specified version of chrome.dll on Windows. If this
151 // version cannot be loaded, Chrome will exit.
152 const char kChromeVersion
[] = "chrome-version";
154 // Comma-separated list of SSL cipher suites to disable.
155 const char kCipherSuiteBlacklist
[] = "cipher-suite-blacklist";
157 // Clears the token service before using it. This allows simulating the
158 // expiration of credentials during testing.
159 const char kClearTokenService
[] = "clear-token-service";
161 // Used with kCloudPrintFile. Tells Chrome to delete the file when finished
162 // displaying the print dialog.
163 const char kCloudPrintDeleteFile
[] = "cloud-print-delete-file";
165 // Tells chrome to display the cloud print dialog and upload the specified file
167 const char kCloudPrintFile
[] = "cloud-print-file";
169 // Specifies the mime type to be used when uploading data from the file
170 // referenced by cloud-print-file. Defaults to "application/pdf" if
172 const char kCloudPrintFileType
[] = "cloud-print-file-type";
174 // Used with kCloudPrintFile to specify a JSON print ticket for the resulting
175 // print job. Defaults to null if unspecified.
176 const char kCloudPrintPrintTicket
[] = "cloud-print-print-ticket";
178 // Used with kCloudPrintFile to specify a title for the resulting print job.
179 const char kCloudPrintJobTitle
[] = "cloud-print-job-title";
181 // Setup cloud print proxy for provided printers. This does not start
182 // service or register proxy for autostart.
183 const char kCloudPrintSetupProxy
[] = "cloud-print-setup-proxy";
185 // The URL of the cloud print service to use, overrides any value stored in
186 // preferences, and the default. Only used if the cloud print service has been
187 // enabled (see enable-cloud-print).
188 const char kCloudPrintServiceURL
[] = "cloud-print-service";
190 // Comma-separated options to troubleshoot the component updater. Only valid
191 // for the browser process.
192 const char kComponentUpdaterDebug
[] = "component-updater-debug";
194 // Causes the browser process to inspect loaded and registered DLLs for known
195 // conflicts and warn the user.
196 const char kConflictingModulesCheck
[] = "conflicting-modules-check";
198 // Toggles a new version of the content settings dialog in options.
199 const char kContentSettings2
[] = "new-content-settings";
201 // The Country we should use. This is normally obtained from the operating
202 // system during first run and cached in the preferences afterwards. This is a
203 // string value, the 2 letter code from ISO 3166-1.
204 const char kCountry
[] = "country";
206 // Comma-separated list of BrowserThreads that cause browser process to crash
207 // if the given browser thread is not responsive. UI,IO,DB,FILE,CACHE are the
208 // list of BrowserThreads that are supported.
211 // --crash-on-hang-threads=UI:3:18,IO:3:18 --> Crash the browser if UI or IO
212 // is not responsive for 18 seconds and the number of browser threads that
213 // are responding is less than or equal to 3.
214 const char kCrashOnHangThreads
[] = "crash-on-hang-threads";
216 // Some platforms like ChromeOS default to empty desktop.
217 // Browser tests may need to add this switch so that at least one browser
218 // instance is created on startup.
219 // TODO(nkostylev): Investigate if this switch could be removed.
220 // (http://crbug.com/148675)
221 const char kCreateBrowserOnStartupForTests
[] =
222 "create-browser-on-startup-for-tests";
224 // Enables a frame context menu item that toggles the frame in and out of glass
225 // mode (Windows Vista and up only).
226 const char kDebugEnableFrameToggle
[] = "debug-enable-frame-toggle";
228 // Adds debugging entries such as Inspect Element to context menus of packed
230 const char kDebugPackedApps
[] = "debug-packed-apps";
232 // Enables support to debug printing subsystem.
233 const char kDebugPrint
[] = "debug-print";
235 // Specifies the URL at which to fetch configuration policy from the device
236 // management backend. Specifying this switch turns on managed policy from the
237 // device management backend.
238 const char kDeviceManagementUrl
[] = "device-management-url";
240 // Triggers a plethora of diagnostic modes.
241 const char kDiagnostics
[] = "diagnostics";
243 // Replaces the audio IPC layer for <audio> and <video> with a mock audio
244 // device, useful when using remote desktop or machines without sound cards.
245 // This is temporary until we fix the underlying problem.
247 // Disables the experimental asynchronous DNS client.
248 const char kDisableAsyncDns
[] = "disable-async-dns";
250 // Disables CNAME lookup of the host when generating the Kerberos SPN for a
251 // Negotiate challenge. See HttpAuthHandlerNegotiate::CreateSPN for more
253 const char kDisableAuthNegotiateCnameLookup
[] =
254 "disable-auth-negotiate-cname-lookup";
256 // Disables background mode (background apps will not keep chrome running in
258 const char kDisableBackgroundMode
[] = "disable-background-mode";
260 // Disable several subsystems which run network requests in the background.
261 // This is for use when doing network performance testing to avoid noise in the
263 const char kDisableBackgroundNetworking
[] = "disable-background-networking";
265 // Disables the bundled PPAPI version of Flash.
266 const char kDisableBundledPpapiFlash
[] = "disable-bundled-ppapi-flash";
268 // Disables the bookmark autocomplete provider (BookmarkProvider).
269 const char kDisableBookmarkAutocompleteProvider
[] =
270 "disable-bookmark-autocomplete-provider";
272 // Disables the client-side phishing detection feature. Note that even if
273 // client-side phishing detection is enabled, it will only be active if the
274 // user has opted in to UMA stats and SafeBrowsing is enabled in the
276 const char kDisableClientSidePhishingDetection
[] =
277 "disable-client-side-phishing-detection";
279 const char kDisableComponentUpdate
[] = "disable-component-update";
281 // Disables establishing certificate revocation information by downloading a
282 // set of CRLs rather than performing on-line checks.
283 const char kDisableCRLSets
[] = "disable-crl-sets";
285 // Disables the custom JumpList on Windows 7.
286 const char kDisableCustomJumpList
[] = "disable-custom-jumplist";
288 // Disables installation of default apps on first run. This is used during
289 // automated testing.
290 const char kDisableDefaultApps
[] = "disable-default-apps";
292 // Disables retrieval of PAC URLs from DHCP as per the WPAD standard.
293 const char kDisableDhcpWpad
[] = "disable-dhcp-wpad";
295 // Disable extensions.
296 const char kDisableExtensions
[] = "disable-extensions";
298 // Disable checking for user opt-in for extensions that want to inject script
299 // into file URLs (ie, always allow it). This is used during automated testing.
300 const char kDisableExtensionsFileAccessCheck
[] =
301 "disable-extensions-file-access-check";
303 // Disable the net::URLRequestThrottlerManager functionality for
304 // requests originating from extensions.
305 const char kDisableExtensionsHttpThrottling
[] =
306 "disable-extensions-http-throttling";
308 // Disable mandatory enforcement of web_accessible_resources in extensions.
309 const char kDisableExtensionsResourceWhitelist
[] =
310 "disable-extensions-resource-whitelist";
312 // Disables automatically making app run in full screen in force app mode.
313 const char kDisableFullscreenApp
[] = "disable-fullscreen-app";
315 // Disable Instant extended API.
316 const char kDisableInstantExtendedAPI
[] = "disable-instant-extended-api";
318 // Disables improved SafeBrowsing download protection.
319 const char kDisableImprovedDownloadProtection
[] =
320 "disable-improved-download-protection";
322 // Don't resolve hostnames to IPv6 addresses. This can be used when debugging
323 // issues relating to IPv6, but shouldn't otherwise be needed. Be sure to file
324 // bugs if something isn't working properly in the presence of IPv6. This flag
325 // can be overidden by the "enable-ipv6" flag.
326 const char kDisableIPv6
[] = "disable-ipv6";
328 // Disables IP Pooling within the networks stack (SPDY only). When a connection
329 // is needed for a domain which shares an IP with an existing connection,
330 // attempt to use the existing connection.
331 const char kDisableIPPooling
[] = "disable-ip-pooling";
333 // Disables the menu on the NTP for accessing sessions from other devices.
334 const char kDisableNTPOtherSessionsMenu
[] = "disable-ntp-other-sessions-menu";
336 // Disable pop-up blocking.
337 const char kDisablePopupBlocking
[] = "disable-popup-blocking";
339 // Disable speculative TCP/IP preconnection.
340 const char kDisablePreconnect
[] = "disable-preconnect";
342 // Normally when the user attempts to navigate to a page that was the result of
343 // a post we prompt to make sure they want to. This switch may be used to
344 // disable that check. This switch is used during automated testing.
345 const char kDisablePromptOnRepost
[] = "disable-prompt-on-repost";
347 // Prevents the URLs of BackgroundContents from being remembered and
348 // re-launched when the browser restarts.
349 const char kDisableRestoreBackgroundContents
[] =
350 "disable-restore-background-contents";
352 // Disables restoring session state (cookies, session storage, etc.) when
353 // restoring the browsing session.
354 const char kDisableRestoreSessionState
[] = "disable-restore-session-state";
356 // Disables throttling prints initiated by scripts.
357 const char kDisableScriptedPrintThrottling
[] =
358 "disable-scripted-print-throttling";
360 // Disables syncing browser data to a Google Account.
361 const char kDisableSync
[] = "disable-sync";
363 // Disables syncing of app settings.
364 const char kDisableSyncAppSettings
[] = "disable-sync-app-settings";
366 // Disables syncing of apps.
367 const char kDisableSyncApps
[] = "disable-sync-apps";
369 // Disables syncing of autofill.
370 const char kDisableSyncAutofill
[] = "disable-sync-autofill";
372 // Disables syncing of autofill Profile.
373 const char kDisableSyncAutofillProfile
[] = "disable-sync-autofill-profile";
375 // Disables syncing of bookmarks.
376 const char kDisableSyncBookmarks
[] = "disable-sync-bookmarks";
378 // Disables syncing of dictionary.
379 const char kDisableSyncDictionary
[] = "disable-sync-dictionary";
381 // Disables syncing extension settings.
382 const char kDisableSyncExtensionSettings
[] = "disable-sync-extension-settings";
384 // Disables syncing of extensions.
385 const char kDisableSyncExtensions
[] = "disable-sync-extensions";
387 // Disables syncing of history delete directives.
388 const char kDisableSyncHistoryDeleteDirectives
[] =
389 "disable-sync-history-delete-directives";
391 // Disables syncing browser passwords.
392 const char kDisableSyncPasswords
[] = "disable-sync-passwords";
394 // Disables syncing of preferences.
395 const char kDisableSyncPreferences
[] = "disable-sync-preferences";
397 // Disable syncing custom search engines.
398 const char kDisableSyncSearchEngines
[] = "disable-sync-search-engines";
400 // Disables syncing browser sessions. Will override kEnableSyncTabs.
401 const char kDisableSyncTabs
[] = "disable-sync-tabs";
403 // Disables syncing of themes.
404 const char kDisableSyncThemes
[] = "disable-sync-themes";
406 // Disables syncing browser typed urls.
407 const char kDisableSyncTypedUrls
[] = "disable-sync-typed-urls";
409 // Allows disabling of translate from the command line to assist with automated
410 // browser testing (e.g. Selenium/WebDriver). Normal browser users should
411 // disable translate with the preference.
412 const char kDisableTranslate
[] = "disable-translate";
414 // Disables TLS Channel ID extension.
415 const char kDisableTLSChannelID
[] = "disable-tls-channel-id";
417 // Disables the backend service for web resources.
418 const char kDisableWebResources
[] = "disable-web-resources";
420 // Some tests seem to require the application to close when the last
421 // browser window is closed. Thus, we need a switch to force this behavior
422 // for ChromeOS Aura, disable "zero window mode".
423 // TODO(pkotwicz): Investigate if this bug can be removed.
424 // (http://crbug.com/119175)
425 const char kDisableZeroBrowsersOpenForTests
[] =
426 "disable-zero-browsers-open-for-tests";
428 // Use a specific disk cache location, rather than one derived from the
430 const char kDiskCacheDir
[] = "disk-cache-dir";
432 // Forces the maximum disk space to be used by the disk cache, in bytes.
433 const char kDiskCacheSize
[] = "disk-cache-size";
435 const char kDnsLogDetails
[] = "dns-log-details";
437 // Disables prefetching of DNS information.
438 const char kDnsPrefetchDisable
[] = "dns-prefetch-disable";
440 // Dump any accumualted histograms to the log when browser terminates (requires
441 // logging to be enabled to really do anything). Used by developers and test
443 const char kDumpHistogramsOnExit
[] = "dump-histograms-on-exit";
445 // Enables the experimental asynchronous DNS client.
446 const char kEnableAsyncDns
[] = "enable-async-dns";
448 // Enables the inclusion of non-standard ports when generating the Kerberos SPN
449 // in response to a Negotiate challenge. See
450 // HttpAuthHandlerNegotiate::CreateSPN for more background.
451 const char kEnableAuthNegotiatePort
[] = "enable-auth-negotiate-port";
453 // Enables the pre- and auto-login features. When a user signs in to sync, the
454 // browser's cookie jar is pre-filled with GAIA cookies. When the user visits a
455 // GAIA login page, an info bar can help the user login.
456 const char kEnableAutologin
[] = "enable-autologin";
458 // Enables the benchmarking extensions.
459 const char kEnableBenchmarking
[] = "enable-benchmarking";
461 // This applies only when the process type is "service". Enables the Cloud
462 // Print Proxy component within the service process.
463 const char kEnableCloudPrintProxy
[] = "enable-cloud-print-proxy";
465 // Enables fetching and storing cloud policy for components. This currently
466 // supports policy for extensions on Chrome OS.
467 const char kEnableComponentCloudPolicy
[] = "enable-component-cloud-policy";
469 // Enables fetching the user's contacts from Google and showing them in the
470 // Chrome OS apps list.
471 const char kEnableContacts
[] = "enable-contacts";
473 // Enables desktop guest mode.
474 const char kEnableDesktopGuestMode
[] = "enable-desktop-guest-mode";
476 // If true devtools experimental settings are enabled.
477 const char kEnableDevToolsExperiments
[] = "enable-devtools-experiments";
479 // Enables an interactive autocomplete UI and a way to invoke this UI from
480 // WebKit by enabling HTMLFormElement#requestAutocomplete (and associated
481 // autocomplete* events and logic).
482 const char kEnableInteractiveAutocomplete
[] = "enable-interactive-autocomplete";
484 // Enables extensions to be easily installed from sites other than the web
485 // store. Without this flag, they can still be installed, but must be manually
486 // dragged onto chrome://extensions/.
487 const char kEasyOffStoreExtensionInstall
[] = "easy-off-store-extension-install";
489 // Enables extension APIs that are in development.
490 const char kEnableExperimentalExtensionApis
[] =
491 "enable-experimental-extension-apis";
493 // Enables logging for extension activity.
494 const char kEnableExtensionActivityLogging
[] =
495 "enable-extension-activity-logging";
497 const char kEnableExtensionActivityLogTesting
[] =
498 "enable-extension-activity-log-testing";
500 // Enables the extension activity UI.
501 const char kEnableExtensionActivityUI
[] = "enable-extension-activity-ui";
503 // Enables or disables showing extensions in the action box.
504 const char kExtensionsInActionBox
[] = "extensions-in-action-box";
506 // Enables or disables running extensions on chrome:// URLs.
507 // Extensions still need to explicitly request access to chrome:// URLs in the
509 const char kExtensionsOnChromeURLs
[] = "extensions-on-chrome-urls";
511 // By default, cookies are not allowed on file://. They are needed for testing,
512 // for example page cycler and layout tests. See bug 1157243.
513 const char kEnableFileCookies
[] = "enable-file-cookies";
515 // Enables Google Now integration.
516 const char kEnableGoogleNowIntegration
[] = "enable-google-now-integration";
518 // Enable Instant extended API. On mobile, this merely enables query extraction,
519 // not the rest of the instant-extended functionality.
520 const char kEnableInstantExtendedAPI
[] = "enable-instant-extended-api";
522 // Enables IPv6 support, even if probes suggest that it may not be fully
523 // supported. Some probes may require internet connections, and this flag will
524 // allow support independent of application testing. This flag overrides
525 // "disable-ipv6" which appears elswhere in this file.
526 const char kEnableIPv6
[] = "enable-ipv6";
528 /// Enables the IPC fuzzer for reliability testing
529 const char kEnableIPCFuzzing
[] = "enable-ipc-fuzzing";
531 // Enables IP Pooling within the networks stack (SPDY only). When a connection
532 // is needed for a domain which shares an IP with an existing connection,
533 // attempt to use the existing connection.
534 const char kEnableIPPooling
[] = "enable-ip-pooling";
536 // Enables support for user profiles that are managed by another user and can
537 // have restrictions applied.
538 const char kEnableManagedUsers
[] = "enable-managed-users";
540 // Make the values returned to window.performance.memory more granular and more
541 // up to date. Without this flag, the memory information is still available, but
542 // it is bucketized and updated less frequently.
543 const char kEnableMemoryInfo
[] = "enable-memory-info";
545 // Enables metrics recording and reporting in the browser startup sequence, as
546 // if this was an official Chrome build where the user allowed metrics
547 // reporting. This is used for testing only.
548 const char kEnableMetricsReportingForTesting
[] =
549 "enable-metrics-reporting-for-testing";
551 // Enables the chrome://memory-internals/ page.
552 const char kEnableMemoryInternalsUI
[] = "enable-memory-internals-ui";
554 // Runs the Native Client inside the renderer process and enables GPU plugin
555 // (internally adds lEnableGpuPlugin to the command line).
556 const char kEnableNaCl
[] = "enable-nacl";
558 // Enables debugging via RSP over a socket.
559 const char kEnableNaClDebug
[] = "enable-nacl-debug";
561 // Enables hardware exception handling via debugger process.
562 const char kEnableNaClExceptionHandling
[] = "enable-nacl-exception-handling";
564 // Enables the native Autofill UI, which is part of the browser process rather
565 // than part of the renderer process. http://crbug.com/51644
566 const char kEnableNativeAutofillUi
[] = "enable-new-autofill-ui";
568 // Enables the network-related benchmarking extensions.
569 const char kEnableNetBenchmarking
[] = "enable-net-benchmarking";
571 // Enables NPN and SPDY. In case server supports SPDY, browser will use SPDY.
572 const char kEnableNpn
[] = "enable-npn";
574 // Enables NPN with HTTP. It means NPN is enabled but SPDY won't be used.
575 // HTTP is still used for all requests.
576 const char kEnableNpnHttpOnly
[] = "enable-npn-http";
578 // Enables panels (always on-top docked pop-up windows).
579 const char kEnablePanels
[] = "enable-panels";
581 // Enables password generation when we detect that the user is going through
583 const char kEnablePasswordGeneration
[] = "enable-password-generation";
585 // Enables the installation and usage of Portable Native Client.
586 const char kEnablePnacl
[] = "enable-pnacl";
588 // Enables tracking of tasks in profiler for viewing via about:profiler.
589 // To predominantly disable tracking (profiling), use the command line switch:
590 // --enable-profiling=0
591 // Some tracking will still take place at startup, but it will be turned off
592 // during chrome_browser_main.
593 const char kEnableProfiling
[] = "enable-profiling";
595 // Enables support for the QUIC protocol. This is a temporary testing flag.
596 const char kEnableQuic
[] = "enable-quic";
598 // Enables content settings based on host *and* plug-in in the user
600 const char kEnableResourceContentSettings
[] =
601 "enable-resource-content-settings";
603 // Controls the support for SDCH filtering (dictionary based expansion of
604 // content). By default SDCH filtering is enabled. To disable SDCH filtering,
605 // use "--enable-sdch=0" as command line argument. SDCH is currently only
606 // supported server-side for searches on google.com.
607 const char kEnableSdch
[] = "enable-sdch";
609 // Enable SPDY/3.1. This is a temporary testing flag.
610 const char kEnableSpdy31
[] = "enable-spdy31";
612 // Enable SPDY CREDENTIAL frame support. This is a temporary testing flag.
613 const char kEnableSpdyCredentialFrames
[] = "enable-spdy-credential-frames";
615 // Enables auto correction for misspelled words.
616 const char kEnableSpellingAutoCorrect
[] = "enable-spelling-auto-correct";
618 // Enables the stacked tabstrip.
619 const char kEnableStackedTabStrip
[] = "enable-stacked-tab-strip";
621 // Enables experimental suggestions pane in New Tab page.
622 const char kEnableSuggestionsTabPage
[] = "enable-suggestions-ntp";
624 // Enables synced notifications.
625 const char kEnableSyncSyncedNotifications
[] =
626 "enable-sync-synced-notifications";
628 // Enables synced favicons
629 const char kEnableSyncFavicons
[] = "enable-sync-favicons";
631 // Enables context menu for selecting groups of tabs.
632 const char kEnableTabGroupsContextMenu
[] = "enable-tab-groups-context-menu";
634 // Enables Alternate-Protocol when the port is user controlled (> 1024).
635 const char kEnableUserAlternateProtocolPorts
[] =
636 "enable-user-controlled-alternate-protocol-ports";
638 // Spawns threads to watch for excessive delays in specified message loops.
639 // User should set breakpoints on Alarm() to examine problematic thread.
641 // Usage: -enable-watchdog=[ui][io]
643 // Order of the listed sub-arguments does not matter.
644 const char kEnableWatchdog
[] = "enable-watchdog";
646 // Uses WebSocket over SPDY.
647 const char kEnableWebSocketOverSpdy
[] = "enable-websocket-over-spdy";
649 // Explicitly allows additional ports using a comma-separated list of port
651 const char kExplicitlyAllowedPorts
[] = "explicitly-allowed-ports";
653 // The time in seconds that an extension event page can be idle before it
655 const char kEventPageIdleTime
[] = "event-page-idle-time";
657 // The time in seconds that an extension event page has between being notified
658 // of its impending unload and that unload happening.
659 const char kEventPageSuspendingTime
[] = "event-page-unloading-time";
661 // Marks a renderer as extension process.
662 const char kExtensionProcess
[] = "extension-process";
664 // Frequency in seconds for Extensions auto-update.
665 const char kExtensionsUpdateFrequency
[] = "extensions-update-frequency";
667 // Fakes the channel of the browser for purposes of Variations filtering. This
668 // is to be used for testing only. Possible values are "stable", "beta", "dev"
669 // and "canary". Note that this only applies if the browser's reported channel
671 const char kFakeVariationsChannel
[] = "fake-variations-channel";
673 // These two flags are added around the switches about:flags adds to the
674 // command line. This is useful to see which switches were added by about:flags
675 // on about:version. They don't have any effect.
676 const char kFlagSwitchesBegin
[] = "flag-switches-begin";
677 const char kFlagSwitchesEnd
[] = "flag-switches-end";
679 // Alternative feedback server to use when submitting user feedback
680 const char kFeedbackServer
[] = "feedback-server";
682 // The file descriptor limit is set to the value of this switch, subject to the
683 // OS hard limits. Useful for testing that file descriptor exhaustion is
684 // handled gracefully.
685 const char kFileDescriptorLimit
[] = "file-descriptor-limit";
687 // Forces application mode. This hides certain system UI elements and forces
688 // the app to be installed if it hasn't been already.
689 const char kForceAppMode
[] = "force-app-mode";
691 // Displays the First Run experience when the browser is started, regardless of
692 // whether or not it's actually the First Run (this overrides kNoFirstRun).
693 const char kForceFirstRun
[] = "force-first-run";
695 // Tries to load cloud policy for every signed in user, regardless of whether
696 // they are a dasher user or not. Used to allow any GAIA account to be used for
697 // testing the cloud policy framework.
698 const char kForceLoadCloudPolicy
[] = "force-load-cloud-policy";
700 // Enables using GAIA information to populate profile name and icon.
701 const char kGaiaProfileInfo
[] = "gaia-profile-info";
703 // Specifies an alternate URL to use for retrieving the search domain for
704 // Google. Useful for testing.
705 const char kGoogleSearchDomainCheckURL
[] = "google-search-domain-check-url";
707 // Specifies a custom name for the GSSAPI library to load.
708 const char kGSSAPILibraryName
[] = "gssapi-library-name";
710 // These flags show the man page on Linux. They are equivalent to each
712 const char kHelp
[] = "help";
713 const char kHelpShort
[] = "h";
715 // Makes Windows happy by allowing it to show "Enable access to this program"
716 // checkbox in Add/Remove Programs->Set Program Access and Defaults. This only
717 // shows an error box because the only way to hide Chrome is by uninstalling
719 const char kHideIcons
[] = "hide-icons";
721 // If false the alignment of the launcher can be changed.
722 const char kHideLauncherAlignmentMenu
[] = "hide-launcher-alignment-menu";
724 // Disables full history sync.
725 const char kHistoryDisableFullHistorySync
[] = "disable-full-history-sync";
727 // Enables full history sync (not just typed URLs) for signed-in users.
728 const char kHistoryEnableFullHistorySync
[] = "enable-full-history-sync";
730 // Enables grouping websites by domain and filtering them by period.
731 const char kHistoryEnableGroupByDomain
[] = "enable-grouped-history";
733 // Specifies which page will be displayed in newly-opened tabs. We need this
734 // for testing purposes so that the UI tests don't depend on what comes up for
735 // http://google.com.
736 const char kHomePage
[] = "homepage";
738 // Comma-separated list of rules that control how hostnames are mapped.
741 // "MAP * 127.0.0.1" --> Forces all hostnames to be mapped to 127.0.0.1
742 // "MAP *.google.com proxy" --> Forces all google.com subdomains to be
743 // resolved to "proxy".
744 // "MAP test.com [::1]:77 --> Forces "test.com" to resolve to IPv6 loopback.
745 // Will also force the port of the resulting
746 // socket address to be 77.
747 // "MAP * baz, EXCLUDE www.google.com" --> Remaps everything to "baz",
748 // except for "www.google.com".
750 // These mappings apply to the endpoint host in a net::URLRequest (the TCP
751 // connect and host resolver in a direct connection, and the CONNECT in an http
752 // proxy connection, and the endpoint host in a SOCKS proxy connection).
753 const char kHostRules
[] = "host-rules";
755 // The maximum number of concurrent host resolve requests (i.e. DNS) to allow
756 // (not counting backup attempts which would also consume threads).
757 // --host-resolver-retry-attempts must be set to zero for this to be exact.
758 const char kHostResolverParallelism
[] = "host-resolver-parallelism";
760 // The maximum number of retry attempts to resolve the host. Set this to zero
761 // to disable host resolver retry attempts.
762 const char kHostResolverRetryAttempts
[] = "host-resolver-retry-attempts";
764 // Takes the JSON-formatted HSTS specification and loads it as if it were a
765 // preloaded HSTS entry. Takes precedence over both website-specified rules and
766 // built-in rules. The JSON format is the same as that persisted in
767 // <profile_dir>/Default/TransportSecurity
768 const char kHstsHosts
[] = "hsts-hosts";
770 // Causes net::URLFetchers to ignore requests for SSL client certificates,
771 // causing them to attempt an unauthenticated SSL/TLS session. This is intended
772 // for use when testing various service URLs (eg: kPromoServerURL, kInstantURL,
773 // kSbURLPrefix, kSyncServiceURL, etc)
774 const char kIgnoreUrlFetcherCertRequests
[] =
775 "ignore-urlfetcher-cert-requests";
777 // Performs importing from another browser. The value associated with this
778 // setting encodes the target browser and what items to import.
779 const char kImport
[] = "import";
781 // Performs bookmark importing from an HTML file. The value associated with
782 // this setting encodes the file path. It may be used jointly with kImport.
783 const char kImportFromFile
[] = "import-from-file";
785 // Causes the browser to launch directly in incognito mode.
786 const char kIncognito
[] = "incognito";
788 // Causes Chrome to attempt to get metadata from the webstore for the
789 // app/extension ID given, and then prompt the user to download and install it.
790 const char kInstallFromWebstore
[] = "install-from-webstore";
792 // Marks a renderer as an Instant process.
793 const char kInstantProcess
[] = "instant-process";
795 // URL to use for instant. If specified this overrides the url from the
797 const char kInstantURL
[] = "instant-url";
799 // Used for testing - keeps browser alive after last browser window closes.
800 const char kKeepAliveForTest
[] = "keep-alive-for-test";
802 // Enable Kiosk mode.
803 const char kKioskMode
[] = "kiosk";
805 // Print automatically in kiosk mode. |kKioskMode| must be set as well.
806 // See http://crbug.com/31395.
807 const char kKioskModePrinting
[] = "kiosk-printing";
809 // Causes Chrome to attempt to get metadata from the webstore for the
810 // given item, and then prompt the user to download and install it.
811 const char kLimitedInstallFromWebstore
[] = "limited-install-from-webstore";
813 // Loads an app from the specified directory and launches it.
814 const char kLoadAndLaunchApp
[] = "load-and-launch-app";
816 // Comma-separated list of directories with component extensions to load.
817 const char kLoadComponentExtension
[] = "load-component-extension";
819 // If present, disables the loading and application of cloud policy for
821 const char kDisableCloudPolicyOnSignin
[] = "disable-cloud-policy-on-signin";
823 // Loads an extension from the specified directory.
824 const char kLoadExtension
[] = "load-extension";
826 // Loads the opencryptoki library into NSS at startup. This is only needed
827 // temporarily for developers who need to work on WiFi/VPN certificate code.
829 // TODO(gspencer): Remove this switch once cryptohomed work is finished:
830 // http://crosbug.com/12295 and http://crosbug.com/12304
831 const char kLoadOpencryptoki
[] = "load-opencryptoki";
833 // Enables displaying net log events on the command line, or writing the events
834 // to a separate file if a file name is given.
835 const char kLogNetLog
[] = "log-net-log";
837 // Uninstalls an extension with the specified extension id.
838 const char kUninstallExtension
[] = "uninstall-extension";
840 // Starts the browser in managed mode.
841 const char kManaged
[] = "managed";
843 // Makes Chrome default browser
844 const char kMakeDefaultBrowser
[] = "make-default-browser";
846 // Forces the maximum disk space to be used by the media cache, in bytes.
847 const char kMediaCacheSize
[] = "media-cache-size";
849 // Enables dynamic loading of the Memory Profiler DLL, which will trace all
850 // memory allocations during the run.
851 const char kMemoryProfiling
[] = "memory-profile";
853 // Enables histograming of tasks served by MessageLoop. See
854 // about:histograms/Loop for results, which show frequency of messages on each
855 // thread, including APC count, object signalling count, etc.
856 const char kMessageLoopHistogrammer
[] = "message-loop-histogrammer";
858 // Enables the recording of metrics reports but disables reporting. In contrast
859 // to kDisableMetrics, this executes all the code that a normal client would
860 // use for reporting, except the report is dropped rather than sent to the
861 // server. This is useful for finding issues in the metrics code during UI and
862 // performance tests.
863 const char kMetricsRecordingOnly
[] = "metrics-recording-only";
865 // Enables multiprofile Chrome.
866 const char kMultiProfiles
[] = "multi-profiles";
868 // Causes the process to run as a NativeClient broker
869 // (used for launching NaCl loader processes on 64-bit Windows).
870 const char kNaClBrokerProcess
[] = "nacl-broker";
872 // Uses NaCl manifest URL to choose whether NaCl program will be debugged by
874 // Switch value format: [!]pattern1,pattern2,...,patternN. Each pattern uses
875 // the same syntax as patterns in Chrome extension manifest. The only difference
876 // is that * scheme matches all schemes instead of matching only http and https.
877 // If the value doesn't start with !, a program will be debugged if manifest URL
878 // matches any pattern. If the value starts with !, a program will be debugged
879 // if manifest URL does not match any pattern.
880 const char kNaClDebugMask
[] = "nacl-debug-mask";
882 // Native Client GDB debugger for loader. It needs switches calculated
883 // at run time in order to work correctly. That's why NaClLoadCmdPrefix
884 // flag can't be used.
885 const char kNaClGdb
[] = "nacl-gdb";
887 // GDB script to pass to the nacl-gdb debugger at startup.
888 const char kNaClGdbScript
[] = "nacl-gdb-script";
890 // Causes the process to run as a NativeClient loader.
891 const char kNaClLoaderProcess
[] = "nacl-loader";
893 // On POSIX only: the contents of this flag are prepended to the nacl-loader
894 // command line. Useful values might be "valgrind" or "xterm -e gdb --args".
895 const char kNaClLoaderCmdPrefix
[] = "nacl-loader-cmd-prefix";
897 // List of native messaging hosts outside of the default location. Used for
898 // tests. The value must be comma-separate lists of key-value pairs separated
899 // equal sign. E.g. "host1=/path/to/host1/manifest.json,host2=/path/host2.json".
900 const char kNativeMessagingHosts
[] = "native-messaging-hosts";
902 // Sets the base logging level for the net log. Log 0 logs the most data.
903 // Intended primarily for use with --log-net-log.
904 const char kNetLogLevel
[] = "net-log-level";
906 // Disables the default browser check. Useful for UI/browser tests where we
907 // want to avoid having the default browser info-bar displayed.
908 const char kNoDefaultBrowserCheck
[] = "no-default-browser-check";
910 // By default, an https page can load images, fonts or frames from an http
911 // page. This switch overrides this to block this lesser mixed-content problem.
912 const char kNoDisplayingInsecureContent
[] = "no-displaying-insecure-content";
914 // Don't record/playback events when using record & playback.
915 const char kNoEvents
[] = "no-events";
917 // Disables all experiments set on about:flags. Does not disable about:flags
918 // itself. Useful if an experiment makes chrome crash at startup: One can start
919 // chrome with --no-experiments, disable the problematic lab at about:flags and
920 // then restart chrome without this switch again.
921 const char kNoExperiments
[] = "no-experiments";
923 // Skip First Run tasks, whether or not it's actually the First Run. Overridden
924 // by kForceFirstRun.
925 // Also drops the First Run beacon so that First Run will not occur in
926 // subsequent runs as well.
927 const char kNoFirstRun
[] = "no-first-run";
929 // Support a separate switch that enables the v8 playback extension.
930 // The extension causes javascript calls to Date.now() and Math.random()
931 // to return consistent values, such that subsequent loads of the same
932 // page will result in consistent js-generated data and XHR requests.
933 // Pages may still be able to generate inconsistent data from plugins.
934 const char kNoJsRandomness
[] = "no-js-randomness";
936 // Starts the browser outside of managed mode.
937 const char kNoManaged
[] = "no-managed";
939 // Whether or not the browser should warn if the profile is on a network share.
940 // This flag is only relevant for Windows currently.
941 const char kNoNetworkProfileWarning
[] = "no-network-profile-warning";
943 // Don't send hyperlink auditing pings
944 const char kNoPings
[] = "no-pings";
946 // Don't use a proxy server, always make direct connections. Overrides any
947 // other proxy server flags that are passed.
948 const char kNoProxyServer
[] = "no-proxy-server";
950 // Disables the service process from adding itself as an autorun process. This
951 // does not delete existing autorun registrations, it just prevents the service
952 // from registering a new one.
953 const char kNoServiceAutorun
[] = "no-service-autorun";
955 // Does not automatically open a browser window on startup (used when
956 // launching Chrome for the purpose of hosting background apps).
957 const char kNoStartupWindow
[] = "no-startup-window";
959 // Specifies the maximum number of threads to use for running the Proxy
960 // Autoconfig (PAC) script.
961 const char kNumPacThreads
[] = "num-pac-threads";
963 // Controls whether to use the fancy new scoring (takes into account
964 // word breaks, does better balancing of topicality, recency, etc.) for
965 // HistoryQuickProvider.
966 const char kOmniboxHistoryQuickProviderNewScoring
[] =
967 "omnibox-history-quick-provider-new-scoring";
968 // The value the kOmniboxHistoryQuickProviderNewScoring switch may have,
969 // as in "--omnibox-history-quick-provider-new-scoring=1".
970 // 1 means use new scoring.
971 const char kOmniboxHistoryQuickProviderNewScoringEnabled
[] = "1";
972 // 0 means use old scoring ( == current behavior as of 6/2012).
973 const char kOmniboxHistoryQuickProviderNewScoringDisabled
[] = "0";
975 // Controls whether HistoryQuickProvider is allowed to reorder results
976 // according to inlineability in order to more aggressively assign/keep
977 // high relevance scores.
978 const char kOmniboxHistoryQuickProviderReorderForInlining
[] =
979 "omnibox-history-quick-provider-reorder-for-inlining";
980 // The value the kOmniboxHistoryQuickProviderReorderForInlining switch may
981 // have, as in "--omnibox-history-quick-provider-reorder-for-inlining=1".
982 // 1 means allow reordering results.
983 const char kOmniboxHistoryQuickProviderReorderForInliningEnabled
[] = "1";
984 // 0 means don't allow reordering results ( == current behavior as of 6/2012).
985 const char kOmniboxHistoryQuickProviderReorderForInliningDisabled
[] = "0";
987 // Controls whether the omnibox's HistoryQuickProvider is allowed to
988 // inline suggestions.
989 const char kOmniboxInlineHistoryQuickProvider
[] =
990 "omnibox-inline-history-quick-provider-allowed";
991 // The values the kOmniboxInlineHistoryQuickProvider switch may have, as in
992 // "--omnibox-inline-history-quick-provider-allowed=1"
993 // allowed: if HistoryQuickProvider thinks it appropriate, it can inline
994 // ( == current behavior as of 2/2012).
995 const char kOmniboxInlineHistoryQuickProviderAllowed
[] = "1";
996 // prohibited: never inline matches
997 const char kOmniboxInlineHistoryQuickProviderProhibited
[] = "0";
998 // auto: any other value => the code and field trial does what it wants.
1000 // When the option to block third-party cookies is enabled, only block
1001 // third-party cookies from being set.
1002 const char kOnlyBlockSettingThirdPartyCookies
[] =
1003 "only-block-setting-third-party-cookies";
1005 // Launches URL in new browser window.
1006 const char kOpenInNewWindow
[] = "new-window";
1008 // Simulates an organic Chrome install.
1009 const char kOrganicInstall
[] = "organic";
1011 // Force use of QUIC for requests over the specified port.
1012 const char kOriginPortToForceQuicOn
[] = "origin-port-to-force-quic-on";
1014 // Packages an extension to a .crx installable file from a given directory.
1015 const char kPackExtension
[] = "pack-extension";
1017 // Optional PEM private key to use in signing packaged .crx.
1018 const char kPackExtensionKey
[] = "pack-extension-key";
1020 // Specifies the path to the user data folder for the parent profile.
1021 const char kParentProfile
[] = "parent-profile";
1023 // Launches PerformanceMonitor at startup, which will gather statistics about
1024 // Chrome's CPU and memory usage, page load times, startup times, and network
1025 // usage, and will also store information about events which may be of interest,
1026 // such as extension-related occurrences and crashes. Optionally, this may be
1027 // run with an integer value representing the interval between the timed
1028 // metric gatherings, measured in seconds (if invalid or not provided, the
1029 // default interval is used).
1030 const char kPerformanceMonitorGathering
[] = "performance-monitor-gathering";
1032 // Enable the post crash analyzer which uploads detailed crash information in
1033 // situations where a crash is determined to be particularly interesting.
1034 const char kPerformCrashAnalysis
[] = "perform-crash-analysis";
1036 // Read previously recorded data from the cache. Only cached data is read.
1038 const char kPlaybackMode
[] = "playback-mode";
1040 // Overrides the path to the location that PNaCl is installed.
1041 const char kPnaclDir
[] = "pnacl-dir";
1043 // Forces the PPAPI version of Flash (if it's being used) to run in the
1044 // renderer process rather than in a separate plugin process.
1045 const char kPpapiFlashInProcess
[] = "ppapi-flash-in-process";
1047 // Use the PPAPI (Pepper) Flash found at the given path.
1048 const char kPpapiFlashPath
[] = "ppapi-flash-path";
1050 // Report the given version for the PPAPI (Pepper) Flash. The version should be
1051 // numbers separated by '.'s (e.g., "12.3.456.78"). If not specified, it
1052 // defaults to "10.2.999.999".
1053 const char kPpapiFlashVersion
[] = "ppapi-flash-version";
1055 // Triggers prerendering of pages from suggestions in the omnibox. Only has an
1056 // effect when Instant is either disabled or restricted to search, and when
1057 // prerender is enabled.
1058 const char kPrerenderFromOmnibox
[] = "prerender-from-omnibox";
1059 // These are the values the kPrerenderFromOmnibox switch may have, as in
1060 // "--prerender-from-omnibox=auto". auto: Allow field trial selection.
1061 const char kPrerenderFromOmniboxSwitchValueAuto
[] = "auto";
1062 // disabled: No prerendering.
1063 const char kPrerenderFromOmniboxSwitchValueDisabled
[] = "disabled";
1064 // enabled: Guaranteed prerendering.
1065 const char kPrerenderFromOmniboxSwitchValueEnabled
[] = "enabled";
1066 // Controls speculative prerendering of pages, and content prefetching. Both
1067 // are dispatched from <link rel=prefetch href=...> elements.
1068 const char kPrerenderMode
[] = "prerender";
1069 // These are the values the kPrerenderMode switch may have, as in
1070 // "--prerender=auto".
1071 // auto: Allow field trial selection in both prerender and prefetch.
1072 const char kPrerenderModeSwitchValueAuto
[] = "auto";
1073 // disabled: No prerendering or prefetching.
1074 const char kPrerenderModeSwitchValueDisabled
[] = "disabled";
1075 // enabled: Both prerendering and prefetching.
1076 const char kPrerenderModeSwitchValueEnabled
[] = "enabled";
1077 // prefetch_only: No prerendering, but enables prefetching.
1078 const char kPrerenderModeSwitchValuePrefetchOnly
[] = "prefetch_only";
1080 // Enable conversion from vector to raster for any page.
1081 const char kPrintRaster
[] = "print-raster";
1083 // Outputs the product version information and quit. Used as an internal api to
1084 // detect the installed version of Chrome on Linux.
1085 const char kProductVersion
[] = "product-version";
1087 // Selects directory of profile to associate with the first browser launched.
1088 const char kProfileDirectory
[] = "profile-directory";
1090 // Starts the sampling based profiler for the browser process at startup. This
1091 // will only work if chrome has been built with the gyp variable profiling=1.
1092 // The output will go to the value of kProfilingFile.
1093 const char kProfilingAtStart
[] = "profiling-at-start";
1095 // Specifies a location for profiling output. This will only work if chrome has
1096 // been built with the gyp variable profiling=1.
1098 // {pid} if present will be replaced by the pid of the process.
1099 // {count} if present will be incremented each time a profile is generated
1100 // for this process.
1101 // The default is chrome-profile-{pid}.
1102 const char kProfilingFile
[] = "profiling-file";
1104 // Specifies a path for the output of task-level profiling which can be loaded
1105 // and viewed in about:profiler.
1106 const char kProfilingOutputFile
[] = "profiling-output-file";
1108 // Controls whether profile data is periodically flushed to a file. Normally
1109 // the data gets written on exit but cases exist where chrome doesn't exit
1110 // cleanly (especially when using single-process). A time in seconds can be
1112 const char kProfilingFlush
[] = "profiling-flush";
1114 // Specifies a custom URL for fetching NTP promo data.
1115 const char kPromoServerURL
[] = "promo-server-url";
1117 // Should we prompt the user before allowing external extensions to install?
1119 const char kPromptForExternalExtensions
[] = "prompt-for-external-extensions";
1121 // Forces proxy auto-detection.
1122 const char kProxyAutoDetect
[] = "proxy-auto-detect";
1124 // Specifies a list of hosts for whom we bypass proxy settings and use direct
1125 // connections. Ignored if --proxy-auto-detect or --no-proxy-server are also
1126 // specified. This is a comma-separated list of bypass rules. See:
1127 // "net/proxy/proxy_bypass_rules.h" for the format of these rules.
1128 const char kProxyBypassList
[] = "proxy-bypass-list";
1130 // Uses the pac script at the given URL
1131 const char kProxyPacUrl
[] = "proxy-pac-url";
1133 // Uses a specified proxy server, overrides system settings. This switch only
1134 // affects HTTP and HTTPS requests.
1135 const char kProxyServer
[] = "proxy-server";
1137 // Adds a "Purge memory" button to the Task Manager, which tries to dump as
1138 // much memory as possible. This is mostly useful for testing how well the
1139 // MemoryPurger functionality works.
1141 // NOTE: This is only implemented for Views.
1142 const char kPurgeMemoryButton
[] = "purge-memory-button";
1144 // Capture resource consumption information through page cycling and output the
1145 // data to the specified file.
1146 const char kRecordStats
[] = "record-stats";
1148 // Chrome supports a playback and record mode. Record mode saves *everything*
1149 // to the cache. Playback mode reads data exclusively from the cache. This
1150 // allows us to record a session into the cache and then replay it at will.
1151 // See also kPlaybackMode.
1152 const char kRecordMode
[] = "record-mode";
1154 // Uses custom front-end URL for the remote debugging.
1155 const char kRemoteDebuggingFrontend
[] = "remote-debugging-frontend";
1157 // Does not show an infobar when an extension attaches to a page using
1158 // chrome.debugger page. Required to attach to extension background pages.
1159 const char kSilentDebuggerExtensionAPI
[] = "silent-debugger-extension-api";
1161 // Enables print preview in the renderer. This flag is generated internally by
1162 // Chrome and does nothing when directly passed to the browser.
1163 const char kRendererPrintPreview
[] = "renderer-print-preview";
1165 // Forces a reset of the local passphrase of the managed user account, and
1166 // the managed user settings dialog is shown where a new passphrase can be set.
1167 const char kResetLocalPassphrase
[] = "reset-local-passphrase";
1169 // Forces a reset of the one-time-randomized FieldTrials on this client, also
1170 // known as the Chrome Variations state.
1171 const char kResetVariationState
[] = "reset-variation-state";
1173 // Indicates the last session should be restored on startup. This overrides the
1174 // preferences value and is primarily intended for testing. The value of this
1175 // switch is the number of tabs to wait until loaded before 'load completed' is
1176 // sent to the ui_test.
1177 const char kRestoreLastSession
[] = "restore-last-session";
1179 // Disable saving pages as HTML-only, disable saving pages as HTML Complete
1180 // (with a directory of sub-resources). Enable only saving pages as MHTML.
1181 // See http://crbug.com/120416 for how to remove this switch.
1182 const char kSavePageAsMHTML
[] = "save-page-as-mhtml";
1184 // URL prefix used by safebrowsing to fetch hash, download data and report
1186 const char kSbURLPrefix
[] = "safebrowsing-url-prefix";
1188 // If present, safebrowsing only performs update when
1189 // SafeBrowsingProtocolManager::ForceScheduleNextUpdate() is explicitly called.
1190 // This is used for testing only.
1191 const char kSbDisableAutoUpdate
[] = "safebrowsing-disable-auto-update";
1193 // TODO(lzheng): Remove this flag once the feature works fine
1194 // (http://crbug.com/74848).
1196 // Disables safebrowsing feature that checks download url and downloads
1197 // content's hash to make sure the content are not malicious.
1198 const char kSbDisableDownloadProtection
[] =
1199 "safebrowsing-disable-download-protection";
1201 // Disables safebrowsing feature that checks for blacklisted extensions.
1202 const char kSbDisableExtensionBlacklist
[] =
1203 "safebrowsing-disable-extension-blacklist";
1205 // Enables or disables extension scripts badges in the location bar.
1206 const char kScriptBadges
[] = "script-badges";
1208 // Enable or diable the "script bubble" icon in the URL bar that tells you how
1209 // many extensions are running scripts on a page.
1210 const char kScriptBubble
[] = "script-bubble";
1212 // Enables the showing of an info-bar instructing user they can search directly
1213 // from the omnibox.
1214 const char kSearchInOmniboxHint
[] = "search-in-omnibox-hint";
1216 // Causes the process to run as a service process.
1217 const char kServiceProcess
[] = "service";
1219 // Sets a token in the token service, for testing.
1220 const char kSetToken
[] = "set-token";
1222 // If true the app list will be shown.
1223 const char kShowAppList
[] = "show-app-list";
1225 // Makes component extensions appear in chrome://settings/extensions.
1226 const char kShowComponentExtensionOptions
[] =
1227 "show-component-extension-options";
1230 const char kShowIcons
[] = "show-icons";
1232 // Marks a renderer as the signin process.
1233 const char kSigninProcess
[] = "signin-process";
1235 // Enables or disables sideload wipeout extension effort.
1236 const char kSideloadWipeout
[] = "sideload-wipeout";
1238 // Changes the DCHECKS to dump memory and continue instead of displaying error
1239 // dialog. This is valid only in Release mode when --enable-dcheck is
1241 const char kSilentDumpOnDCHECK
[] = "silent-dump-on-dcheck";
1243 // Causes Chrome to launch without opening any windows by default. Useful if
1244 // one wishes to use Chrome as an ash server.
1245 const char kSilentLaunch
[] = "silent-launch";
1247 // Simulates an update being available.
1248 const char kSimulateUpgrade
[] = "simulate-upgrade";
1250 // Simulates a critical update being available.
1251 const char kSimulateCriticalUpdate
[] = "simulate-critical-update";
1253 // Simulates that current version is outdated.
1254 const char kSimulateOutdated
[] = "simulate-outdated";
1256 // Replaces the buffered data source for <audio> and <video> with a simplified
1257 // resource loader that downloads the entire resource into memory.
1259 // Socket reuse policy. The value should be of type enum
1260 // ClientSocketReusePolicy.
1261 const char kSocketReusePolicy
[] = "socket-reuse-policy";
1263 // Origin for which SpdyProxy authentication is supported.
1264 const char kSpdyProxyAuthOrigin
[] = "spdy-proxy-auth-origin";
1266 // Speculative resource prefetching.
1267 const char kSpeculativeResourcePrefetching
[] =
1268 "speculative-resource-prefetching";
1270 // Speculative resource prefetching is disabled.
1271 const char kSpeculativeResourcePrefetchingDisabled
[] = "disabled";
1273 // Speculative resource prefetching will only learn about resources that need to
1274 // be prefetched but will not prefetch them.
1275 const char kSpeculativeResourcePrefetchingLearning
[] = "learning";
1277 // Speculative resource prefetching is enabled.
1278 const char kSpeculativeResourcePrefetchingEnabled
[] = "enabled";
1280 // Specifies the maximum SSL/TLS version ("ssl3", "tls1", "tls1.1", or
1282 const char kSSLVersionMax
[] = "ssl-version-max";
1284 // Specifies the minimum SSL/TLS version ("ssl3", "tls1", "tls1.1", or
1286 const char kSSLVersionMin
[] = "ssl-version-min";
1288 // Starts the browser maximized, regardless of any previous settings.
1289 const char kStartMaximized
[] = "start-maximized";
1291 // Controls the width of time-of-day filters on the 'suggested' ntp page, in
1293 const char kSuggestionNtpFilterWidth
[] = "suggestion-ntp-filter-width";
1295 // Enables a normal distribution dropoff to the relevancy of visits with respect
1296 // to the time of day.
1297 const char kSuggestionNtpGaussianFilter
[] = "suggestion-ntp-gaussian-filter";
1299 // Enables a linear dropoff to the relevancy of visits with respect to the time
1301 const char kSuggestionNtpLinearFilter
[] = "suggestion-ntp-linear-filter";
1303 // Allows insecure XMPP connections for sync (for testing).
1304 const char kSyncAllowInsecureXmppConnection
[] =
1305 "sync-allow-insecure-xmpp-connection";
1307 // Invalidates any login info passed into sync's XMPP connection.
1308 const char kSyncInvalidateXmppLogin
[] = "sync-invalidate-xmpp-login";
1310 // Enable support for keystore key based encryption.
1311 const char kSyncKeystoreEncryption
[] = "sync-keystore-encryption";
1313 // This flag causes sync to retry very quickly (see polling_constants.h) the
1314 // when it encounters an error, as the first step towards exponential backoff.
1315 const char kSyncShortInitialRetryOverride
[] =
1316 "sync-short-initial-retry-override";
1318 // Overrides the default notification method for sync.
1319 const char kSyncNotificationMethod
[] = "sync-notification-method";
1321 // Overrides the default host:port used for sync notifications.
1322 const char kSyncNotificationHostPort
[] = "sync-notification-host-port";
1324 // Overrides the default server used for profile sync.
1325 const char kSyncServiceURL
[] = "sync-url";
1327 // Enables syncing of favicons as part of tab sync.
1328 const char kSyncTabFavicons
[] = "sync-tab-favicons";
1330 // Makes the sync code to throw an unrecoverable error after initialization.
1331 // Useful for testing unrecoverable error scenarios.
1332 const char kSyncThrowUnrecoverableError
[] = "sync-throw-unrecoverable-error";
1335 // Tries to connect to XMPP using SSLTCP first (for testing).
1336 const char kSyncTrySsltcpFirstForXmpp
[] = "sync-try-ssltcp-first-for-xmpp";
1338 // Enables deferring sync backend initialization until user initiated changes
1340 const char kSyncEnableDeferredStartup
[] = "sync-enable-deferred-startup";
1342 // Enables tab dragging to create a real browser.
1343 const char kTabBrowserDragging
[] = "enable-tab-browser-dragging";
1345 // Enables tab capture.
1346 const char kTabCapture
[] = "enable-tab-capture";
1348 // Passes the name of the current running automated test to Chrome.
1349 const char kTestName
[] = "test-name";
1351 // Runs the security test for the NaCl loader sandbox.
1352 const char kTestNaClSandbox
[] = "test-nacl-sandbox";
1354 // Type of the current test harness ("browser" or "ui").
1355 const char kTestType
[] = "test-type";
1357 // Tells the app to listen for and broadcast testing-related messages on IPC
1358 // channel with the given ID.
1359 const char kTestingChannelID
[] = "testing-channel";
1361 // Enables tracking the amount of non-idle time spent viewing pages.
1362 const char kTrackActiveVisitTime
[] = "track-active-visit-time";
1364 // Disables same-origin check on HTTP resources pushed via a SPDY proxy.
1365 // The value is the host:port of the trusted proxy.
1366 const char kTrustedSpdyProxy
[] = "trusted-spdy-proxy";
1368 // Experimental. Shows a dialog asking the user to try chrome. This flag is to
1369 // be used only by the upgrade process.
1370 const char kTryChromeAgain
[] = "try-chrome-again";
1372 // Runs un-installation steps that were done by chrome first-run.
1373 const char kUninstall
[] = "uninstall";
1375 // Uses Spdy for the transport protocol instead of HTTP. This is a temporary
1377 const char kUseSpdy
[] = "use-spdy";
1379 // Disables use of the spelling web service and only provides suggestions.
1380 // This will only work if asynchronous spell checking is not disabled.
1381 const char kUseSpellingSuggestions
[] = "use-spelling-suggestions";
1383 // Sets the maximum SPDY sessions per domain.
1384 const char kMaxSpdySessionsPerDomain
[] = "max-spdy-sessions-per-domain";
1386 // Sets the maximum concurrent streams over a SPDY session.
1387 const char kMaxSpdyConcurrentStreams
[] = "max-spdy-concurrent-streams";
1389 // Specifies the user data directory, which is where the browser will look for
1390 // all of its state.
1391 const char kUserDataDir
[] = "user-data-dir";
1393 // Uses the ClientLogin signin flow instead of the web-based signin flow.
1394 const char kUseClientLoginSigninFlow
[] = "use-client-login-signin-flow";
1396 // Uses experimental simple cache backend if possible.
1397 const char kUseSimpleCacheBackend
[] = "use-simple-cache-backend";
1399 // Specifies a custom URL for the server which reports variation data to the
1400 // client. Specifying this switch enables the Variations service on
1401 // unofficial builds. See variations_service.cc.
1402 const char kVariationsServerURL
[] = "variations-server-url";
1404 // Prints version information and quits.
1405 const char kVersion
[] = "version";
1407 // Requests that Chrome connect to a remote viewer process using an IPC
1408 // channel of the given name.
1409 const char kViewerConnection
[] = "viewer-connection";
1411 // Cycle through a series of URLs listed in the specified file.
1412 const char kVisitURLs
[] = "visit-urls";
1414 // Enable the "native services" feature of web-intents.
1415 const char kWebIntentsNativeServicesEnabled
[] =
1416 "web-intents-native-services-enabled";
1418 // Adds the given extension ID to all the permission whitelists.
1419 const char kWhitelistedExtensionID
[] = "whitelisted-extension-id";
1421 // Specify the initial window position: --window-position=x,y
1422 const char kWindowPosition
[] = "window-position";
1424 // Specify the initial window size: --window-size=w,h
1425 const char kWindowSize
[] = "window-size";
1427 // Uses WinHTTP to fetch and evaluate PAC scripts. Otherwise the default is to
1428 // use Chromium's network stack to fetch, and V8 to evaluate.
1429 const char kWinHttpProxyResolver
[] = "winhttp-proxy-resolver";
1431 #if defined(ENABLE_PLUGIN_INSTALLATION)
1432 // Specifies a custom URL for fetching plug-ins metadata. Used for testing.
1433 const char kPluginsMetadataServerURL
[] = "plugins-metadata-server-url";
1436 #if defined(OS_ANDROID) || defined(OS_IOS)
1437 // Enable SPDY proxy.
1438 const char kEnableSpdyProxyAuth
[] = "enable-spdy-proxy-auth";
1439 #endif // defined(OS_ANDROID) || defined(OS_IOS)
1441 #if defined(OS_ANDROID)
1442 // Pops the translate infobar if possible.
1443 const char kEnableTranslate
[] = "enable-translate";
1445 // Uses the tablet specific UI components when available.
1446 const char kTabletUI
[] = "tablet-ui";
1449 #if defined(USE_ASH)
1450 const char kAshDisableTabScrubbing
[] = "ash-disable-tab-scrubbing";
1451 const char kOpenAsh
[] = "open-ash";
1454 #if defined(OS_CHROMEOS)
1455 // When wallpaper boot animation is not disabled this switch
1456 // is used to override OOBE/sign in WebUI init type.
1457 // Possible values: parallel|postpone. Default: parallel.
1458 const char kAshWebUIInit
[] = "ash-webui-init";
1460 // Enables switching between different cellular carriers from the UI.
1461 const char kEnableCarrierSwitching
[] = "enable-carrier-switching";
1463 // Disables Kiosk app mode for ChromeOS.
1464 const char kDisableAppMode
[] = "disable-app-mode";
1466 // Disables wallpaper boot animation (except of OOBE case).
1467 const char kDisableBootAnimation
[] = "disable-boot-animation";
1469 // Disables Chrome Captive Portal detector, which initiates Captive
1470 // Portal detection for new active networks.
1471 const char kDisableChromeCaptivePortalDetector
[] =
1472 "disable-chrome-captive-portal-detector";
1474 // Disables Google Drive integration.
1475 const char kDisableDrive
[] = "disable-drive";
1477 // Enables file prefetching in Google Drive Client for Chrome OS.
1478 const char kEnableDrivePrefetch
[] = "enable-drive-prefetch";
1480 // Avoid doing expensive animations upon login.
1481 const char kDisableLoginAnimations
[] = "disable-login-animations";
1483 // Avoid doing animations upon oobe.
1484 const char kDisableOobeAnimation
[] = "disable-oobe-animation";
1486 // Enables component extension that initializes background pages of
1487 // certain hosted applications.
1488 const char kEnableBackgroundLoader
[] = "enable-background-loader";
1490 // Enables Chrome Captive Portal detector, which initiates Captive
1491 // Portal detection for new active networks.
1492 const char kEnableChromeCaptivePortalDetector
[] =
1493 "enable-chrome-captive-portal-detector";
1495 // Enables metadata prefetching in Google Drive Client for Chrome OS.
1496 const char kEnableDriveMetadataPrefetch
[] = "enable-drive-metadata-prefetch";
1498 // Enables touchpad three-finger-click as middle button.
1499 const char kEnableTouchpadThreeFingerClick
[]
1500 = "enable-touchpad-three-finger-click";
1502 // Enables touchpad three-finger swipe.
1503 const char kEnableTouchpadThreeFingerSwipe
[]
1504 = "enable-touchpad-three-finger-swipe";
1506 // Enable Kiosk mode for ChromeOS.
1507 const char kEnableKioskMode
[] = "enable-kiosk-mode";
1509 // Disable policy-configured local accounts.
1510 const char kDisableLocalAccounts
[] = "disable-local-accounts";
1512 // Enables request of tablet site (via user agent override).
1513 const char kEnableRequestTabletSite
[] = "enable-request-tablet-site";
1515 // Enables static ip configuration. This flag should be removed when it's on by
1517 const char kEnableStaticIPConfig
[] = "enable-static-ip-config";
1519 // Passed to Chrome on first boot. Not passed on restart after sign out.
1520 const char kFirstBoot
[] = "first-boot";
1522 // Usually in browser tests the usual login manager bringup is skipped so that
1523 // tests can change how it's brought up. This flag disables that.
1524 const char kForceLoginManagerInTests
[] = "force-login-manager-in-tests";
1526 // If true, the Chromebook has a Chrome OS keyboard. Don't use the flag for
1528 const char kHasChromeOSKeyboard
[] = "has-chromeos-keyboard";
1530 // If true, the Chromebook has a keyboard with a diamond key.
1531 const char kHasChromeOSDiamondKey
[] = "has-chromeos-diamond-key";
1533 // Path for the screensaver used in Kiosk mode
1534 const char kKioskModeScreensaverPath
[] = "kiosk-mode-screensaver-path";
1536 // Enables Chrome-as-a-login-manager behavior.
1537 const char kLoginManager
[] = "login-manager";
1539 // Allows to override the first login screen. The value should be the name of
1540 // the first login screen to show (see
1541 // chrome/browser/chromeos/login/login_wizard_view.cc for actual names).
1542 // Ignored if kLoginManager is not specified. TODO(avayvod): Remove when the
1543 // switch is no longer needed for testing.
1544 const char kLoginScreen
[] = "login-screen";
1546 // Controls the initial login screen size. Pass width,height.
1547 const char kLoginScreenSize
[] = "login-screen-size";
1549 // Specifies the profile to use once a chromeos user is logged in.
1550 const char kLoginProfile
[] = "login-profile";
1552 // Specifies the user which is already logged in.
1553 const char kLoginUser
[] = "login-user";
1555 // Specifies a password to be used to login (along with login-user).
1556 const char kLoginPassword
[] = "login-password";
1558 // Enables natural scroll by default.
1559 const char kNaturalScrollDefault
[] = "enable-natural-scroll-default";
1561 // Disables tab discard in low memory conditions, a feature which silently
1562 // closes inactive tabs to free memory and to attempt to avoid the kernel's
1563 // out-of-memory process killer.
1564 const char kNoDiscardTabs
[] = "no-discard-tabs";
1566 // Indicates that the browser is in "browse without sign-in" (Guest session)
1567 // mode. Should completely disable extensions, sync and bookmarks.
1568 const char kGuestSession
[] = "bwsi";
1570 // Enables overriding the path for the default echo component extension.
1571 // Useful for testing.
1572 const char kEchoExtensionPath
[] = "echo-ext-path";
1574 // Indicates that a stub implementation of CrosSettings that stores settings in
1575 // memory without signing should be used, treating current user as the owner.
1576 // This option is for testing the chromeos build of chrome on the desktop only.
1577 const char kStubCrosSettings
[] = "stub-cros-settings";
1579 // Enables overriding the path for the default authentication extension.
1580 const char kAuthExtensionPath
[] = "auth-ext-path";
1582 // Power of the power-of-2 initial modulus that will be used by the
1583 // auto-enrollment client. E.g. "4" means the modulus will be 2^4 = 16.
1584 const char kEnterpriseEnrollmentInitialModulus
[] =
1585 "enterprise-enrollment-initial-modulus";
1587 // Power of the power-of-2 maximum modulus that will be used by the
1588 // auto-enrollment client.
1589 const char kEnterpriseEnrollmentModulusLimit
[] =
1590 "enterprise-enrollment-modulus-limit";
1592 // Loads the File Manager as a packaged app.
1593 const char kFileManagerPackaged
[] = "file-manager-packaged";
1596 // Skips all other OOBE pages after user login.
1597 const char kOobeSkipPostLogin
[] = "oobe-skip-postlogin";
1599 #endif // OS_CHROMEOS
1601 #if defined(OS_POSIX)
1602 // A flag, generated internally by Chrome for renderer and other helper process
1603 // command lines on Linux and Mac. It tells the helper process to enable crash
1604 // dumping and reporting, because helpers cannot access the profile or other
1605 // files needed to make this decision.
1606 const char kEnableCrashReporter
[] = "enable-crash-reporter";
1608 // Used for turning on Breakpad crash reporting in a debug environment where
1609 // crash reporting is typically compiled but disabled.
1610 const char kEnableCrashReporterForTesting
[] =
1611 "enable-crash-reporter-for-testing";
1613 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS)
1614 // Specifies which password store to use (detect, default, gnome, kwallet).
1615 const char kPasswordStore
[] = "password-store";
1619 #if defined(OS_MACOSX)
1620 // Enables the tabs expose feature ( http://crbug.com/50307 ).
1621 const char kEnableExposeForTabs
[] = "enable-expose-for-tabs";
1623 // Performs Keychain reauthorization from the command line on behalf of a
1624 // special Keychain reauthorization stub executable. Used during auto-update.
1625 const char kKeychainReauthorize
[] = "keychain-reauthorize";
1627 // A process type (switches::kProcessType) that relaunches the browser. See
1628 // chrome/browser/mac/relauncher.h.
1629 const char kRelauncherProcess
[] = "relauncher";
1631 // Uses mock keychain for testing purposes, which prevents blocking dialogs
1632 // from causing timeouts.
1633 const char kUseMockKeychain
[] = "use-mock-keychain";
1637 // For the DelegateExecute verb handler to launch Chrome in metro mode on
1638 // Windows 8 and higher. Used when relaunching metro Chrome.
1639 const char kForceImmersive
[] = "force-immersive";
1641 // For the DelegateExecute verb handler to launch Chrome in desktop mode on
1642 // Windows 8 and higher. Used when relaunching metro Chrome.
1643 const char kForceDesktop
[] = "force-desktop";
1645 // Allows for disabling the overlapped I/O for TCP reads.
1646 // Possible values are "on" or "off".
1647 // The default is "on" which matches the existing behavior.
1648 // "off" switches to use non-blocking reads and WSAEventSelect.
1649 const char kOverlappedRead
[] = "overlapped-reads";
1651 // Relaunches metro Chrome on Windows 8 and higher using a given shortcut.
1652 const char kRelaunchShortcut
[] = "relaunch-shortcut";
1654 // Waits for the given handle to be signaled before relaunching metro Chrome on
1655 // Windows 8 and higher.
1656 const char kWaitForMutex
[] = "wait-for-mutex";
1660 // Enables overriding the path of file manager extension.
1661 const char kFileManagerExtensionPath
[] = "filemgr-ext-path";
1663 // Enables overriding the path of image loader extension.
1664 const char kImageLoaderExtensionPath
[] = "image-loader-ext-path";
1666 // Dumps dependency information about our profile services into a dot file in
1667 // the profile directory.
1668 const char kDumpProfileDependencyGraph
[] = "dump-profile-graph";
1671 // Controls print preview in the browser process.
1672 #if defined(GOOGLE_CHROME_BUILD)
1673 // Disables print preview (For testing, and for users who don't like us. :[ )
1674 const char kDisablePrintPreview
[] = "disable-print-preview";
1676 // Enables print preview (Force enable on Chromium, which normally does not
1677 // have the PDF viewer required for print preview.)
1678 const char kEnablePrintPreview
[] = "enable-print-preview";
1681 // -----------------------------------------------------------------------------
1682 // DO NOT ADD YOUR CRAP TO THE BOTTOM OF THIS FILE.
1684 // You were going to just dump your switches here, weren't you? Instead, please
1685 // put them in alphabetical order above, or in order inside the appropriate
1686 // ifdef at the bottom. The order should match the header.
1687 // -----------------------------------------------------------------------------
1689 } // namespace switches