TabStripModel::GetActiveWebContents() might return NULL, and will cause a crash if...
[chromium-blink-merge.git] / chrome / common / chrome_switches.cc
blob0d96783dfcea4680981c75be25c218ad366915da
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"
10 namespace switches {
12 // -----------------------------------------------------------------------------
13 // Can't find the switch you are looking for? Try looking in:
14 // ash/ash_switches.cc
15 // base/base_switches.cc
16 // chromeos/chromeos_switches.cc
17 // etc.
19 // When commenting your switch, please use the same voice as surrounding
20 // comments. Imagine "This switch..." at the beginning of the phrase, and it'll
21 // all work out.
22 // -----------------------------------------------------------------------------
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 // Allow non-secure origins to use the screen capture API and the desktopCapture
33 // extension API.
34 const char kAllowHttpScreenCapture[] = "allow-http-screen-capture";
36 // Specifies comma-separated list of extension ids or hosts to grant
37 // access to CRX file system APIs.
38 const char kAllowNaClCrxFsAPI[] = "allow-nacl-crxfs-api";
40 // Specifies comma-separated list of extension ids or hosts to grant
41 // access to file handle APIs.
42 const char kAllowNaClFileHandleAPI[] = "allow-nacl-file-handle-api";
44 // Specifies comma-separated list of extension ids or hosts to grant
45 // access to TCP/UDP socket APIs.
46 const char kAllowNaClSocketAPI[] = "allow-nacl-socket-api";
48 // Don't block outdated plugins.
49 const char kAllowOutdatedPlugins[] = "allow-outdated-plugins";
51 // By default, an https page cannot run JavaScript, CSS or plug-ins from http
52 // URLs. This provides an override to get the old insecure behavior.
53 const char kAllowRunningInsecureContent[] = "allow-running-insecure-content";
55 // Prevents Chrome from requiring authorization to run certain widely installed
56 // but less commonly used plug-ins.
57 const char kAlwaysAuthorizePlugins[] = "always-authorize-plugins";
59 // Specifies that the extension-app with the specified id should be launched
60 // according to its configuration.
61 const char kAppId[] = "app-id";
63 // Specifies that the associated value should be launched in "application"
64 // mode.
65 const char kApp[] = "app";
67 // Specifies an URL to use for app list start page.
68 const char kAppListStartPageURL[] = "app-list-start-page-url";
70 // Overrides the apps checkout URL, which is used to determine when to expose
71 // some private APIs.
72 const char kAppsCheckoutURL[] = "apps-checkout-url";
74 // The URL that the webstore APIs download extensions from.
75 // Note: the URL must contain one '%s' for the extension ID.
76 const char kAppsGalleryDownloadURL[] = "apps-gallery-download-url";
78 // A setting to cause extension/app installs from the webstore skip the normal
79 // confirmation dialog. A value of 'accept' means to always act as if the dialog
80 // was accepted, and 'cancel' means to always act as if the dialog was
81 // cancelled.
83 // TODO (rdevlin.cronin): Remove this.
84 // This is not a good use of a command-line flag, as it would be equally
85 // effective as a global boolean. Additionally, this opens up a dangerous way
86 // for attackers to append a commandline flag and circumvent all user action for
87 // installing an extension.
88 const char kAppsGalleryInstallAutoConfirmForTests[] =
89 "apps-gallery-install-auto-confirm-for-tests";
91 // The URL to use for the gallery link in the app launcher.
92 const char kAppsGalleryURL[] = "apps-gallery-url";
94 // The update url used by gallery/webstore extensions.
95 const char kAppsGalleryUpdateURL[] = "apps-gallery-update-url";
97 // Value of GAIA auth code for --force-app-mode.
98 const char kAppModeAuthCode[] = "app-mode-auth-code";
100 // Value of OAuth2 refresh token for --force-app-mode.
101 const char kAppModeOAuth2Token[] = "app-mode-oauth-token";
103 // Enables overriding the path for the default authentication extension.
104 const char kAuthExtensionPath[] = "auth-ext-path";
106 // Whitelist of servers that Negotiate will generate delegated Kerberos tickets
107 // for.
108 const char kAuthNegotiateDelegateWhitelist[] =
109 "auth-negotiate-delegate-whitelist";
111 // HTTP authentication schemes to enable. This is a comma-separated list of
112 // authentication schemes (basic, digest, ntlm, and negotiate). By default all
113 // schemes are enabled. The primary use of this command line flag is to help
114 // triage authentication-related issues reported by end-users.
115 const char kAuthSchemes[] = "auth-schemes";
117 // Whitelist of servers which NTLM and Negotiate can automatically authenticate
118 // with using the default credentials of the currently logged in user.
119 const char kAuthServerWhitelist[] = "auth-server-whitelist";
121 // A flag that is used to tell Chrome that it was launched automatically at
122 // computer startup and not by some user action.
123 const char kAutoLaunchAtStartup[] = "auto-launch-at-startup";
125 // Certificate Transparency: Uses the provided log(s) for checking Signed
126 // Certificate Timestamps provided with certificates.
127 // The switch's value is:
128 // log_description:log_key,log_description:log_key,...
129 // where
130 // log_description is a textual description of the log.
131 // log_key is a Base64'd DER-encoded SubjectPublicKeyInfo of the log's
132 // public key.
133 // Multiple logs can be specified by repeating description:key pairs,
134 // separated by a comma.
135 const char kCertificateTransparencyLog[] =
136 "certificate-transparency-log";
138 // How often (in seconds) to check for updates. Should only be used for testing
139 // purposes.
140 const char kCheckForUpdateIntervalSec[] = "check-for-update-interval";
142 // Checks the cloud print connector policy, informing the service process if
143 // the policy is set to disallow the connector, then quits.
144 const char kCheckCloudPrintConnectorPolicy[] =
145 "check-cloud-print-connector-policy";
147 // Comma-separated list of SSL cipher suites to disable.
148 const char kCipherSuiteBlacklist[] = "cipher-suite-blacklist";
150 // Tells chrome to display the cloud print dialog and upload the specified file
151 // for printing.
152 const char kCloudPrintFile[] = "cloud-print-file";
154 // Specifies the mime type to be used when uploading data from the file
155 // referenced by cloud-print-file. Defaults to "application/pdf" if
156 // unspecified.
157 const char kCloudPrintFileType[] = "cloud-print-file-type";
159 // Used with kCloudPrintFile to specify a JSON print ticket for the resulting
160 // print job. Defaults to null if unspecified.
161 const char kCloudPrintPrintTicket[] = "cloud-print-print-ticket";
163 // Used with kCloudPrintFile to specify a title for the resulting print job.
164 const char kCloudPrintJobTitle[] = "cloud-print-job-title";
166 // Setup cloud print proxy for provided printers. This does not start
167 // service or register proxy for autostart.
168 const char kCloudPrintSetupProxy[] = "cloud-print-setup-proxy";
170 // Comma-separated options to troubleshoot the component updater. Only valid
171 // for the browser process.
172 const char kComponentUpdater[] = "component-updater";
174 // Comma-separated list of BrowserThreads that cause browser process to crash
175 // if the given browser thread is not responsive. UI,IO,DB,FILE,CACHE are the
176 // list of BrowserThreads that are supported.
178 // For example:
179 // --crash-on-hang-threads=UI:3:18,IO:3:18 --> Crash the browser if UI or IO
180 // is not responsive for 18 seconds and the number of browser threads that
181 // are responding is less than or equal to 3.
182 const char kCrashOnHangThreads[] = "crash-on-hang-threads";
184 // Some platforms like ChromeOS default to empty desktop.
185 // Browser tests may need to add this switch so that at least one browser
186 // instance is created on startup.
187 // TODO(nkostylev): Investigate if this switch could be removed.
188 // (http://crbug.com/148675)
189 const char kCreateBrowserOnStartupForTests[] =
190 "create-browser-on-startup-for-tests";
192 // Enables a frame context menu item that toggles the frame in and out of glass
193 // mode (Windows Vista and up only).
194 const char kDebugEnableFrameToggle[] = "debug-enable-frame-toggle";
196 // Adds debugging entries such as Inspect Element to context menus of packed
197 // apps.
198 const char kDebugPackedApps[] = "debug-packed-apps";
200 // Triggers a plethora of diagnostic modes.
201 const char kDiagnostics[] = "diagnostics";
203 // Sets the output format for diagnostic modes enabled by diagnostics flag.
204 const char kDiagnosticsFormat[] = "diagnostics-format";
206 // Tells the diagnostics mode to do the requested recovery step(s).
207 const char kDiagnosticsRecovery[] = "diagnostics-recovery";
209 // Disables the experimental asynchronous DNS client.
210 const char kDisableAsyncDns[] = "disable-async-dns";
212 // Disables CNAME lookup of the host when generating the Kerberos SPN for a
213 // Negotiate challenge. See HttpAuthHandlerNegotiate::CreateSPN for more
214 // background.
215 const char kDisableAuthNegotiateCnameLookup[] =
216 "disable-auth-negotiate-cname-lookup";
218 // Disable several subsystems which run network requests in the background.
219 // This is for use when doing network performance testing to avoid noise in the
220 // measurements.
221 const char kDisableBackgroundNetworking[] = "disable-background-networking";
223 // Disables the bundled PPAPI version of Flash.
224 const char kDisableBundledPpapiFlash[] = "disable-bundled-ppapi-flash";
226 // Disables the client-side phishing detection feature. Note that even if
227 // client-side phishing detection is enabled, it will only be active if the
228 // user has opted in to UMA stats and SafeBrowsing is enabled in the
229 // preferences.
230 const char kDisableClientSidePhishingDetection[] =
231 "disable-client-side-phishing-detection";
233 // Disable default component extensions with background pages - useful for
234 // performance tests where these pages may interfere with perf results.
235 const char kDisableComponentExtensionsWithBackgroundPages[] =
236 "disable-component-extensions-with-background-pages";
238 const char kDisableComponentUpdate[] = "disable-component-update";
240 // Disables establishing certificate revocation information by downloading a
241 // set of CRLs rather than performing on-line checks.
242 const char kDisableCRLSets[] = "disable-crl-sets";
244 // Disables installation of default apps on first run. This is used during
245 // automated testing.
246 const char kDisableDefaultApps[] = "disable-default-apps";
248 // Disables device discovery.
249 const char kDisableDeviceDiscovery[] = "disable-device-discovery";
251 // Disables device discovery notifications.
252 const char kDisableDeviceDiscoveryNotifications[] =
253 "disable-device-discovery-notifications";
255 // Disables Domain Reliability Monitoring.
256 const char kDisableDomainReliability[] = "disable-domain-reliability";
258 // Disable extensions.
259 const char kDisableExtensions[] = "disable-extensions";
261 // Disable checking for user opt-in for extensions that want to inject script
262 // into file URLs (ie, always allow it). This is used during automated testing.
263 const char kDisableExtensionsFileAccessCheck[] =
264 "disable-extensions-file-access-check";
266 // Disable the net::URLRequestThrottlerManager functionality for
267 // requests originating from extensions.
268 const char kDisableExtensionsHttpThrottling[] =
269 "disable-extensions-http-throttling";
271 // Disables embedding of Flash fullscreen widgets within the browser window.
272 // This restores the old code paths where Flash fullscreen would display in its
273 // own separate, always-on-top window. In addition, this disables the new logic
274 // which would prevent fullscreening the browser window during screen-capture of
275 // a tab. http://crbug.com/256870 and http://crbug.com/290403
276 const char kDisableFullscreenWithinTab[] = "disable-fullscreen-within-tab";
278 // Don't resolve hostnames to IPv6 addresses. This can be used when debugging
279 // issues relating to IPv6, but shouldn't otherwise be needed. Be sure to file
280 // bugs if something isn't working properly in the presence of IPv6. This flag
281 // can be overidden by the "enable-ipv6" flag.
282 const char kDisableIPv6[] = "disable-ipv6";
284 // Disable the behavior that the second click on a launcher item (the click when
285 // the item is already active) minimizes the item.
286 const char kDisableMinimizeOnSecondLauncherItemClick[] =
287 "disable-minimize-on-second-launcher-item-click";
289 // Disables the menu on the NTP for accessing sessions from other devices.
290 const char kDisableNTPOtherSessionsMenu[] = "disable-ntp-other-sessions-menu";
292 // Disable auto-reload of error pages if offline.
293 const char kDisableOfflineAutoReload[] = "disable-offline-auto-reload";
295 // Disable only auto-reloading error pages when the tab is visible.
296 const char kDisableOfflineAutoReloadVisibleOnly[] =
297 "disable-offline-auto-reload-visible-only";
299 // Disable the origin chip.
300 const char kDisableOriginChip[] = "disable-origin-chip";
302 // Disable the setting to prompt the user for their OS account password before
303 // revealing plaintext passwords in the password manager.
304 const char kDisablePasswordManagerReauthentication[] =
305 "disable-password-manager-reauthentication";
307 // Enables searching for people from the apps list search box.
308 const char kDisablePeopleSearch[] = "disable-people-search";
310 // Disable pop-up blocking.
311 const char kDisablePopupBlocking[] = "disable-popup-blocking";
313 // Disables the usage of Portable Native Client.
314 const char kDisablePnacl[] = "disable-pnacl";
316 // Disable speculative TCP/IP preconnection.
317 const char kDisablePreconnect[] = "disable-preconnect";
319 // Disable prerendering based on local browsing history.
320 const char kDisablePrerenderLocalPredictor[] =
321 "disable-prerender-local-predictor";
323 // Disables print preview (For testing, and for users who don't like us. :[ )
324 const char kDisablePrintPreview[] = "disable-print-preview";
326 // Normally when the user attempts to navigate to a page that was the result of
327 // a post we prompt to make sure they want to. This switch may be used to
328 // disable that check. This switch is used during automated testing.
329 const char kDisablePromptOnRepost[] = "disable-prompt-on-repost";
331 // Disables support for the QUIC protocol.
332 const char kDisableQuic[] = "disable-quic";
334 // Disables support for the HTTPS over QUIC protocol. This is a temporary
335 // testing flag. This only has an effect if QUIC protocol is enabled.
336 const char kDisableQuicHttps[] = "disable-quic-https";
338 // Disable use of pacing of QUIC packets.
339 // This only has an effect if QUIC protocol is enabled.
340 const char kDisableQuicPacing[] = "disable-quic-pacing";
342 // Disable use of Chromium's port selection for the ephemeral port via bind().
343 // This only has an effect if QUIC protocol is enabled.
344 const char kDisableQuicPortSelection[] = "disable-quic-port-selection";
346 // Disable use of time-base loss detection for QUIC connections.
347 // This only has an effect if QUIC protocol is enabled.
348 const char kDisableQuicTimeBasedLossDetection[] =
349 "disable-quic-time-based-loss-detection";
351 // Prevents the save password bubble from being enabled.
352 const char kDisableSavePasswordBubble[] = "disable-save-password-bubble";
354 // Disables throttling prints initiated by scripts.
355 const char kDisableScriptedPrintThrottling[] =
356 "disable-scripted-print-throttling";
358 // Disables the "search button in omnibox" experiment.
359 const char kDisableSearchButtonInOmnibox[] =
360 "disable-search-button-in-omnibox";
362 // Disables using bubbles for session restore request.
363 const char kDisableSessionCrashedBubble[] = "disable-session-crashed-bubble";
365 // Disable SPDY/3.1. This is a temporary testing flag.
366 const char kDisableSpdy31[] = "disable-spdy31";
368 // Disables the suggestions service.
369 const char kDisableSuggestionsService[] = "disable-suggestions-service";
371 // Disables syncing browser data to a Google Account.
372 const char kDisableSync[] = "disable-sync";
374 // Disable synced notifications.
375 const char kDisableSyncSyncedNotifications[] =
376 "disable-sync-synced-notifications";
378 // Disables syncing one or more sync data types that are on by default.
379 // See sync/internal_api/public/base/model_type.h for possible types. Types
380 // should be comma separated, and follow the naming convention for string
381 // representation of model types, e.g.:
382 // --disable-synctypes='Typed URLs, Bookmarks, Autofill Profiles'
383 const char kDisableSyncTypes[] = "disable-sync-types";
385 // Disables the backend service for web resources.
386 const char kDisableWebResources[] = "disable-web-resources";
388 // Some tests seem to require the application to close when the last
389 // browser window is closed. Thus, we need a switch to force this behavior
390 // for ChromeOS Aura, disable "zero window mode".
391 // TODO(pkotwicz): Investigate if this bug can be removed.
392 // (http://crbug.com/119175)
393 const char kDisableZeroBrowsersOpenForTests[] =
394 "disable-zero-browsers-open-for-tests";
396 // Use a specific disk cache location, rather than one derived from the
397 // UserDatadir.
398 const char kDiskCacheDir[] = "disk-cache-dir";
400 // Forces the maximum disk space to be used by the disk cache, in bytes.
401 const char kDiskCacheSize[] = "disk-cache-size";
403 const char kDnsLogDetails[] = "dns-log-details";
405 // Disables prefetching of DNS information.
406 const char kDnsPrefetchDisable[] = "dns-prefetch-disable";
408 // Requests that a running browser process dump its collected histograms to a
409 // given file. The file is overwritten if it exists.
410 const char kDumpBrowserHistograms[] = "dump-browser-histograms";
412 // Overrides the path of Easy Unlock component app.
413 extern const char kEasyUnlockAppPath[] = "easy-unlock-app-path";
415 // Enables the notifications for the custodian of a supervised user when the
416 // supervised user sends an access request.
417 extern const char kEnableAccessRequestNotifications[] =
418 "enable-access-request-notifications";
420 // Enable Answers in Suggest.
421 const char kEnableAnswersInSuggest[] = "enable-answers-in-suggest";
423 // If set, the app list will be enabled as if enabled from CWS.
424 const char kEnableAppList[] = "enable-app-list";
426 // Enables the <window-controls> tag in platform apps.
427 const char kEnableAppWindowControls[] = "enable-app-window-controls";
429 // Enable OS integration for Chrome app file associations.
430 const char kEnableAppsFileAssociations[] = "enable-apps-file-associations";
432 // Show apps windows after the first paint. Windows will be shown significantly
433 // later for heavy apps loading resources synchronously but it will be
434 // insignificant for apps that load most of their resources asynchronously.
435 const char kEnableAppsShowOnFirstPaint[] = "enable-apps-show-on-first-paint";
437 // Enables the experimental asynchronous DNS client.
438 const char kEnableAsyncDns[] = "enable-async-dns";
440 // Enables the inclusion of non-standard ports when generating the Kerberos SPN
441 // in response to a Negotiate challenge. See
442 // HttpAuthHandlerNegotiate::CreateSPN for more background.
443 const char kEnableAuthNegotiatePort[] = "enable-auth-negotiate-port";
445 // Enables the benchmarking extensions.
446 const char kEnableBenchmarking[] = "enable-benchmarking";
448 // Enables client hints, which adds hints about browser state to HTTP requests.
449 const char kEnableClientHints[] = "enable-client-hints";
451 // Enables the multi-level undo system for bookmarks.
452 const char kEnableBookmarkUndo[] = "enable-bookmark-undo";
454 // This applies only when the process type is "service". Enables the Cloud
455 // Print Proxy component within the service process.
456 const char kEnableCloudPrintProxy[] = "enable-cloud-print-proxy";
458 // If true devtools experimental settings are enabled.
459 const char kEnableDevToolsExperiments[] = "enable-devtools-experiments";
461 // Enable device discovery notifications.
462 const char kEnableDeviceDiscoveryNotifications[] =
463 "enable-device-discovery-notifications";
465 // Enables the DOM distiller.
466 const char kEnableDomDistiller[] = "enable-dom-distiller";
468 // Enables Domain Reliability Monitoring.
469 const char kEnableDomainReliability[] = "enable-domain-reliability";
471 // Enable Enhanced Bookmarks.
472 const char kEnhancedBookmarksExperiment[] = "enhanced-bookmarks-experiment";
474 // Enables Easy Unlock to be set up and used.
475 extern const char kEnableEasyUnlock[] = "enable-easy-unlock";
477 // Enables experimentation with ephemeral apps, which are launched without
478 // installing in Chrome.
479 const char kEnableEphemeralApps[] = "enable-ephemeral-apps";
481 // Enables logging for extension activity.
482 const char kEnableExtensionActivityLogging[] =
483 "enable-extension-activity-logging";
485 const char kEnableExtensionActivityLogTesting[] =
486 "enable-extension-activity-log-testing";
488 // Enable the fast unload controller, which speeds up tab/window close by
489 // running a tab's onunload js handler independently of the GUI -
490 // crbug.com/142458 .
491 const char kEnableFastUnload[] = "enable-fast-unload";
493 // Enables IPv6 support, even if probes suggest that it may not be fully
494 // supported. Some probes may require internet connections, and this flag will
495 // allow support independent of application testing. This flag overrides
496 // "disable-ipv6" which appears elswhere in this file.
497 const char kEnableIPv6[] = "enable-ipv6";
499 // Enables experimentation with launching ephemeral apps via hyperlinks.
500 const char kEnableLinkableEphemeralApps[] = "enable-linkable-ephemeral-apps";
502 // Runs the Native Client inside the renderer process and enables GPU plugin
503 // (internally adds lEnableGpuPlugin to the command line).
504 const char kEnableNaCl[] = "enable-nacl";
506 // Enables the network-related benchmarking extensions.
507 const char kEnableNetBenchmarking[] = "enable-net-benchmarking";
509 // Enables NPN with HTTP. It means NPN is enabled but SPDY won't be used.
510 // HTTP is still used for all requests.
511 const char kEnableNpnHttpOnly[] = "enable-npn-http";
513 // Enable auto-reload of error pages if offline.
514 const char kEnableOfflineAutoReload[] = "enable-offline-auto-reload";
516 // Only auto-reload error pages when the tab is visible.
517 const char kEnableOfflineAutoReloadVisibleOnly[] =
518 "enable-offline-auto-reload-visible-only";
520 // Enable/Disable offering a "Load stale copy" option to the user if offline.
521 const char kEnableOfflineLoadStaleCache[] = "enable-offline-load-stale-cache";
522 const char kDisableOfflineLoadStaleCache[] =
523 "disable-offline-load-stale-cache";
525 // Controls which branch of the origin chip in location bar experiment is
526 // enabled.
528 // We're using independent flags here (as opposed to a common flag with
529 // different values) to be able to enable/disable the entire experience
530 // associated with this feature server-side from the FieldTrial (the complete
531 // experience includes other flag changes as well). It is not currently possible
532 // to do that with "flag=value" flags.
533 const char kEnableOriginChipAlways[] = "enable-origin-chip-always";
534 const char kEnableOriginChipOnSrp[] = "enable-origin-chip-on-srp";
536 // Enables panels (always on-top docked pop-up windows).
537 const char kEnablePanels[] = "enable-panels";
539 // Enables showing unregistered printers in print preview
540 const char kEnablePrintPreviewRegisterPromos[] =
541 "enable-print-preview-register-promos";
543 // Enable Privet storage.
544 const char kEnablePrivetStorage[] = "enable-privet-storage";
546 // Enables tracking of tasks in profiler for viewing via about:profiler.
547 // To predominantly disable tracking (profiling), use the command line switch:
548 // --enable-profiling=0
549 // Some tracking will still take place at startup, but it will be turned off
550 // during chrome_browser_main.
551 const char kEnableProfiling[] = "enable-profiling";
553 // Enables showing a prominent UI for initiating the URL app creation flow.
554 const char kEnableProminentURLAppFlow[] = "enable-prominent-url-app-flow";
556 // Enables query in the omnibox.
557 const char kEnableQueryExtraction[] = "enable-query-extraction";
559 // Enables support for the QUIC protocol. This is a temporary testing flag.
560 const char kEnableQuic[] = "enable-quic";
562 // Enables support for the HTTPS over QUIC protocol. This is a temporary
563 // testing flag. This only has an effect if QUIC protocol is enabled.
564 const char kEnableQuicHttps[] = "enable-quic-https";
566 // Disable use of pacing of QUIC packets.
567 // This only has an effect if QUIC protocol is enabled.
568 const char kEnableQuicPacing[] = "enable-quic-pacing";
570 // Enable use of Chromium's port selection for the ephemeral port via bind().
571 // This only has an effect if QUIC protocol is enabled.
572 const char kEnableQuicPortSelection[] = "enable-quic-port-selection";
574 // Enables use of time-base loss detection for QUIC connections.
575 // This only has an effect if QUIC protocol is enabled.
576 const char kEnableQuicTimeBasedLossDetection[] =
577 "enable-quic-time-based-loss-detection";
579 // Enables save password prompt bubble.
580 const char kEnableSavePasswordBubble[] = "enable-save-password-bubble";
582 // Enables SDCH for https schemes.
583 const char kEnableSdchOverHttps[] = "enable-sdch-over-https";
585 // Controls which branch of the "search button in omnibox" experiment is
586 // enabled.
588 // We're using independent flags here (as opposed to a common flag with
589 // different values) to be able to enable/disable the entire experience
590 // associated with this feature server-side from the FieldTrial (the complete
591 // experience includes other flag changes as well). It is not currently possible
592 // to do that with "flag=value" flags.
593 const char kEnableSearchButtonInOmniboxAlways[] =
594 "enable-search-button-in-omnibox-always";
595 const char kEnableSearchButtonInOmniboxForStr[] =
596 "enable-search-button-in-omnibox-for-str";
597 const char kEnableSearchButtonInOmniboxForStrOrIip[] =
598 "enable-search-button-in-omnibox-for-str-or-iip";
600 // Enables using bubbles for session restore request instead of infobars.
601 const char kEnableSessionCrashedBubble[] = "enable-session-crashed-bubble";
603 // Enable or disable settings in a separate browser window per profile
604 // (see SettingsWindowEnabled() below).
605 const char kEnableSettingsWindow[] = "enable-settings-window";
606 const char kDisableSettingsWindow[] = "disable-settings-window";
608 // Enable SPDY/4, aka HTTP/2. This is a temporary testing flag.
609 const char kEnableSpdy4[] = "enable-spdy4";
611 // Enables auto correction for misspelled words.
612 const char kEnableSpellingAutoCorrect[] = "enable-spelling-auto-correct";
614 // Enables participation in the field trial for user feedback to spelling
615 // service.
616 const char kEnableSpellingFeedbackFieldTrial[] =
617 "enable-spelling-feedback-field-trial";
619 // Enables an experimental hosted app experience.
620 const char kEnableStreamlinedHostedApps[] = "enable-streamlined-hosted-apps";
622 // Enables the suggestions service.
623 const char kEnableSuggestionsService[] = "enable-suggestions-service";
625 // Enables synced notifications.
626 const char kEnableSyncSyncedNotifications[] =
627 "enable-sync-synced-notifications";
629 // Enables synced articles.
630 const char kEnableSyncArticles[] = "enable-sync-articles";
632 // Enables fanciful thumbnail processing. Used with NTP for
633 // instant-extended-api, where thumbnails are generally smaller.
634 const char kEnableThumbnailRetargeting[] = "enable-thumbnail-retargeting";
636 // Enables Translate experimental new UX which replaces the infobar.
637 const char kEnableTranslateNewUX[] = "enable-translate-new-ux";
639 // Enables Alternate-Protocol when the port is user controlled (> 1024).
640 const char kEnableUserAlternateProtocolPorts[] =
641 "enable-user-controlled-alternate-protocol-ports";
643 // Spawns threads to watch for excessive delays in specified message loops.
644 // User should set breakpoints on Alarm() to examine problematic thread.
646 // Usage: -enable-watchdog=[ui][io]
648 // Order of the listed sub-arguments does not matter.
649 const char kEnableWatchdog[] = "enable-watchdog";
651 // Uses WebSocket over SPDY.
652 const char kEnableWebSocketOverSpdy[] = "enable-websocket-over-spdy";
654 // Explicitly allows additional ports using a comma-separated list of port
655 // numbers.
656 const char kExplicitlyAllowedPorts[] = "explicitly-allowed-ports";
658 // Turns on extension install verification if it would not otherwise have been
659 // turned on.
660 const char kExtensionsInstallVerification[] = "extensions-install-verification";
662 // Specifies a comma-separated list of extension ids that should be forced to
663 // be treated as not from the webstore when doing install verification.
664 const char kExtensionsNotWebstore[] = "extensions-not-webstore";
666 // Frequency in seconds for Extensions auto-update.
667 const char kExtensionsUpdateFrequency[] = "extensions-update-frequency";
669 // Additional query params to insert in the search and instant URLs. Useful for
670 // testing.
671 const char kExtraSearchQueryParams[] = "extra-search-query-params";
673 // Fakes the channel of the browser for purposes of Variations filtering. This
674 // is to be used for testing only. Possible values are "stable", "beta", "dev"
675 // and "canary". Note that this only applies if the browser's reported channel
676 // is UNKNOWN.
677 const char kFakeVariationsChannel[] = "fake-variations-channel";
679 // If this flag is present then this command line is being delegated to an
680 // already running chrome process via the fast path, ie: before chrome.dll is
681 // loaded. It is useful to tell the difference for tracking purposes.
682 const char kFastStart[] = "fast-start";
684 // These two flags are added around the switches about:flags adds to the
685 // command line. This is useful to see which switches were added by about:flags
686 // on about:version. They don't have any effect.
687 const char kFlagSwitchesBegin[] = "flag-switches-begin";
688 const char kFlagSwitchesEnd[] = "flag-switches-end";
690 // Forces application mode. This hides certain system UI elements and forces
691 // the app to be installed if it hasn't been already.
692 const char kForceAppMode[] = "force-app-mode";
694 // Displays the First Run experience when the browser is started, regardless of
695 // whether or not it's actually the First Run (this overrides kNoFirstRun).
696 const char kForceFirstRun[] = "force-first-run";
698 // Forces additional Chrome Variation Ids that will be sent in X-Client-Data
699 // header, specified as a 64-bit encoded list of numeric experiment ids. Ids
700 // prefixed with the character "t" will be treated as Trigger Variation Ids.
701 const char kForceVariationIds[] = "force-variation-ids";
703 // Specifies a custom name for the GSSAPI library to load.
704 const char kGSSAPILibraryName[] = "gssapi-library-name";
706 // These flags show the man page on Linux. They are equivalent to each
707 // other.
708 const char kHelp[] = "help";
709 const char kHelpShort[] = "h";
711 // Makes Windows happy by allowing it to show "Enable access to this program"
712 // checkbox in Add/Remove Programs->Set Program Access and Defaults. This only
713 // shows an error box because the only way to hide Chrome is by uninstalling
714 // it.
715 const char kHideIcons[] = "hide-icons";
717 // Enables grouping websites by domain and filtering them by period.
718 const char kHistoryEnableGroupByDomain[] = "enable-grouped-history";
720 // Specifies which page will be displayed in newly-opened tabs. We need this
721 // for testing purposes so that the UI tests don't depend on what comes up for
722 // http://google.com.
723 const char kHomePage[] = "homepage";
725 // Comma-separated list of rules that control how hostnames are mapped.
727 // For example:
728 // "MAP * 127.0.0.1" --> Forces all hostnames to be mapped to 127.0.0.1
729 // "MAP *.google.com proxy" --> Forces all google.com subdomains to be
730 // resolved to "proxy".
731 // "MAP test.com [::1]:77 --> Forces "test.com" to resolve to IPv6 loopback.
732 // Will also force the port of the resulting
733 // socket address to be 77.
734 // "MAP * baz, EXCLUDE www.google.com" --> Remaps everything to "baz",
735 // except for "www.google.com".
737 // These mappings apply to the endpoint host in a net::URLRequest (the TCP
738 // connect and host resolver in a direct connection, and the CONNECT in an http
739 // proxy connection, and the endpoint host in a SOCKS proxy connection).
740 const char kHostRules[] = "host-rules";
742 // The maximum number of concurrent host resolve requests (i.e. DNS) to allow
743 // (not counting backup attempts which would also consume threads).
744 // --host-resolver-retry-attempts must be set to zero for this to be exact.
745 const char kHostResolverParallelism[] = "host-resolver-parallelism";
747 // The maximum number of retry attempts to resolve the host. Set this to zero
748 // to disable host resolver retry attempts.
749 const char kHostResolverRetryAttempts[] = "host-resolver-retry-attempts";
751 // Causes net::URLFetchers to ignore requests for SSL client certificates,
752 // causing them to attempt an unauthenticated SSL/TLS session. This is intended
753 // for use when testing various service URLs (eg: kPromoServerURL, kSbURLPrefix,
754 // kSyncServiceURL, etc)
755 const char kIgnoreUrlFetcherCertRequests[] =
756 "ignore-urlfetcher-cert-requests";
758 // Causes the browser to launch directly in incognito mode.
759 const char kIncognito[] = "incognito";
761 // Causes Chrome to initiate an installation flow for the given app.
762 const char kInstallChromeApp[] = "install-chrome-app";
764 // Causes Chrome to attempt to get metadata from the webstore for the
765 // app/extension ID given, and then prompt the user to download and install it.
766 const char kInstallFromWebstore[] = "install-from-webstore";
768 // Marks a renderer as an Instant process.
769 const char kInstantProcess[] = "instant-process";
771 // Invalidation service should use GCM network channel even if experiment is not
772 // enabled.
773 const char kInvalidationUseGCMChannel[] = "invalidation-use-gcm-channel";
775 // Specifies the testcase used by the IPC fuzzer.
776 const char kIpcFuzzerTestcase[] = "ipc-fuzzer-testcase";
778 // Used for testing - keeps browser alive after last browser window closes.
779 const char kKeepAliveForTest[] = "keep-alive-for-test";
781 // Enable Kiosk mode.
782 const char kKioskMode[] = "kiosk";
784 // Print automatically in kiosk mode. |kKioskMode| must be set as well.
785 // See http://crbug.com/31395.
786 const char kKioskModePrinting[] = "kiosk-printing";
788 // Use this server address ledger.
789 const char kLedgerServer[] = "ledger-server";
791 // Use this tracing token for ledger.
792 const char kLedgerTracingToken[] = "ledger-tracing-token";
794 // Causes Chrome to attempt to get metadata from the webstore for the
795 // given item, and then prompt the user to download and install it.
796 const char kLimitedInstallFromWebstore[] = "limited-install-from-webstore";
798 // Comma-separated list of directories with component extensions to load.
799 const char kLoadComponentExtension[] = "load-component-extension";
801 // Loads an extension from the specified directory.
802 const char kLoadExtension[] = "load-extension";
804 // Controls which version of the malware and phishing interstitials is shown.
805 const char kMalwareInterstitialVersionV2[] = "malware-interstitial-v2";
806 const char kMalwareInterstitialVersionV3[] = "malware-interstitial-v3";
808 // Makes Chrome default browser
809 const char kMakeDefaultBrowser[] = "make-default-browser";
811 // Sets the supervised user ID for any loaded or newly created profile to the
812 // given value. Pass an empty string to mark the profile as non-supervised.
813 // Used for testing.
814 const char kSupervisedUserId[] = "managed-user-id";
816 // Used to authenticate requests to the Sync service for supervised users.
817 // Setting this switch also causes Sync to be set up for a supervised user.
818 const char kSupervisedUserSyncToken[] = "managed-user-sync-token";
820 // Use to opt-in user into Finch experiment groups.
821 const char kManualEnhancedBookmarks[] = "manual-enhanced-bookmarks";
822 const char kManualEnhancedBookmarksOptout[] =
823 "manual-enhanced-bookmarks-optout";
825 // Forces the maximum disk space to be used by the media cache, in bytes.
826 const char kMediaCacheSize[] = "media-cache-size";
828 // Enables dynamic loading of the Memory Profiler DLL, which will trace all
829 // memory allocations during the run.
830 const char kMemoryProfiling[] = "memory-profile";
832 // Enables histograming of tasks served by MessageLoop. See
833 // about:histograms/Loop for results, which show frequency of messages on each
834 // thread, including APC count, object signalling count, etc.
835 const char kMessageLoopHistogrammer[] = "message-loop-histogrammer";
837 // Enables the recording of metrics reports but disables reporting. In contrast
838 // to kDisableMetrics, this executes all the code that a normal client would
839 // use for reporting, except the report is dropped rather than sent to the
840 // server. This is useful for finding issues in the metrics code during UI and
841 // performance tests.
842 const char kMetricsRecordingOnly[] = "metrics-recording-only";
844 // Sets the base logging level for the net log. Log 0 logs the most data.
845 // Intended primarily for use with --log-net-log.
846 const char kNetLogLevel[] = "net-log-level";
848 // Disables the default browser check. Useful for UI/browser tests where we
849 // want to avoid having the default browser info-bar displayed.
850 const char kNoDefaultBrowserCheck[] = "no-default-browser-check";
852 // By default, an https page can load images, fonts or frames from an http
853 // page. This switch overrides this to block this lesser mixed-content problem.
854 const char kNoDisplayingInsecureContent[] = "no-displaying-insecure-content";
856 // Don't record/playback events when using record & playback.
857 const char kNoEvents[] = "no-events";
859 // Disables all experiments set on about:flags. Does not disable about:flags
860 // itself. Useful if an experiment makes chrome crash at startup: One can start
861 // chrome with --no-experiments, disable the problematic lab at about:flags and
862 // then restart chrome without this switch again.
863 const char kNoExperiments[] = "no-experiments";
865 // Skip First Run tasks, whether or not it's actually the First Run. Overridden
866 // by kForceFirstRun. This does not drop the First Run sentinel and thus doesn't
867 // prevent first run from occuring the next time chrome is launched without this
868 // flag.
869 const char kNoFirstRun[] = "no-first-run";
871 // Whether or not the browser should warn if the profile is on a network share.
872 // This flag is only relevant for Windows currently.
873 const char kNoNetworkProfileWarning[] = "no-network-profile-warning";
875 // Don't send hyperlink auditing pings
876 const char kNoPings[] = "no-pings";
878 // Don't use a proxy server, always make direct connections. Overrides any
879 // other proxy server flags that are passed.
880 const char kNoProxyServer[] = "no-proxy-server";
882 // Disables the service process from adding itself as an autorun process. This
883 // does not delete existing autorun registrations, it just prevents the service
884 // from registering a new one.
885 const char kNoServiceAutorun[] = "no-service-autorun";
887 // Does not automatically open a browser window on startup (used when
888 // launching Chrome for the purpose of hosting background apps).
889 const char kNoStartupWindow[] = "no-startup-window";
891 // Disables checking whether we received an acknowledgment when registering
892 // a supervised user. Also disables the timeout during registration that waits
893 // for the ack. Useful when debugging against a server that does not
894 // support notifications.
895 const char kNoSupervisedUserAcknowledgmentCheck[] =
896 "no-managed-user-acknowledgment-check";
898 // Specifies the maximum number of threads to use for running the Proxy
899 // Autoconfig (PAC) script.
900 const char kNumPacThreads[] = "num-pac-threads";
902 // Launches URL in new browser window.
903 const char kOpenInNewWindow[] = "new-window";
905 // Force use of QUIC for requests to the specified origin.
906 const char kOriginToForceQuicOn[] = "origin-to-force-quic-on";
908 // The time that a new chrome process which is delegating to an already running
909 // chrome process started. (See ProcessSingleton for more details.)
910 const char kOriginalProcessStartTime[] = "original-process-start-time";
912 // Enable the out of process PDF plugin.
913 const char kOutOfProcessPdf[] = "out-of-process-pdf";
915 // Packages an extension to a .crx installable file from a given directory.
916 const char kPackExtension[] = "pack-extension";
918 // Optional PEM private key to use in signing packaged .crx.
919 const char kPackExtensionKey[] = "pack-extension-key";
921 // Specifies the path to the user data folder for the parent profile.
922 const char kParentProfile[] = "parent-profile";
924 // Launches PerformanceMonitor at startup, which will gather statistics about
925 // Chrome's CPU and memory usage, page load times, startup times, and network
926 // usage, and will also store information about events which may be of interest,
927 // such as extension-related occurrences and crashes. Optionally, this may be
928 // run with an integer value representing the interval between the timed
929 // metric gatherings, measured in seconds (if invalid or not provided, the
930 // default interval is used).
931 const char kPerformanceMonitorGathering[] = "performance-monitor-gathering";
933 // Development flag for permission request API. This flag is needed until
934 // the API is finalized.
935 // TODO(akuegel): Remove when this flag is not needed anymore.
936 const char kPermissionRequestApiUrl[] = "permission-request-api-url";
938 // Read previously recorded data from the cache. Only cached data is read.
939 // See kRecordMode.
940 const char kPlaybackMode[] = "playback-mode";
942 // Use the PPAPI (Pepper) Flash found at the given path.
943 const char kPpapiFlashPath[] = "ppapi-flash-path";
945 // Report the given version for the PPAPI (Pepper) Flash. The version should be
946 // numbers separated by '.'s (e.g., "12.3.456.78"). If not specified, it
947 // defaults to "10.2.999.999".
948 const char kPpapiFlashVersion[] = "ppapi-flash-version";
950 // Triggers prerendering of search base page to prefetch results for the typed
951 // omnibox query. Only has an effect when prerender is enabled.
952 const char kPrefetchSearchResults[] = "prefetch-search-results";
954 // Triggers prerendering of pages from suggestions in the omnibox. Only has an
955 // effect when Instant is either disabled or restricted to search, and when
956 // prerender is enabled.
957 const char kPrerenderFromOmnibox[] = "prerender-from-omnibox";
958 // These are the values the kPrerenderFromOmnibox switch may have, as in
959 // "--prerender-from-omnibox=auto". auto: Allow field trial selection.
960 const char kPrerenderFromOmniboxSwitchValueAuto[] = "auto";
961 // disabled: No prerendering.
962 const char kPrerenderFromOmniboxSwitchValueDisabled[] = "disabled";
963 // enabled: Guaranteed prerendering.
964 const char kPrerenderFromOmniboxSwitchValueEnabled[] = "enabled";
965 // Controls speculative prerendering of pages, and content prefetching. Both
966 // are dispatched from <link rel=prefetch href=...> elements.
967 const char kPrerenderMode[] = "prerender";
968 // These are the values the kPrerenderMode switch may have, as in
969 // "--prerender=auto".
970 // auto: Allow field trial selection for prerender.
971 const char kPrerenderModeSwitchValueAuto[] = "auto";
972 // disabled: No prerendering.
973 const char kPrerenderModeSwitchValueDisabled[] = "disabled";
974 // enabled: Prerendering.
975 const char kPrerenderModeSwitchValueEnabled[] = "enabled";
977 // Use IPv6 only for privet HTTP.
978 const char kPrivetIPv6Only[] = "privet-ipv6-only";
980 // Outputs the product version information and quit. Used as an internal api to
981 // detect the installed version of Chrome on Linux.
982 const char kProductVersion[] = "product-version";
984 // Selects directory of profile to associate with the first browser launched.
985 const char kProfileDirectory[] = "profile-directory";
987 // Starts the sampling based profiler for the browser process at startup. This
988 // will only work if chrome has been built with the gyp variable profiling=1.
989 // The output will go to the value of kProfilingFile.
990 const char kProfilingAtStart[] = "profiling-at-start";
992 // Specifies a location for profiling output. This will only work if chrome has
993 // been built with the gyp variable profiling=1.
995 // {pid} if present will be replaced by the pid of the process.
996 // {count} if present will be incremented each time a profile is generated
997 // for this process.
998 // The default is chrome-profile-{pid}.
999 const char kProfilingFile[] = "profiling-file";
1001 // Specifies a path for the output of task-level profiling which can be loaded
1002 // and viewed in about:profiler.
1003 const char kProfilingOutputFile[] = "profiling-output-file";
1005 // Controls whether profile data is periodically flushed to a file. Normally
1006 // the data gets written on exit but cases exist where chrome doesn't exit
1007 // cleanly (especially when using single-process). A time in seconds can be
1008 // specified.
1009 const char kProfilingFlush[] = "profiling-flush";
1011 // Specifies a custom URL for fetching NTP promo data.
1012 const char kPromoServerURL[] = "promo-server-url";
1014 // Forces proxy auto-detection.
1015 const char kProxyAutoDetect[] = "proxy-auto-detect";
1017 // Specifies a list of hosts for whom we bypass proxy settings and use direct
1018 // connections. Ignored if --proxy-auto-detect or --no-proxy-server are also
1019 // specified. This is a comma-separated list of bypass rules. See:
1020 // "net/proxy/proxy_bypass_rules.h" for the format of these rules.
1021 const char kProxyBypassList[] = "proxy-bypass-list";
1023 // Uses the pac script at the given URL
1024 const char kProxyPacUrl[] = "proxy-pac-url";
1026 // Uses a specified proxy server, overrides system settings. This switch only
1027 // affects HTTP and HTTPS requests.
1028 const char kProxyServer[] = "proxy-server";
1030 // Specifies the maximum length for a QUIC packet.
1031 const char kQuicMaxPacketLength[] = "quic-max-packet-length";
1033 // Specifies the version of QUIC to use.
1034 const char kQuicVersion[] = "quic-version";
1036 // Chrome supports a playback and record mode. Record mode saves *everything*
1037 // to the cache. Playback mode reads data exclusively from the cache. This
1038 // allows us to record a session into the cache and then replay it at will.
1039 // See also kPlaybackMode.
1040 const char kRecordMode[] = "record-mode";
1042 // Enables print preview in the renderer. This flag is generated internally by
1043 // Chrome and does nothing when directly passed to the browser.
1044 const char kRendererPrintPreview[] = "renderer-print-preview";
1046 // If set, the app list will forget it has been installed on startup. Note this
1047 // doesn't prevent the app list from running, it just makes Chrome think the app
1048 // list hasn't been enabled (as in kEnableAppList) yet.
1049 const char kResetAppListInstallState[] = "reset-app-list-install-state";
1051 // Indicates the last session should be restored on startup. This overrides the
1052 // preferences value and is primarily intended for testing. The value of this
1053 // switch is the number of tabs to wait until loaded before 'load completed' is
1054 // sent to the ui_test.
1055 const char kRestoreLastSession[] = "restore-last-session";
1057 // Disable saving pages as HTML-only, disable saving pages as HTML Complete
1058 // (with a directory of sub-resources). Enable only saving pages as MHTML.
1059 // See http://crbug.com/120416 for how to remove this switch.
1060 const char kSavePageAsMHTML[] = "save-page-as-mhtml";
1062 // If present, safebrowsing only performs update when
1063 // SafeBrowsingProtocolManager::ForceScheduleNextUpdate() is explicitly called.
1064 // This is used for testing only.
1065 const char kSbDisableAutoUpdate[] = "safebrowsing-disable-auto-update";
1067 // TODO(lzheng): Remove this flag once the feature works fine
1068 // (http://crbug.com/74848).
1070 // Disables safebrowsing feature that checks download url and downloads
1071 // content's hash to make sure the content are not malicious.
1072 const char kSbDisableDownloadProtection[] =
1073 "safebrowsing-disable-download-protection";
1075 // Disables safebrowsing feature that checks for blacklisted extensions.
1076 const char kSbDisableExtensionBlacklist[] =
1077 "safebrowsing-disable-extension-blacklist";
1079 // Disables safebrowsing feature that provides a side-effect free whitelist.
1080 const char kSbDisableSideEffectFreeWhitelist[] =
1081 "safebrowsing-disable-side-effect-free-whitelist";
1083 // Causes the process to run as a service process.
1084 const char kServiceProcess[] = "service";
1086 // Sets a token in the token service, for testing.
1087 const char kSetToken[] = "set-token";
1089 // If true the app list will be shown.
1090 const char kShowAppList[] = "show-app-list";
1092 // See kHideIcons.
1093 const char kShowIcons[] = "show-icons";
1095 // Marks a renderer as the signin process.
1096 const char kSigninProcess[] = "signin-process";
1098 // Does not show an infobar when an extension attaches to a page using
1099 // chrome.debugger page. Required to attach to extension background pages.
1100 const char kSilentDebuggerExtensionAPI[] = "silent-debugger-extension-api";
1102 // Changes the DCHECKS to dump memory and continue instead of displaying error
1103 // dialog. This is valid only in Release mode when gyp dcheck_always_on=1.
1104 const char kSilentDumpOnDCHECK[] = "silent-dump-on-dcheck";
1106 // Causes Chrome to launch without opening any windows by default. Useful if
1107 // one wishes to use Chrome as an ash server.
1108 const char kSilentLaunch[] = "silent-launch";
1110 // Simulates an update being available.
1111 const char kSimulateUpgrade[] = "simulate-upgrade";
1113 // Simulates a critical update being available.
1114 const char kSimulateCriticalUpdate[] = "simulate-critical-update";
1116 // Simulates that current version is outdated.
1117 const char kSimulateOutdated[] = "simulate-outdated";
1119 // Simulates that current version is outdated and auto-update is off.
1120 const char kSimulateOutdatedNoAU[] = "simulate-outdated-no-au";
1122 // Specifies the URL where spelling service feedback data will be sent instead
1123 // of the default URL. This switch is for temporary testing only.
1124 // TODO(rouslan): Remove this flag when feedback testing is complete. Revisit by
1125 // August 2013.
1126 const char kSpellingServiceFeedbackUrl[] = "spelling-service-feedback-url";
1128 // Specifies the number of seconds between sending batches of feedback to
1129 // spelling service. The default is 30 minutes. The mininum is 5 seconds. This
1130 // switch is for temporary testing only.
1131 // TODO(rouslan): Remove this flag when feedback testing is complete. Revisit by
1132 // August 2013.
1133 const char kSpellingServiceFeedbackIntervalSeconds[] =
1134 "spelling-service-feedback-interval-seconds";
1136 // Controls which version of the TLS/SSL interstitial is shown.
1137 const char kSSLInterstitialVersionV1[] = "ssl-interstitial-v1";
1138 const char kSSLInterstitialVersionV2Gray[] = "ssl-interstitial-v2-gray";
1139 const char kSSLInterstitialVersionV2Colorful[] = "ssl-interstitial-v2-colorful";
1141 // Specifies the maximum SSL/TLS version ("ssl3", "tls1", "tls1.1", or
1142 // "tls1.2").
1143 const char kSSLVersionMax[] = "ssl-version-max";
1145 // Specifies the minimum SSL/TLS version ("ssl3", "tls1", "tls1.1", or
1146 // "tls1.2").
1147 const char kSSLVersionMin[] = "ssl-version-min";
1149 // Starts the browser maximized, regardless of any previous settings.
1150 const char kStartMaximized[] = "start-maximized";
1152 // Controls the width of time-of-day filters on the 'suggested' ntp page, in
1153 // minutes.
1154 const char kSuggestionNtpFilterWidth[] = "suggestion-ntp-filter-width";
1156 // Enables a normal distribution dropoff to the relevancy of visits with respect
1157 // to the time of day.
1158 const char kSuggestionNtpGaussianFilter[] = "suggestion-ntp-gaussian-filter";
1160 // Enables a linear dropoff to the relevancy of visits with respect to the time
1161 // of day.
1162 const char kSuggestionNtpLinearFilter[] = "suggestion-ntp-linear-filter";
1164 // This flag causes sync to retry very quickly (see polling_constants.h) the
1165 // when it encounters an error, as the first step towards exponential backoff.
1166 const char kSyncShortInitialRetryOverride[] =
1167 "sync-short-initial-retry-override";
1169 // Overrides the default server used for profile sync.
1170 const char kSyncServiceURL[] = "sync-url";
1172 // Enables deferring sync backend initialization until user initiated changes
1173 // occur.
1174 const char kSyncDisableDeferredStartup[] = "sync-disable-deferred-startup";
1176 // Allows overriding the deferred init fallback timeout.
1177 const char kSyncDeferredStartupTimeoutSeconds[] =
1178 "sync-deferred-startup-timeout-seconds";
1180 // Enables feature to avoid unnecessary GetUpdate requests.
1181 const char kSyncEnableGetUpdateAvoidance[] =
1182 "sync-enable-get-update-avoidance";
1184 // Enables directory support for sync filesystem
1185 const char kSyncfsEnableDirectoryOperation[] =
1186 "enable-syncfs-directory-operation";
1188 // Disable data backup when user's not signed in.
1189 const char kSyncDisableBackup[] = "disable-sync-backup";
1191 // Enable data rollback when receiving sync rollback command.
1192 const char kSyncEnableRollback[] = "enable-sync-rollback";
1194 // Passes the name of the current running automated test to Chrome.
1195 const char kTestName[] = "test-name";
1197 // Disables same-origin check on HTTP resources pushed via a SPDY proxy.
1198 // The value is the host:port of the trusted proxy.
1199 const char kTrustedSpdyProxy[] = "trusted-spdy-proxy";
1201 // Experimental. Shows a dialog asking the user to try chrome. This flag is to
1202 // be used only by the upgrade process.
1203 const char kTryChromeAgain[] = "try-chrome-again";
1205 // Runs un-installation steps that were done by chrome first-run.
1206 const char kUninstall[] = "uninstall";
1208 // Overrides per-origin quota settings to unlimited storage for any
1209 // apps/origins. This should be used only for testing purpose.
1210 const char kUnlimitedStorage[] = "unlimited-storage";
1212 // Uses Spdy for the transport protocol instead of HTTP. This is a temporary
1213 // testing flag.
1214 const char kUseSpdy[] = "use-spdy";
1216 // A string used to override the default user agent with a custom one.
1217 const char kUserAgent[] = "user-agent";
1219 // Specifies the user data directory, which is where the browser will look for
1220 // all of its state.
1221 const char kUserDataDir[] = "user-data-dir";
1223 // Examines a .crx for validity and prints the result.
1224 const char kValidateCrx[] = "validate-crx";
1226 // Uses experimental simple cache backend if possible.
1227 const char kUseSimpleCacheBackend[] = "use-simple-cache-backend";
1229 // Specifies a custom URL for the server which reports variation data to the
1230 // client. Specifying this switch enables the Variations service on
1231 // unofficial builds. See variations_service.cc.
1232 const char kVariationsServerURL[] = "variations-server-url";
1234 // Prints version information and quits.
1235 const char kVersion[] = "version";
1237 // Specify the initial window position: --window-position=x,y
1238 const char kWindowPosition[] = "window-position";
1240 // Specify the initial window size: --window-size=w,h
1241 const char kWindowSize[] = "window-size";
1243 // Uses WinHTTP to fetch and evaluate PAC scripts. Otherwise the default is to
1244 // use Chromium's network stack to fetch, and V8 to evaluate.
1245 const char kWinHttpProxyResolver[] = "winhttp-proxy-resolver";
1247 #if defined(ENABLE_PLUGIN_INSTALLATION)
1248 // Specifies a custom URL for fetching plug-ins metadata. Used for testing.
1249 const char kPluginsMetadataServerURL[] = "plugins-metadata-server-url";
1250 #endif
1252 #if defined(OS_ANDROID)
1253 // Disables support for playing videos on Chromecast devices.
1254 const char kDisableCast[] = "disable-cast";
1256 // Disables Contextual Search.
1257 const char kDisableContextualSearch[] = "disable-contextual-search";
1259 // Disables the new NTP.
1260 const char kDisableNewNTP[] = "disable-new-ntp";
1262 // Disables zero suggest experiment on Dev channel.
1263 const char kDisableZeroSuggest[] = "disable-zero-suggest";
1265 // Enable the accessibility tab switcher.
1266 const char kEnableAccessibilityTabSwitcher[] =
1267 "enable-accessibility-tab-switcher";
1269 // Enables app install alerts.
1270 const char kEnableAppInstallAlerts[] = "enable-app-install-alerts";
1272 // Enables Contextual Search.
1273 const char kEnableContextualSearch[] = "enable-contextual-search";
1275 // Enables the new NTP.
1276 const char kEnableNewNTP[] = "enable-new-ntp";
1278 // Enables zero suggest functionality on Dev channel, showing contextual
1279 // suggestions (EtherSuggest) for http pages and google.com search queries.
1280 const char kEnableZeroSuggestEtherSerp[] =
1281 "enable-zero-suggest-ether-serp";
1283 // Enables zero suggest functionality on Dev channel, showing contextual
1284 // suggestions (EtherSuggest) for http pages.
1285 const char kEnableZeroSuggestEtherNoSerp[] =
1286 "enable-zero-suggest-ether-noserp";
1288 // Enables zero suggest functionality on Dev channel, showing most visited
1289 // sites as default suggestions.
1290 const char kEnableZeroSuggestMostVisited[] =
1291 "enable-zero-suggest-most-visited";
1293 // Enables zero suggest functionality on Dev channel, showing recently typed
1294 // queries as default suggestions.
1295 const char kEnableZeroSuggestPersonalized[] =
1296 "enable-zero-suggest-personalized";
1298 // Enables instant search clicks feature.
1299 const char kEnableInstantSearchClicks[] = "enable-instant-search-clicks";
1301 // Enables EmbeddedSearch API in the search results page.
1302 const char kEnableEmbeddedSearchAPI[] = "enable-embeddedsearch-api";
1304 #endif
1306 #if defined(USE_ASH)
1307 const char kOpenAsh[] = "open-ash";
1308 #endif
1310 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_CHROMEOS)
1311 // Specifies which password store to use (detect, default, gnome, kwallet).
1312 const char kPasswordStore[] = "password-store";
1313 #endif
1315 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
1316 // Triggers migration of user data directory to another directory
1317 // specified as a parameter. The migration is done under singleton lock,
1318 // and sanity checks are made to avoid corrupting the profile.
1319 // The browser exits after migration is complete.
1320 const char kMigrateDataDirForSxS[] = "migrate-data-dir-for-sxs";
1322 // Allows sending text-to-speech requests to speech-dispatcher, a common
1323 // Linux speech service. Because it's buggy, the user must explicitly
1324 // enable it so that visiting a random webpage can't cause instability.
1325 const char kEnableSpeechDispatcher[] = "enable-speech-dispatcher";
1326 #endif // defined(OS_LINUX) && !defined(OS_CHROMEOS)
1328 #if defined(OS_MACOSX)
1329 // Prevents Chrome from quitting when Chrome Apps are open.
1330 const char kAppsKeepChromeAlive[] = "apps-keep-chrome-alive";
1332 // Forcibly disables Lion-style on newer OSes, to allow developers to test the
1333 // older, SnowLeopard-style fullscreen.
1334 const char kDisableSystemFullscreenForTesting[] =
1335 "disable-system-fullscreen-for-testing";
1337 // Enables a simplified fullscreen UI on Mac.
1338 const char kEnableSimplifiedFullscreen[] = "enable-simplified-fullscreen";
1340 // A process type (switches::kProcessType) that relaunches the browser. See
1341 // chrome/browser/mac/relauncher.h.
1342 const char kRelauncherProcess[] = "relauncher";
1344 #endif
1346 // Use bubbles for content permissions requests instead of infobars.
1347 const char kEnablePermissionsBubbles[] = "enable-permissions-bubbles";
1349 #if defined(OS_WIN)
1350 // Fallback to XPS. By default connector uses CDD.
1351 const char kEnableCloudPrintXps[] = "enable-cloud-print-xps";
1353 // Force-enables the profile shortcut manager. This is needed for tests since
1354 // they use a custom-user-data-dir which disables this.
1355 const char kEnableProfileShortcutManager[] = "enable-profile-shortcut-manager";
1357 // For the DelegateExecute verb handler to launch Chrome in metro mode on
1358 // Windows 8 and higher. Used when relaunching metro Chrome.
1359 const char kForceImmersive[] = "force-immersive";
1361 // For the DelegateExecute verb handler to launch Chrome in desktop mode on
1362 // Windows 8 and higher. Used when relaunching metro Chrome.
1363 const char kForceDesktop[] = "force-desktop";
1365 // Relaunches metro Chrome on Windows 8 and higher using a given shortcut.
1366 const char kRelaunchShortcut[] = "relaunch-shortcut";
1368 // Requests that Chrome connect to the running Metro viewer process.
1369 const char kViewerConnect[] = "viewer-connect";
1371 // Requests that Chrome launch the Metro viewer process via the given appid
1372 // (which is assumed to be registered as default browser) and synchronously
1373 // connect to it.
1374 const char kViewerLaunchViaAppId[] = "viewer-launch-via-appid";
1376 // Waits for the given handle to be signaled before relaunching metro Chrome on
1377 // Windows 8 and higher.
1378 const char kWaitForMutex[] = "wait-for-mutex";
1380 // Indicates that chrome was launched to service a search request in Windows 8.
1381 const char kWindows8Search[] = "windows8-search";
1382 #endif
1384 #if defined(ENABLE_FULL_PRINTING) && !defined(OFFICIAL_BUILD)
1385 // Enables support to debug printing subsystem.
1386 const char kDebugPrint[] = "debug-print";
1387 #endif
1389 #ifndef NDEBUG
1390 // Enables overriding the path of file manager extension.
1391 const char kFileManagerExtensionPath[] = "filemgr-ext-path";
1392 #endif
1394 bool SettingsWindowEnabled() {
1395 #if defined(OS_CHROMEOS)
1396 return !CommandLine::ForCurrentProcess()->HasSwitch(
1397 ::switches::kDisableSettingsWindow);
1398 #else
1399 return CommandLine::ForCurrentProcess()->HasSwitch(
1400 ::switches::kEnableSettingsWindow);
1401 #endif
1404 // -----------------------------------------------------------------------------
1405 // DO NOT ADD YOUR CRAP TO THE BOTTOM OF THIS FILE.
1407 // You were going to just dump your switches here, weren't you? Instead, please
1408 // put them in alphabetical order above, or in order inside the appropriate
1409 // ifdef at the bottom. The order should match the header.
1410 // -----------------------------------------------------------------------------
1412 } // namespace switches