[Cronet] Delay StartNetLog and StopNetLog until native request context is initialized
[chromium-blink-merge.git] / chrome / common / chrome_switches.cc
blob1938051c788b7b126ae5d16d0e93fa45dcaa5910
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 // Enables TLS/SSL errors on localhost to be ignored (no interstitial,
37 // no blocking of requests).
38 const char kAllowInsecureLocalhost[] = "allow-insecure-localhost";
40 #if defined(ENABLE_PLUGINS)
41 // Specifies comma-separated list of extension ids or hosts to grant
42 // access to CRX file system APIs.
43 const char kAllowNaClCrxFsAPI[] = "allow-nacl-crxfs-api";
45 // Specifies comma-separated list of extension ids or hosts to grant
46 // access to file handle APIs.
47 const char kAllowNaClFileHandleAPI[] = "allow-nacl-file-handle-api";
49 // Specifies comma-separated list of extension ids or hosts to grant
50 // access to TCP/UDP socket APIs.
51 const char kAllowNaClSocketAPI[] = "allow-nacl-socket-api";
52 #endif
54 // Don't block outdated plugins.
55 const char kAllowOutdatedPlugins[] = "allow-outdated-plugins";
57 // By default, an https page cannot run JavaScript, CSS or plugins from http
58 // URLs. This provides an override to get the old insecure behavior.
59 const char kAllowRunningInsecureContent[] = "allow-running-insecure-content";
61 // Specifies the threshold to be used when determining of an Alternate-Protocol
62 // advertisement will be honored. If the advertised probability is larger
63 // than the threshold, then it will be honored.
64 const char kAlternateProtocolProbabilityThreshold[] =
65 "alternate-protocol-probability-threshold";
67 // Prevents Chrome from requiring authorization to run certain widely installed
68 // but less commonly used plugins.
69 const char kAlwaysAuthorizePlugins[] = "always-authorize-plugins";
71 // Specifies that the extension-app with the specified id should be launched
72 // according to its configuration.
73 const char kAppId[] = "app-id";
75 // Specifies that the associated value should be launched in "application"
76 // mode.
77 const char kApp[] = "app";
79 // Overrides the apps checkout URL, which is used to determine when to expose
80 // some private APIs.
81 const char kAppsCheckoutURL[] = "apps-checkout-url";
83 // The URL that the webstore APIs download extensions from.
84 // Note: the URL must contain one '%s' for the extension ID.
85 const char kAppsGalleryDownloadURL[] = "apps-gallery-download-url";
87 // The URL to use for the gallery link in the app launcher.
88 const char kAppsGalleryURL[] = "apps-gallery-url";
90 // The update url used by gallery/webstore extensions.
91 const char kAppsGalleryUpdateURL[] = "apps-gallery-update-url";
93 // Value of GAIA auth code for --force-app-mode.
94 const char kAppModeAuthCode[] = "app-mode-auth-code";
96 // Value of OAuth2 refresh token for --force-app-mode.
97 const char kAppModeOAuth2Token[] = "app-mode-oauth-token";
99 // Enables overriding the path for the default authentication extension.
100 const char kAuthExtensionPath[] = "auth-ext-path";
102 // A flag that is used to tell Chrome that it was launched automatically at
103 // computer startup and not by some user action.
104 const char kAutoLaunchAtStartup[] = "auto-launch-at-startup";
106 // This flag makes Chrome auto-select the provided choice when an extension asks
107 // permission to start desktop capture. Should only be used for tests. For
108 // instance, --auto-select-desktop-capture-source="Entire screen" will
109 // automatically select to share the entire screen in English locales.
110 const char kAutoSelectDesktopCaptureSource[] =
111 "auto-select-desktop-capture-source";
113 // This flag causes the user engagement checks for showing app banners to be
114 // bypasses. It is intended to be used by developers who wish to test that their
115 // sites otherwise meet the criteria needed to show app banners.
116 const char kBypassAppBannerEngagementChecks[] =
117 "bypass-app-banner-engagement-checks";
119 // Certificate Transparency: Uses the provided log(s) for checking Signed
120 // Certificate Timestamps provided with certificates.
121 // The switch's value is:
122 // log_description:log_key,log_description:log_key,...
123 // where
124 // log_description is a textual description of the log.
125 // log_key is a Base64'd DER-encoded SubjectPublicKeyInfo of the log's
126 // public key.
127 // Multiple logs can be specified by repeating description:key pairs,
128 // separated by a comma.
129 const char kCertificateTransparencyLog[] =
130 "certificate-transparency-log";
132 // How often (in seconds) to check for updates. Should only be used for testing
133 // purposes.
134 const char kCheckForUpdateIntervalSec[] = "check-for-update-interval";
136 // Checks the cloud print connector policy, informing the service process if
137 // the policy is set to disallow the connector, then quits.
138 const char kCheckCloudPrintConnectorPolicy[] =
139 "check-cloud-print-connector-policy";
141 // Comma-separated list of SSL cipher suites to disable.
142 const char kCipherSuiteBlacklist[] = "cipher-suite-blacklist";
144 // Tells chrome to display the cloud print dialog and upload the specified file
145 // for printing.
146 const char kCloudPrintFile[] = "cloud-print-file";
148 // Specifies the mime type to be used when uploading data from the file
149 // referenced by cloud-print-file. Defaults to "application/pdf" if
150 // unspecified.
151 const char kCloudPrintFileType[] = "cloud-print-file-type";
153 // Used with kCloudPrintFile to specify a JSON print ticket for the resulting
154 // print job. Defaults to null if unspecified.
155 const char kCloudPrintPrintTicket[] = "cloud-print-print-ticket";
157 // Used with kCloudPrintFile to specify a title for the resulting print job.
158 const char kCloudPrintJobTitle[] = "cloud-print-job-title";
160 // Setup cloud print proxy for provided printers. This does not start
161 // service or register proxy for autostart.
162 const char kCloudPrintSetupProxy[] = "cloud-print-setup-proxy";
164 // Comma-separated list of BrowserThreads that cause browser process to crash
165 // if the given browser thread is not responsive. UI,IO,DB,FILE,CACHE are the
166 // list of BrowserThreads that are supported.
168 // For example:
169 // --crash-on-hang-threads=UI:3:18,IO:3:18 --> Crash the browser if UI or IO
170 // is not responsive for 18 seconds and the number of browser threads that
171 // are responding is less than or equal to 3.
172 const char kCrashOnHangThreads[] = "crash-on-hang-threads";
174 // Some platforms like ChromeOS default to empty desktop.
175 // Browser tests may need to add this switch so that at least one browser
176 // instance is created on startup.
177 // TODO(nkostylev): Investigate if this switch could be removed.
178 // (http://crbug.com/148675)
179 const char kCreateBrowserOnStartupForTests[] =
180 "create-browser-on-startup-for-tests";
182 // Enables a frame context menu item that toggles the frame in and out of glass
183 // mode (Windows Vista and up only).
184 const char kDebugEnableFrameToggle[] = "debug-enable-frame-toggle";
186 // Adds debugging entries such as Inspect Element to context menus of packed
187 // apps.
188 const char kDebugPackedApps[] = "debug-packed-apps";
190 // Triggers a plethora of diagnostic modes.
191 const char kDiagnostics[] = "diagnostics";
193 // Sets the output format for diagnostic modes enabled by diagnostics flag.
194 const char kDiagnosticsFormat[] = "diagnostics-format";
196 // Tells the diagnostics mode to do the requested recovery step(s).
197 const char kDiagnosticsRecovery[] = "diagnostics-recovery";
199 // When kEnableSettingsWindow is used, About is shown as an overlay in Settings
200 // instead of as a separate page, unless this flag is specified.
201 const char kDisableAboutInSettings[] = "disable-about-in-settings";
203 // Disables the experimental asynchronous DNS client.
204 const char kDisableAsyncDns[] = "disable-async-dns";
206 // Disable several subsystems which run network requests in the background.
207 // This is for use when doing network performance testing to avoid noise in the
208 // measurements.
209 const char kDisableBackgroundNetworking[] = "disable-background-networking";
211 // Disables the bundled PPAPI version of Flash.
212 const char kDisableBundledPpapiFlash[] = "disable-bundled-ppapi-flash";
214 // Disable hardware encoding support for Cast Streaming.
215 const char kDisableCastStreamingHWEncoding[] =
216 "disable-cast-streaming-hw-encoding";
218 // Disable the requirement of Certificate Transparency presence for EV
219 // certificate. This flag only affects the EV indicator.
220 const char kDisableCertificateTransparencyRequirementForEV[] =
221 "disable-ct-for-ev";
223 // Disables detection of child accounts.
224 const char kDisableChildAccountDetection[] =
225 "disable-child-account-detection";
227 // Disables the client-side phishing detection feature. Note that even if
228 // client-side phishing detection is enabled, it will only be active if the
229 // user has opted in to UMA stats and SafeBrowsing is enabled in the
230 // preferences.
231 const char kDisableClientSidePhishingDetection[] =
232 "disable-client-side-phishing-detection";
234 // Disable default component extensions with background pages - useful for
235 // performance tests where these pages may interfere with perf results.
236 const char kDisableComponentExtensionsWithBackgroundPages[] =
237 "disable-component-extensions-with-background-pages";
239 const char kDisableComponentUpdate[] = "disable-component-update";
241 // Disables installation of default apps on first run. This is used during
242 // automated testing.
243 const char kDisableDefaultApps[] = "disable-default-apps";
245 // Disables device discovery notifications.
246 const char kDisableDeviceDiscoveryNotifications[] =
247 "disable-device-discovery-notifications";
249 // Disables the dinosaur easter egg on the offline interstitial.
250 const char kDisableDinosaurEasterEgg[] = "disable-dinosaur-easter-egg";
252 // Disables Domain Reliability Monitoring.
253 const char kDisableDomainReliability[] = "disable-domain-reliability";
255 // Disable extensions.
256 const char kDisableExtensions[] = "disable-extensions";
258 // Disable checking for user opt-in for extensions that want to inject script
259 // into file URLs (ie, always allow it). This is used during automated testing.
260 const char kDisableExtensionsFileAccessCheck[] =
261 "disable-extensions-file-access-check";
263 // Disable the net::URLRequestThrottlerManager functionality for
264 // requests originating from extensions.
265 const char kDisableExtensionsHttpThrottling[] =
266 "disable-extensions-http-throttling";
268 // Disables large icons on the New Tab page.
269 const char kDisableIconNtp[] = "disable-icon-ntp";
271 // Don't resolve hostnames to IPv6 addresses. This can be used when debugging
272 // issues relating to IPv6, but shouldn't otherwise be needed. Be sure to file
273 // bugs if something isn't working properly in the presence of IPv6. This flag
274 // can be overidden by the "enable-ipv6" flag.
275 const char kDisableIPv6[] = "disable-ipv6";
277 // Disable the behavior that the second click on a launcher item (the click when
278 // the item is already active) minimizes the item.
279 const char kDisableMinimizeOnSecondLauncherItemClick[] =
280 "disable-minimize-on-second-launcher-item-click";
282 // Disables the new bookmark app system.
283 const char kDisableNewBookmarkApps[] = "disable-new-bookmark-apps";
285 // Disables the new offline error page generated by NetErrorHelper for ChromeOS
286 // and instead uses the old error page generated by OfflineResourceThrottle.
287 const char kDisableNewOfflineErrorPage[] = "disable-new-offline-error-page";
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 out of process PDF plugin.
300 const char kDisableOutOfProcessPdf[] = "disable-out-of-process-pdf";
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 // Disable the new material UI - requires out of process PDF plugin.
308 const char kDisablePdfMaterialUI[] = "disable-pdf-material-ui";
310 // Don't use bubbles for content permissions requests instead of infobars.
311 const char kDisablePermissionsBubbles[] = "disable-permissions-bubbles";
313 // Disable pop-up blocking.
314 const char kDisablePopupBlocking[] = "disable-popup-blocking";
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 // Disable use of pacing of QUIC packets.
335 // This only has an effect if QUIC protocol is enabled.
336 const char kDisableQuicPacing[] = "disable-quic-pacing";
338 // Disable use of Chromium's port selection for the ephemeral port via bind().
339 // This only has an effect if QUIC protocol is enabled.
340 const char kDisableQuicPortSelection[] = "disable-quic-port-selection";
342 // Prevents the save password bubble from being enabled.
343 const char kDisableSavePasswordBubble[] = "disable-save-password-bubble";
345 // Prevents SDCH persistence from being used.
346 const char kDisableSdchPersistence[] = "disable-sdch-persistence";
348 // Disables using bubbles for session restore request.
349 const char kDisableSessionCrashedBubble[] = "disable-session-crashed-bubble";
351 // Disables the suggestions service.
352 const char kDisableSuggestionsService[] = "disable-suggestions-service";
354 // Disables the supervised user host blacklist.
355 const char kDisableSupervisedUserBlacklist[] =
356 "disable-supervised-user-blacklist";
358 // Disables SafeSites filtering for supervised users.
359 const char kDisableSupervisedUserSafeSites[] =
360 "disable-supervised-user-safesites";
362 // Disables syncing browser data to a Google Account.
363 const char kDisableSync[] = "disable-sync";
365 // Disables syncing one or more sync data types that are on by default.
366 // See sync/internal_api/public/base/model_type.h for possible types. Types
367 // should be comma separated, and follow the naming convention for string
368 // representation of model types, e.g.:
369 // --disable-synctypes='Typed URLs, Bookmarks, Autofill Profiles'
370 const char kDisableSyncTypes[] = "disable-sync-types";
372 // Disables the backend service for web resources.
373 const char kDisableWebResources[] = "disable-web-resources";
375 // Some tests seem to require the application to close when the last
376 // browser window is closed. Thus, we need a switch to force this behavior
377 // for ChromeOS Aura, disable "zero window mode".
378 // TODO(pkotwicz): Investigate if this bug can be removed.
379 // (http://crbug.com/119175)
380 const char kDisableZeroBrowsersOpenForTests[] =
381 "disable-zero-browsers-open-for-tests";
383 // Use a specific disk cache location, rather than one derived from the
384 // UserDatadir.
385 const char kDiskCacheDir[] = "disk-cache-dir";
387 // Forces the maximum disk space to be used by the disk cache, in bytes.
388 const char kDiskCacheSize[] = "disk-cache-size";
390 const char kDnsLogDetails[] = "dns-log-details";
392 // Disables prefetching of DNS information.
393 const char kDnsPrefetchDisable[] = "dns-prefetch-disable";
395 // Requests that a running browser process dump its collected histograms to a
396 // given file. The file is overwritten if it exists.
397 const char kDumpBrowserHistograms[] = "dump-browser-histograms";
399 // Overrides the path of Easy Unlock component app.
400 const char kEasyUnlockAppPath[] = "easy-unlock-app-path";
402 // If set, the app list will be enabled as if enabled from CWS.
403 const char kEnableAppList[] = "enable-app-list";
405 // Enable OS integration for Chrome app file associations.
406 const char kEnableAppsFileAssociations[] = "enable-apps-file-associations";
408 // Enables the experimental asynchronous DNS client.
409 const char kEnableAsyncDns[] = "enable-async-dns";
411 // Enables the benchmarking extensions.
412 const char kEnableBenchmarking[] = "enable-benchmarking";
414 // Enables the multi-level undo system for bookmarks.
415 const char kEnableBookmarkUndo[] = "enable-bookmark-undo";
417 // Enables detection of child accounts.
418 const char kEnableChildAccountDetection[] =
419 "enable-child-account-detection";
421 // This applies only when the process type is "service". Enables the Cloud
422 // Print Proxy component within the service process.
423 const char kEnableCloudPrintProxy[] = "enable-cloud-print-proxy";
425 // If true devtools experimental settings are enabled.
426 const char kEnableDevToolsExperiments[] = "enable-devtools-experiments";
428 // Enable device discovery notifications.
429 const char kEnableDeviceDiscoveryNotifications[] =
430 "enable-device-discovery-notifications";
432 // Enables the DOM distiller.
433 const char kEnableDomDistiller[] = "enable-dom-distiller";
435 // Enables Domain Reliability Monitoring.
436 const char kEnableDomainReliability[] = "enable-domain-reliability";
438 // Enables Download Notification.
439 const char kEnableDownloadNotification[] = "enable-download-notification";
441 // Enable Enhanced Bookmarks.
442 const char kEnhancedBookmarksExperiment[] = "enhanced-bookmarks-experiment";
444 // Enables experimentation with ephemeral apps to be launched from the webstore.
445 const char kEnableEphemeralAppsInWebstore[] =
446 "enable-ephemeral-apps-in-webstore";
448 // Enables experimental hotword features specific to always-on.
449 const char kEnableExperimentalHotwordHardware[] = "enable-hotword-hardware";
451 // Enables logging for extension activity.
452 const char kEnableExtensionActivityLogging[] =
453 "enable-extension-activity-logging";
455 const char kEnableExtensionActivityLogTesting[] =
456 "enable-extension-activity-log-testing";
458 // Enable the fast unload controller, which speeds up tab/window close by
459 // running a tab's onunload js handler independently of the GUI -
460 // crbug.com/142458 .
461 const char kEnableFastUnload[] = "enable-fast-unload";
463 // Enables large icons on the New Tab page.
464 const char kEnableIconNtp[] = "enable-icon-ntp";
466 // Enable opt-in for the collection of invalid TLS/SSL certificate chains.
467 const char kEnableInvalidCertCollection[] = "enable-invalid-cert-collection";
469 // Enables IPv6 support, even if probes suggest that it may not be fully
470 // supported. Some probes may require internet connections, and this flag will
471 // allow support independent of application testing. This flag overrides
472 // "disable-ipv6" which appears elswhere in this file.
473 const char kEnableIPv6[] = "enable-ipv6";
475 // Enables experimentation with launching ephemeral apps via hyperlinks.
476 const char kEnableLinkableEphemeralApps[] = "enable-linkable-ephemeral-apps";
478 // Enables the material design Settings feature.
479 const char kEnableMaterialDesignSettings[] = "enable-md-settings";
481 // Enables Media Router.
482 const char kEnableMediaRouter[] = "enable-media-router";
484 // Runs the Native Client inside the renderer process and enables GPU plugin
485 // (internally adds lEnableGpuPlugin to the command line).
486 const char kEnableNaCl[] = "enable-nacl";
488 // Enables the network-related benchmarking extensions.
489 const char kEnableNetBenchmarking[] = "enable-net-benchmarking";
491 // Enables the new bookmark app system.
492 const char kEnableNewBookmarkApps[] = "enable-new-bookmark-apps";
494 // Enables NPN with HTTP. It means NPN is enabled but SPDY won't be used.
495 // HTTP is still used for all requests.
496 const char kEnableNpnHttpOnly[] = "enable-npn-http";
498 // Enable auto-reload of error pages if offline.
499 const char kEnableOfflineAutoReload[] = "enable-offline-auto-reload";
501 // Only auto-reload error pages when the tab is visible.
502 const char kEnableOfflineAutoReloadVisibleOnly[] =
503 "enable-offline-auto-reload-visible-only";
505 // Enable the out of process PDF plugin.
506 const char kEnableOutOfProcessPdf[] = "enable-out-of-process-pdf";
508 // Enables panels (always on-top docked pop-up windows).
509 const char kEnablePanels[] = "enable-panels";
511 // Enable the new material UI - requires out of process PDF plugin.
512 const char kEnablePdfMaterialUI[] = "enable-pdf-material-ui";
514 // Enables presenting plugin placeholder content as shadow DOM.
515 const char kEnablePluginPlaceholderShadowDom[] =
516 "enable-plugin-placeholder-shadow-dom";
518 // Enables a number of potentially annoying security features (strict mixed
519 // content mode, powerful feature restrictions, etc.)
520 const char kEnablePotentiallyAnnoyingSecurityFeatures[] =
521 "enable-potentially-annoying-security-features";
523 // Enables the Power overlay in Settings.
524 const char kEnablePowerOverlay[] = "enable-power-overlay";
526 // Enables showing unregistered printers in print preview
527 const char kEnablePrintPreviewRegisterPromos[] =
528 "enable-print-preview-register-promos";
530 // Enable Privet storage.
531 const char kEnablePrivetStorage[] = "enable-privet-storage";
533 // Enables tracking of tasks in profiler for viewing via about:profiler.
534 // To predominantly disable tracking (profiling), use the command line switch:
535 // --enable-profiling=0
536 // Some tracking will still take place at startup, but it will be turned off
537 // during chrome_browser_main.
538 const char kEnableProfiling[] = "enable-profiling";
540 // Enables query in the omnibox.
541 const char kEnableQueryExtraction[] = "enable-query-extraction";
543 // Enables support for the QUIC protocol. This is a temporary testing flag.
544 const char kEnableQuic[] = "enable-quic";
546 // Disable use of pacing of QUIC packets.
547 // This only has an effect if QUIC protocol is enabled.
548 const char kEnableQuicPacing[] = "enable-quic-pacing";
550 // Enable use of Chromium's port selection for the ephemeral port via bind().
551 // This only has an effect if QUIC protocol is enabled.
552 const char kEnableQuicPortSelection[] = "enable-quic-port-selection";
554 // Enables context-sensitive reader mode button in the toolbar.
555 const char kEnableReaderModeToolbarIcon[] =
556 "enable-reader-mode-toolbar-icon";
558 // Enables save password prompt bubble.
559 const char kEnableSavePasswordBubble[] = "enable-save-password-bubble";
561 // Enables SDCH for https schemes.
562 const char kEnableSdchOverHttps[] = "enable-sdch-over-https";
564 // Enables SDCH persistence.
565 const char kEnableSdchPersistence[] = "enable-sdch-persistence";
567 // Enables using bubbles for session restore request instead of infobars.
568 const char kEnableSessionCrashedBubble[] = "enable-session-crashed-bubble";
570 // Enable or disable settings in a separate browser window per profile
571 // (see SettingsWindowEnabled() below).
572 const char kEnableSettingsWindow[] = "enable-settings-window";
573 const char kDisableSettingsWindow[] = "disable-settings-window";
575 // Enable SPDY/4, aka HTTP/2. This is a temporary testing flag.
576 const char kEnableSpdy4[] = "enable-spdy4";
578 // Enables implementation of the Cache-Control: stale-while-revalidate directive
579 // which permits servers to allow the use of stale resources while revalidation
580 // proceeds in the background.
581 const char kEnableStaleWhileRevalidate[] = "enable-stale-while-revalidate";
583 // Enables the suggestions service.
584 const char kEnableSuggestionsService[] = "enable-suggestions-service";
586 // Enables the supervised user host blacklist.
587 const char kEnableSupervisedUserBlacklist[] =
588 "enable-supervised-user-blacklist";
590 // Enables the supervised user managed bookmarks folder.
591 const char kEnableSupervisedUserManagedBookmarksFolder[] =
592 "enable-supervised-user-managed-bookmarks-folder";
594 // Enables SafeSites filtering for supervised users.
595 const char kEnableSupervisedUserSafeSites[] =
596 "enable-supervised-user-safesites";
598 // Enables synced articles.
599 const char kEnableSyncArticles[] = "enable-sync-articles";
601 // Enables user control over muting tab audio from the tab strip.
602 const char kEnableTabAudioMuting[] = "enable-tab-audio-muting";
604 // Enables fanciful thumbnail processing. Used with NTP for
605 // instant-extended-api, where thumbnails are generally smaller.
606 const char kEnableThumbnailRetargeting[] = "enable-thumbnail-retargeting";
608 // Enables Translate experimental new UX which replaces the infobar.
609 const char kEnableTranslateNewUX[] = "enable-translate-new-ux";
611 // Enables Alternate-Protocol when the port is user controlled (> 1024).
612 const char kEnableUserAlternateProtocolPorts[] =
613 "enable-user-controlled-alternate-protocol-ports";
615 // Enables a new "web app" style frame for hosted apps (including bookmark
616 // apps).
617 extern const char kEnableWebAppFrame[] = "enable-web-app-frame";
619 // Enables the Website Settings page on the Settings page.
620 const char kEnableWebsiteSettingsManager[] = "enable-website-settings-manager";
622 // Enables synchronizing WiFi credentials across devices, using Chrome Sync.
623 const char kEnableWifiCredentialSync[] = "enable-wifi-credential-sync";
625 // Explicitly allows additional ports using a comma-separated list of port
626 // numbers.
627 const char kExplicitlyAllowedPorts[] = "explicitly-allowed-ports";
629 // Values for the kExtensionContentVerification flag.
630 // See ContentVerifierDelegate::Mode for more explanation.
631 const char kExtensionContentVerificationBootstrap[] = "bootstrap";
632 const char kExtensionContentVerificationEnforceStrict[] = "enforce_strict";
633 const char kExtensionContentVerificationEnforce[] = "enforce";
635 // Name of the command line flag to force content verification to be on in one
636 // of various modes.
637 const char kExtensionContentVerification[] = "extension-content-verification";
639 // Turns on extension install verification if it would not otherwise have been
640 // turned on.
641 const char kExtensionsInstallVerification[] = "extensions-install-verification";
643 // Specifies a comma-separated list of extension ids that should be forced to
644 // be treated as not from the webstore when doing install verification.
645 const char kExtensionsNotWebstore[] = "extensions-not-webstore";
647 // Frequency in seconds for Extensions auto-update.
648 const char kExtensionsUpdateFrequency[] = "extensions-update-frequency";
650 // Fakes the channel of the browser for purposes of Variations filtering. This
651 // is to be used for testing only. Possible values are "stable", "beta", "dev"
652 // and "canary". Note that this only applies if the browser's reported channel
653 // is UNKNOWN.
654 const char kFakeVariationsChannel[] = "fake-variations-channel";
656 // If this flag is present then this command line is being delegated to an
657 // already running chrome process via the fast path, ie: before chrome.dll is
658 // loaded. It is useful to tell the difference for tracking purposes.
659 const char kFastStart[] = "fast-start";
661 // These two flags are added around the switches about:flags adds to the
662 // command line. This is useful to see which switches were added by about:flags
663 // on about:version. They don't have any effect.
664 const char kFlagSwitchesBegin[] = "flag-switches-begin";
665 const char kFlagSwitchesEnd[] = "flag-switches-end";
667 // Forces application mode. This hides certain system UI elements and forces
668 // the app to be installed if it hasn't been already.
669 const char kForceAppMode[] = "force-app-mode";
671 // Displays the First Run experience when the browser is started, regardless of
672 // whether or not it's actually the First Run (this overrides kNoFirstRun).
673 const char kForceFirstRun[] = "force-first-run";
675 // Forces additional Chrome Variation Ids that will be sent in X-Client-Data
676 // header, specified as a 64-bit encoded list of numeric experiment ids. Ids
677 // prefixed with the character "t" will be treated as Trigger Variation Ids.
678 const char kForceVariationIds[] = "force-variation-ids";
680 // These flags show the man page on Linux. They are equivalent to each
681 // other.
682 const char kHelp[] = "help";
683 const char kHelpShort[] = "h";
685 // Makes Windows happy by allowing it to show "Enable access to this program"
686 // checkbox in Add/Remove Programs->Set Program Access and Defaults. This only
687 // shows an error box because the only way to hide Chrome is by uninstalling
688 // it.
689 const char kHideIcons[] = "hide-icons";
691 // Enables grouping websites by domain and filtering them by period.
692 const char kHistoryEnableGroupByDomain[] = "enable-grouped-history";
694 // Specifies which page will be displayed in newly-opened tabs. We need this
695 // for testing purposes so that the UI tests don't depend on what comes up for
696 // http://google.com.
697 const char kHomePage[] = "homepage";
699 // Comma-separated list of rules that control how hostnames are mapped.
701 // For example:
702 // "MAP * 127.0.0.1" --> Forces all hostnames to be mapped to 127.0.0.1
703 // "MAP *.google.com proxy" --> Forces all google.com subdomains to be
704 // resolved to "proxy".
705 // "MAP test.com [::1]:77 --> Forces "test.com" to resolve to IPv6 loopback.
706 // Will also force the port of the resulting
707 // socket address to be 77.
708 // "MAP * baz, EXCLUDE www.google.com" --> Remaps everything to "baz",
709 // except for "www.google.com".
711 // These mappings apply to the endpoint host in a net::URLRequest (the TCP
712 // connect and host resolver in a direct connection, and the CONNECT in an http
713 // proxy connection, and the endpoint host in a SOCKS proxy connection).
714 const char kHostRules[] = "host-rules";
716 // The maximum number of retry attempts to resolve the host. Set this to zero
717 // to disable host resolver retry attempts.
718 const char kHostResolverRetryAttempts[] = "host-resolver-retry-attempts";
720 // Causes net::URLFetchers to ignore requests for SSL client certificates,
721 // causing them to attempt an unauthenticated SSL/TLS session. This is intended
722 // for use when testing various service URLs (eg: kPromoServerURL, kSbURLPrefix,
723 // kSyncServiceURL, etc)
724 const char kIgnoreUrlFetcherCertRequests[] =
725 "ignore-urlfetcher-cert-requests";
727 // Causes the browser to launch directly in incognito mode.
728 const char kIncognito[] = "incognito";
730 // Causes Chrome to initiate an installation flow for the given app.
731 const char kInstallChromeApp[] = "install-chrome-app";
733 // Causes Chrome to attempt to get metadata from the webstore for the
734 // app/extension ID given, and then prompt the user to download and install it.
735 // This is allowed *only* for ephemeral apps. All other ids will be ignored.
736 const char kInstallEphemeralAppFromWebstore[] =
737 "install-ephemeral-app-from-webstore";
739 // A list of whitelists to install for a supervised user, for testing.
740 // The list is of the following form: <id>[:<name>],[<id>[:<name>],...]
741 const char kInstallSupervisedUserWhitelists[] =
742 "install-supervised-user-whitelists";
744 // Marks a renderer as an Instant process.
745 const char kInstantProcess[] = "instant-process";
747 // Invalidation service should use GCM network channel even if experiment is not
748 // enabled.
749 const char kInvalidationUseGCMChannel[] = "invalidation-use-gcm-channel";
751 // Disable latest shipping ECMAScript 6 features.
752 const char kDisableJavaScriptHarmonyShipping[] =
753 "disable-javascript-harmony-shipping";
755 // Enables experimental Harmony (ECMAScript 6) features.
756 const char kJavaScriptHarmony[] = "javascript-harmony";
758 // Dumps IPC messages sent from renderer processes to the browser process to
759 // the given directory. Used primarily to gather samples for IPC fuzzing.
760 const char kIpcDumpDirectory[] = "ipc-dump-directory";
762 // Specifies the testcase used by the IPC fuzzer.
763 const char kIpcFuzzerTestcase[] = "ipc-fuzzer-testcase";
765 // Used for testing - keeps browser alive after last browser window closes.
766 const char kKeepAliveForTest[] = "keep-alive-for-test";
768 // Enable Kiosk mode.
769 const char kKioskMode[] = "kiosk";
771 // Print automatically in kiosk mode. |kKioskMode| must be set as well.
772 // See http://crbug.com/31395.
773 const char kKioskModePrinting[] = "kiosk-printing";
775 // Comma-separated list of directories with component extensions to load.
776 const char kLoadComponentExtension[] = "load-component-extension";
778 // Loads an extension from the specified directory.
779 const char kLoadExtension[] = "load-extension";
781 // Makes Chrome default browser
782 const char kMakeDefaultBrowser[] = "make-default-browser";
784 // Use to opt-in to marking HTTP as non-secure.
785 const char kMarkNonSecureAs[] = "mark-non-secure-as";
786 const char kMarkNonSecureAsNeutral[] = "neutral";
787 const char kMarkNonSecureAsDubious[] = "dubious";
788 const char kMarkNonSecureAsNonSecure[] = "non-secure";
790 // Forces the maximum disk space to be used by the media cache, in bytes.
791 const char kMediaCacheSize[] = "media-cache-size";
793 // Enables histograming of tasks served by MessageLoop. See
794 // about:histograms/Loop for results, which show frequency of messages on each
795 // thread, including APC count, object signalling count, etc.
796 const char kMessageLoopHistogrammer[] = "message-loop-histogrammer";
798 // Enables the recording of metrics reports but disables reporting. In contrast
799 // to kDisableMetrics, this executes all the code that a normal client would
800 // use for reporting, except the report is dropped rather than sent to the
801 // server. This is useful for finding issues in the metrics code during UI and
802 // performance tests.
803 const char kMetricsRecordingOnly[] = "metrics-recording-only";
805 // Allows setting a different destination ID for connection-monitoring GCM
806 // messages. Useful when running against a non-prod management server.
807 const char kMonitoringDestinationID[] = "monitoring-destination-id";
809 // Sets the base logging level for the net log. Log 0 logs the most data.
810 // Intended primarily for use with --log-net-log.
811 const char kNetLogLevel[] = "net-log-level";
813 // Disables the default browser check. Useful for UI/browser tests where we
814 // want to avoid having the default browser info-bar displayed.
815 const char kNoDefaultBrowserCheck[] = "no-default-browser-check";
817 // By default, an https page can load images, fonts or frames from an http
818 // page. This switch overrides this to block this lesser mixed-content problem.
819 const char kNoDisplayingInsecureContent[] = "no-displaying-insecure-content";
821 // Don't record/playback events when using record & playback.
822 const char kNoEvents[] = "no-events";
824 // Disables all experiments set on about:flags. Does not disable about:flags
825 // itself. Useful if an experiment makes chrome crash at startup: One can start
826 // chrome with --no-experiments, disable the problematic lab at about:flags and
827 // then restart chrome without this switch again.
828 const char kNoExperiments[] = "no-experiments";
830 // Skip First Run tasks, whether or not it's actually the First Run. Overridden
831 // by kForceFirstRun. This does not drop the First Run sentinel and thus doesn't
832 // prevent first run from occuring the next time chrome is launched without this
833 // flag.
834 const char kNoFirstRun[] = "no-first-run";
836 // Whether or not the browser should warn if the profile is on a network share.
837 // This flag is only relevant for Windows currently.
838 const char kNoNetworkProfileWarning[] = "no-network-profile-warning";
840 // Don't send hyperlink auditing pings
841 const char kNoPings[] = "no-pings";
843 // Don't use a proxy server, always make direct connections. Overrides any
844 // other proxy server flags that are passed.
845 const char kNoProxyServer[] = "no-proxy-server";
847 // Disables the service process from adding itself as an autorun process. This
848 // does not delete existing autorun registrations, it just prevents the service
849 // from registering a new one.
850 const char kNoServiceAutorun[] = "no-service-autorun";
852 // Does not automatically open a browser window on startup (used when
853 // launching Chrome for the purpose of hosting background apps).
854 const char kNoStartupWindow[] = "no-startup-window";
856 // Disables checking whether we received an acknowledgment when registering
857 // a supervised user. Also disables the timeout during registration that waits
858 // for the ack. Useful when debugging against a server that does not
859 // support notifications.
860 const char kNoSupervisedUserAcknowledgmentCheck[] =
861 "no-managed-user-acknowledgment-check";
863 // Specifies the maximum number of threads to use for running the Proxy
864 // Autoconfig (PAC) script.
865 const char kNumPacThreads[] = "num-pac-threads";
867 // Launches URL in new browser window.
868 const char kOpenInNewWindow[] = "new-window";
870 // Force use of QUIC for requests to the specified origin.
871 const char kOriginToForceQuicOn[] = "origin-to-force-quic-on";
873 // The time that a new chrome process which is delegating to an already running
874 // chrome process started. (See ProcessSingleton for more details.)
875 const char kOriginalProcessStartTime[] = "original-process-start-time";
877 // Packages an extension to a .crx installable file from a given directory.
878 const char kPackExtension[] = "pack-extension";
880 // Optional PEM private key to use in signing packaged .crx.
881 const char kPackExtensionKey[] = "pack-extension-key";
883 // Specifies the path to the user data folder for the parent profile.
884 const char kParentProfile[] = "parent-profile";
886 // Development flag for permission request API. This flag is needed until
887 // the API is finalized.
888 // TODO(bauerb): Remove when this flag is not needed anymore.
889 const char kPermissionRequestApiScope[] = "permission-request-api-scope";
891 // Development flag for permission request API. This flag is needed until
892 // the API is finalized.
893 // TODO(bauerb): Remove when this flag is not needed anymore.
894 const char kPermissionRequestApiUrl[] = "permission-request-api-url";
896 // Use the PPAPI (Pepper) Flash found at the given path.
897 const char kPpapiFlashPath[] = "ppapi-flash-path";
899 // Report the given version for the PPAPI (Pepper) Flash. The version should be
900 // numbers separated by '.'s (e.g., "12.3.456.78"). If not specified, it
901 // defaults to "10.2.999.999".
902 const char kPpapiFlashVersion[] = "ppapi-flash-version";
904 // Triggers prerendering of search base page to prefetch results for the typed
905 // omnibox query. Only has an effect when prerender is enabled.
906 const char kPrefetchSearchResults[] = "prefetch-search-results";
908 // Triggers prerendering of pages from suggestions in the omnibox. Only has an
909 // effect when Instant is either disabled or restricted to search, and when
910 // prerender is enabled.
911 const char kPrerenderFromOmnibox[] = "prerender-from-omnibox";
912 // These are the values the kPrerenderFromOmnibox switch may have, as in
913 // "--prerender-from-omnibox=auto". auto: Allow field trial selection.
914 const char kPrerenderFromOmniboxSwitchValueAuto[] = "auto";
915 // disabled: No prerendering.
916 const char kPrerenderFromOmniboxSwitchValueDisabled[] = "disabled";
917 // enabled: Guaranteed prerendering.
918 const char kPrerenderFromOmniboxSwitchValueEnabled[] = "enabled";
919 // Controls speculative prerendering of pages, and content prefetching. Both
920 // are dispatched from <link rel=prefetch href=...> elements.
921 const char kPrerenderMode[] = "prerender";
922 // These are the values the kPrerenderMode switch may have, as in
923 // "--prerender=auto".
924 // auto: Allow field trial selection for prerender.
925 const char kPrerenderModeSwitchValueAuto[] = "auto";
926 // disabled: No prerendering.
927 const char kPrerenderModeSwitchValueDisabled[] = "disabled";
928 // enabled: Prerendering.
929 const char kPrerenderModeSwitchValueEnabled[] = "enabled";
931 // Use IPv6 only for privet HTTP.
932 const char kPrivetIPv6Only[] = "privet-ipv6-only";
934 // Outputs the product version information and quit. Used as an internal api to
935 // detect the installed version of Chrome on Linux.
936 const char kProductVersion[] = "product-version";
938 // Selects directory of profile to associate with the first browser launched.
939 const char kProfileDirectory[] = "profile-directory";
941 // Starts the sampling based profiler for the browser process at startup. This
942 // will only work if chrome has been built with the gyp variable profiling=1.
943 // The output will go to the value of kProfilingFile.
944 const char kProfilingAtStart[] = "profiling-at-start";
946 // Specifies a location for profiling output. This will only work if chrome has
947 // been built with the gyp variable profiling=1.
949 // {pid} if present will be replaced by the pid of the process.
950 // {count} if present will be incremented each time a profile is generated
951 // for this process.
952 // The default is chrome-profile-{pid}.
953 const char kProfilingFile[] = "profiling-file";
955 // Controls whether profile data is periodically flushed to a file. Normally
956 // the data gets written on exit but cases exist where chrome doesn't exit
957 // cleanly (especially when using single-process). A time in seconds can be
958 // specified.
959 const char kProfilingFlush[] = "profiling-flush";
961 // Forces proxy auto-detection.
962 const char kProxyAutoDetect[] = "proxy-auto-detect";
964 // Specifies a list of hosts for whom we bypass proxy settings and use direct
965 // connections. Ignored if --proxy-auto-detect or --no-proxy-server are also
966 // specified. This is a comma-separated list of bypass rules. See:
967 // "net/proxy/proxy_bypass_rules.h" for the format of these rules.
968 const char kProxyBypassList[] = "proxy-bypass-list";
970 // Uses the pac script at the given URL
971 const char kProxyPacUrl[] = "proxy-pac-url";
973 // Uses a specified proxy server, overrides system settings. This switch only
974 // affects HTTP and HTTPS requests.
975 const char kProxyServer[] = "proxy-server";
977 // Specifies a comma separated list of QUIC connection options to send to
978 // the server.
979 const char kQuicConnectionOptions[] = "quic-connection-options";
981 // Specifies the maximum length for a QUIC packet.
982 const char kQuicMaxPacketLength[] = "quic-max-packet-length";
984 // Specifies the version of QUIC to use.
985 const char kQuicVersion[] = "quic-version";
987 // Remember user proceeds through SSL interstitials for a specified amount of
988 // time. In particular, remember these decisions through session restart. The
989 // time delta to remember certificates should be specified in seconds.
990 const char kRememberCertErrorDecisions[] = "remember-cert-error-decisions";
992 // If set, the app list will forget it has been installed on startup. Note this
993 // doesn't prevent the app list from running, it just makes Chrome think the app
994 // list hasn't been enabled (as in kEnableAppList) yet.
995 const char kResetAppListInstallState[] = "reset-app-list-install-state";
997 // Indicates the last session should be restored on startup. This overrides the
998 // preferences value and is primarily intended for testing. The value of this
999 // switch is the number of tabs to wait until loaded before 'load completed' is
1000 // sent to the ui_test.
1001 const char kRestoreLastSession[] = "restore-last-session";
1003 // Disable saving pages as HTML-only, disable saving pages as HTML Complete
1004 // (with a directory of sub-resources). Enable only saving pages as MHTML.
1005 // See http://crbug.com/120416 for how to remove this switch.
1006 const char kSavePageAsMHTML[] = "save-page-as-mhtml";
1008 // If present, safebrowsing only performs update when
1009 // SafeBrowsingProtocolManager::ForceScheduleNextUpdate() is explicitly called.
1010 // This is used for testing only.
1011 const char kSbDisableAutoUpdate[] = "safebrowsing-disable-auto-update";
1013 // TODO(lzheng): Remove this flag once the feature works fine
1014 // (http://crbug.com/74848).
1016 // Disables safebrowsing feature that checks download url and downloads
1017 // content's hash to make sure the content are not malicious.
1018 const char kSbDisableDownloadProtection[] =
1019 "safebrowsing-disable-download-protection";
1021 // Disables safebrowsing feature that checks for blacklisted extensions.
1022 const char kSbDisableExtensionBlacklist[] =
1023 "safebrowsing-disable-extension-blacklist";
1025 // Disables safebrowsing feature that provides a side-effect free whitelist.
1026 const char kSbDisableSideEffectFreeWhitelist[] =
1027 "safebrowsing-disable-side-effect-free-whitelist";
1029 // Causes the process to run as a service process.
1030 const char kServiceProcess[] = "service";
1032 // Sets a token in the token service, for testing.
1033 const char kSetToken[] = "set-token";
1035 // If true the app list will be shown.
1036 const char kShowAppList[] = "show-app-list";
1038 // See kHideIcons.
1039 const char kShowIcons[] = "show-icons";
1041 // Command line flag offering a "Show saved copy" option to the user if offline.
1042 // The various modes are disabled, primary, or secondary. Primary/secondary
1043 // refers to button placement (for experiment).
1044 const char kShowSavedCopy[] = "show-saved-copy";
1046 // Values for the kShowSavedCopy flag.
1047 const char kEnableShowSavedCopyPrimary[] = "primary";
1048 const char kEnableShowSavedCopySecondary[] = "secondary";
1049 const char kDisableShowSavedCopy[] = "disable";
1051 // Does not show an infobar when an extension attaches to a page using
1052 // chrome.debugger page. Required to attach to extension background pages.
1053 const char kSilentDebuggerExtensionAPI[] = "silent-debugger-extension-api";
1055 // Causes Chrome to launch without opening any windows by default. Useful if
1056 // one wishes to use Chrome as an ash server.
1057 const char kSilentLaunch[] = "silent-launch";
1059 // Simulates that elevation is needed to recover upgrade channel.
1060 const char kSimulateElevatedRecovery[] = "simulate-elevated-recovery";
1062 // Simulates a critical update being available.
1063 const char kSimulateCriticalUpdate[] = "simulate-critical-update";
1065 // Simulates that current version is outdated.
1066 const char kSimulateOutdated[] = "simulate-outdated";
1068 // Simulates that current version is outdated and auto-update is off.
1069 const char kSimulateOutdatedNoAU[] = "simulate-outdated-no-au";
1071 // Simulates an update being available.
1072 const char kSimulateUpgrade[] = "simulate-upgrade";
1074 // Speculative resource prefetching.
1075 const char kSpeculativeResourcePrefetching[] =
1076 "speculative-resource-prefetching";
1078 // Speculative resource prefetching is disabled.
1079 const char kSpeculativeResourcePrefetchingDisabled[] = "disabled";
1081 // Speculative resource prefetching will only learn about resources that need to
1082 // be prefetched but will not prefetch them.
1083 const char kSpeculativeResourcePrefetchingLearning[] = "learning";
1085 // Speculative resource prefetching is enabled.
1086 const char kSpeculativeResourcePrefetchingEnabled[] = "enabled";
1088 #if defined(ENABLE_SPELLCHECK)
1089 // Enables auto correction for misspelled words.
1090 const char kEnableSpellingAutoCorrect[] = "enable-spelling-auto-correct";
1092 // Enables participation in the field trial for user feedback to spelling
1093 // service.
1094 const char kEnableSpellingFeedbackFieldTrial[] =
1095 "enable-spelling-feedback-field-trial";
1097 // Specifies the URL where spelling service feedback data will be sent instead
1098 // of the default URL. This switch is for temporary testing only.
1099 // TODO(rouslan): Remove this flag when feedback testing is complete. Revisit by
1100 // August 2013.
1101 const char kSpellingServiceFeedbackUrl[] = "spelling-service-feedback-url";
1103 // Specifies the number of seconds between sending batches of feedback to
1104 // spelling service. The default is 30 minutes. The minimum is 5 seconds. This
1105 // switch is for temporary testing only.
1106 // TODO(rouslan): Remove this flag when feedback testing is complete. Revisit by
1107 // August 2013.
1108 const char kSpellingServiceFeedbackIntervalSeconds[] =
1109 "spelling-service-feedback-interval-seconds";
1110 #endif
1112 // Specifies the maximum SSL/TLS version ("ssl3", "tls1", "tls1.1", or
1113 // "tls1.2").
1114 const char kSSLVersionMax[] = "ssl-version-max";
1116 // Specifies the minimum SSL/TLS version ("ssl3", "tls1", "tls1.1", or
1117 // "tls1.2").
1118 const char kSSLVersionMin[] = "ssl-version-min";
1120 // Specifies the minimum SSL/TLS version ("ssl3", "tls1", "tls1.1", or
1121 // "tls1.2") that TLS fallback will accept.
1122 const char kSSLVersionFallbackMin[] = "ssl-version-fallback-min";
1124 // These values aren't switches, but rather the values that kSSLVersionMax,
1125 // kSSLVersionMin and kSSLVersionFallbackMin can have.
1126 const char kSSLVersionSSLv3[] = "ssl3";
1127 const char kSSLVersionTLSv1[] = "tls1";
1128 const char kSSLVersionTLSv11[] = "tls1.1";
1129 const char kSSLVersionTLSv12[] = "tls1.2";
1131 // Starts the browser maximized, regardless of any previous settings.
1132 const char kStartMaximized[] = "start-maximized";
1134 // Sets the supervised user ID for any loaded or newly created profile to the
1135 // given value. Pass an empty string to mark the profile as non-supervised.
1136 // Used for testing.
1137 const char kSupervisedUserId[] = "managed-user-id";
1139 // Used to authenticate requests to the Sync service for supervised users.
1140 // Setting this switch also causes Sync to be set up for a supervised user.
1141 const char kSupervisedUserSyncToken[] = "managed-user-sync-token";
1143 // This flag causes sync to retry very quickly (see polling_constants.h) the
1144 // when it encounters an error, as the first step towards exponential backoff.
1145 const char kSyncShortInitialRetryOverride[] =
1146 "sync-short-initial-retry-override";
1148 // Overrides the default server used for profile sync.
1149 const char kSyncServiceURL[] = "sync-url";
1151 // Enables deferring sync backend initialization until user initiated changes
1152 // occur.
1153 const char kSyncDisableDeferredStartup[] = "sync-disable-deferred-startup";
1155 // Allows overriding the deferred init fallback timeout.
1156 const char kSyncDeferredStartupTimeoutSeconds[] =
1157 "sync-deferred-startup-timeout-seconds";
1159 // Enables feature to avoid unnecessary GetUpdate requests.
1160 const char kSyncEnableGetUpdateAvoidance[] =
1161 "sync-enable-get-update-avoidance";
1163 // Disable data backup when user's not signed in.
1164 const char kSyncDisableBackup[] = "disable-sync-backup";
1166 // Disable sync rollback.
1167 const char kSyncDisableRollback[] = "disable-sync-rollback";
1169 // Passes the name of the current running automated test to Chrome.
1170 const char kTestName[] = "test-name";
1172 // Disables same-origin check on HTTP resources pushed via a SPDY proxy.
1173 // The value is the host:port of the trusted proxy.
1174 const char kTrustedSpdyProxy[] = "trusted-spdy-proxy";
1176 // Experimental. Shows a dialog asking the user to try chrome. This flag is to
1177 // be used only by the upgrade process.
1178 const char kTryChromeAgain[] = "try-chrome-again";
1180 // Runs un-installation steps that were done by chrome first-run.
1181 const char kUninstall[] = "uninstall";
1183 // Overrides per-origin quota settings to unlimited storage for any
1184 // apps/origins. This should be used only for testing purpose.
1185 const char kUnlimitedStorage[] = "unlimited-storage";
1187 // Uses Spdy for the transport protocol instead of HTTP. This is a temporary
1188 // testing flag.
1189 const char kUseSpdy[] = "use-spdy";
1191 // A string used to override the default user agent with a custom one.
1192 const char kUserAgent[] = "user-agent";
1194 // Specifies the user data directory, which is where the browser will look for
1195 // all of its state.
1196 const char kUserDataDir[] = "user-data-dir";
1198 // Examines a .crx for validity and prints the result.
1199 const char kValidateCrx[] = "validate-crx";
1201 // Uses experimental simple cache backend if possible.
1202 const char kUseSimpleCacheBackend[] = "use-simple-cache-backend";
1204 // Enables using an in-process Mojo service for the v8 proxy resolver.
1205 const char kV8PacMojoInProcess[] = "v8-pac-mojo-in-process";
1207 // Enables using an out-of-process Mojo service for the v8 proxy resolver.
1208 const char kV8PacMojoOutOfProcess[] = "v8-pac-mojo-out-of-process";
1210 // Specifies a custom URL for the server which reports variation data to the
1211 // client. Specifying this switch enables the Variations service on
1212 // unofficial builds. See variations_service.cc.
1213 const char kVariationsServerURL[] = "variations-server-url";
1215 // Prints version information and quits.
1216 const char kVersion[] = "version";
1218 // Specify the initial window position: --window-position=x,y
1219 const char kWindowPosition[] = "window-position";
1221 // Specify the initial window size: --window-size=w,h
1222 const char kWindowSize[] = "window-size";
1224 // Uses WinHTTP to fetch and evaluate PAC scripts. Otherwise the default is to
1225 // use Chromium's network stack to fetch, and V8 to evaluate.
1226 const char kWinHttpProxyResolver[] = "winhttp-proxy-resolver";
1228 // Specifies which category option was clicked in the Windows Jumplist that
1229 // resulted in a browser startup.
1230 const char kWinJumplistAction[] = "win-jumplist-action";
1232 #if defined(OS_ANDROID)
1233 // Disables support for playing videos on Chromecast devices.
1234 const char kDisableCast[] = "disable-cast";
1236 // Disables Contextual Search.
1237 const char kDisableContextualSearch[] = "disable-contextual-search";
1239 // Disables zero suggest experiment on Dev channel.
1240 const char kDisableZeroSuggest[] = "disable-zero-suggest";
1242 // Enable the accessibility tab switcher.
1243 const char kEnableAccessibilityTabSwitcher[] =
1244 "enable-accessibility-tab-switcher";
1246 // Enables app install alerts.
1247 const char kEnableAppInstallAlerts[] = "enable-app-install-alerts";
1249 // Enables Contextual Search.
1250 const char kEnableContextualSearch[] = "enable-contextual-search";
1252 // Enables zero suggest functionality on Dev channel, showing most visited
1253 // sites as default suggestions.
1254 const char kEnableZeroSuggestMostVisited[] =
1255 "enable-zero-suggest-most-visited";
1257 // Enable zero suggest functionality on Dev channel, showing most visited
1258 // sites on non-search-result pages as default suggestions.
1259 const char kEnableZeroSuggestMostVisitedWithoutSerp[] =
1260 "enable-zero-suggest-most-visited-without-serp";
1262 // Enables instant search clicks feature.
1263 const char kEnableInstantSearchClicks[] = "enable-instant-search-clicks";
1265 #endif
1267 #if defined(USE_ASH)
1268 const char kOpenAsh[] = "open-ash";
1269 #endif
1271 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_CHROMEOS)
1272 // Specifies which password store to use (detect, default, gnome, kwallet).
1273 const char kPasswordStore[] = "password-store";
1274 #endif
1276 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
1277 // Triggers migration of user data directory to another directory
1278 // specified as a parameter. The migration is done under singleton lock,
1279 // and sanity checks are made to avoid corrupting the profile.
1280 // The browser exits after migration is complete.
1281 const char kMigrateDataDirForSxS[] = "migrate-data-dir-for-sxs";
1282 #endif // defined(OS_LINUX) && !defined(OS_CHROMEOS)
1284 #if defined(OS_MACOSX)
1285 // Prevents Chrome from quitting when Chrome Apps are open.
1286 const char kAppsKeepChromeAliveInTests[] = "apps-keep-chrome-alive-in-tests";
1288 // Shows a notification when quitting Chrome with hosted apps running. Default
1289 // behavior is to also quit all hosted apps.
1290 const char kHostedAppQuitNotification[] = "enable-hosted-app-quit-notification";
1292 // Disables app shim creation for hosted apps on Mac.
1293 const char kDisableHostedAppShimCreation[] = "disable-hosted-app-shim-creation";
1295 // Forcibly disables Lion-style on newer OSes, to allow developers to test the
1296 // older, SnowLeopard-style fullscreen.
1297 const char kDisableSystemFullscreenForTesting[] =
1298 "disable-system-fullscreen-for-testing";
1300 // A process type (switches::kProcessType) that relaunches the browser. See
1301 // chrome/browser/mac/relauncher.h.
1302 const char kRelauncherProcess[] = "relauncher";
1304 // This is how the metrics client ID is passed from the browser process to its
1305 // children. With Crashpad, the metrics client ID is distinct from the crash
1306 // client ID.
1307 const char kMetricsClientID[] = "metrics-client-id";
1309 #endif
1311 // Use bubbles for content permissions requests instead of infobars.
1312 const char kEnablePermissionsBubbles[] = "enable-permissions-bubbles";
1314 #if defined(OS_WIN)
1315 // Fallback to XPS. By default connector uses CDD.
1316 const char kEnableCloudPrintXps[] = "enable-cloud-print-xps";
1318 // Force-enables the profile shortcut manager. This is needed for tests since
1319 // they use a custom-user-data-dir which disables this.
1320 const char kEnableProfileShortcutManager[] = "enable-profile-shortcut-manager";
1322 // For the DelegateExecute verb handler to launch Chrome in metro mode on
1323 // Windows 8 and higher. Used when relaunching metro Chrome.
1324 const char kForceImmersive[] = "force-immersive";
1326 // For the DelegateExecute verb handler to launch Chrome in desktop mode on
1327 // Windows 8 and higher. Used when relaunching metro Chrome.
1328 const char kForceDesktop[] = "force-desktop";
1330 // Relaunches metro Chrome on Windows 8 and higher using a given shortcut.
1331 const char kRelaunchShortcut[] = "relaunch-shortcut";
1333 // Requests that Chrome launch the Metro viewer process via the given appid
1334 // (which is assumed to be registered as default browser) and synchronously
1335 // connect to it.
1336 const char kViewerLaunchViaAppId[] = "viewer-launch-via-appid";
1338 // Waits for the given handle to be signaled before relaunching metro Chrome on
1339 // Windows 8 and higher.
1340 const char kWaitForMutex[] = "wait-for-mutex";
1342 // Indicates that chrome was launched to service a search request in Windows 8.
1343 const char kWindows8Search[] = "windows8-search";
1344 #endif
1346 #if defined(ENABLE_PRINT_PREVIEW) && !defined(OFFICIAL_BUILD)
1347 // Enables support to debug printing subsystem.
1348 const char kDebugPrint[] = "debug-print";
1349 #endif
1351 #ifndef NDEBUG
1352 // Enables overriding the path of file manager extension.
1353 const char kFileManagerExtensionPath[] = "filemgr-ext-path";
1354 #endif
1356 bool AboutInSettingsEnabled() {
1357 return SettingsWindowEnabled() &&
1358 !base::CommandLine::ForCurrentProcess()->HasSwitch(
1359 ::switches::kDisableAboutInSettings);
1362 bool MdSettingsEnabled() {
1363 return base::CommandLine::ForCurrentProcess()->HasSwitch(
1364 ::switches::kEnableMaterialDesignSettings);
1367 bool MediaRouterEnabled() {
1368 return base::CommandLine::ForCurrentProcess()->HasSwitch(
1369 ::switches::kEnableMediaRouter);
1372 // Will return true as a default value if the "disable-new-offline-error-page"
1373 // command-line switch is not available.
1374 bool NewOfflineErrorPageEnabled() {
1375 return !base::CommandLine::ForCurrentProcess()->HasSwitch(
1376 ::switches::kDisableNewOfflineErrorPage);
1379 bool OutOfProcessPdfEnabled() {
1380 if (base::CommandLine::ForCurrentProcess()->HasSwitch(kEnableOutOfProcessPdf))
1381 return true;
1383 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
1384 kDisableOutOfProcessPdf))
1385 return false;
1387 // Default.
1388 return true;
1391 bool PdfMaterialUIEnabled() {
1392 if (base::CommandLine::ForCurrentProcess()->HasSwitch(kEnablePdfMaterialUI))
1393 return true;
1395 if (base::CommandLine::ForCurrentProcess()->HasSwitch(kDisablePdfMaterialUI))
1396 return false;
1398 // Default.
1399 return false;
1402 bool SettingsWindowEnabled() {
1403 #if defined(OS_CHROMEOS)
1404 return !base::CommandLine::ForCurrentProcess()->HasSwitch(
1405 ::switches::kDisableSettingsWindow);
1406 #else
1407 return base::CommandLine::ForCurrentProcess()->HasSwitch(
1408 ::switches::kEnableSettingsWindow);
1409 #endif
1412 #if defined(OS_CHROMEOS)
1413 bool PowerOverlayEnabled() {
1414 return base::CommandLine::ForCurrentProcess()->HasSwitch(
1415 ::switches::kEnablePowerOverlay);
1417 #endif
1419 // -----------------------------------------------------------------------------
1420 // DO NOT ADD YOUR CRAP TO THE BOTTOM OF THIS FILE.
1422 // You were going to just dump your switches here, weren't you? Instead, please
1423 // put them in alphabetical order above, or in order inside the appropriate
1424 // ifdef at the bottom. The order should match the header.
1425 // -----------------------------------------------------------------------------
1427 } // namespace switches