1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/common/chrome_switches.h"
7 #include "base/base_switches.h"
8 #include "base/command_line.h"
12 // -----------------------------------------------------------------------------
13 // Can't find the switch you are looking for? Try looking in:
14 // ash/ash_switches.cc
15 // base/base_switches.cc
16 // chromeos/chromeos_switches.cc
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
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
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";
53 // Disables forcing on the experimental Plugin Power Saver feature.
54 const char kDisablePluginPowerSaver
[] = "disable-plugin-power-saver";
56 // Enables forcing on the experimental Plugin Power Saver feature.
57 const char kEnablePluginPowerSaver
[] = "enable-plugin-power-saver";
60 // Don't block outdated plugins.
61 const char kAllowOutdatedPlugins
[] = "allow-outdated-plugins";
63 // By default, an https page cannot run JavaScript, CSS or plugins from http
64 // URLs. This provides an override to get the old insecure behavior.
65 const char kAllowRunningInsecureContent
[] = "allow-running-insecure-content";
67 // Specifies the probability threshold for alternative services: an advertised
68 // alternative service will only be honored if the advertised probability is
69 // greater than or equal to this threshold.
70 const char kAlternativeServiceProbabilityThreshold
[] =
71 "alternative-service-probability-threshold";
73 // Prevents Chrome from requiring authorization to run certain widely installed
74 // but less commonly used plugins.
75 const char kAlwaysAuthorizePlugins
[] = "always-authorize-plugins";
77 // Specifies that the extension-app with the specified id should be launched
78 // according to its configuration.
79 const char kAppId
[] = "app-id";
81 // Specifies that the associated value should be launched in "application"
83 const char kApp
[] = "app";
85 // Overrides the apps checkout URL, which is used to determine when to expose
87 const char kAppsCheckoutURL
[] = "apps-checkout-url";
89 // The URL that the webstore APIs download extensions from.
90 // Note: the URL must contain one '%s' for the extension ID.
91 const char kAppsGalleryDownloadURL
[] = "apps-gallery-download-url";
93 // The URL to use for the gallery link in the app launcher.
94 const char kAppsGalleryURL
[] = "apps-gallery-url";
96 // The update url used by gallery/webstore extensions.
97 const char kAppsGalleryUpdateURL
[] = "apps-gallery-update-url";
99 // Value of GAIA auth code for --force-app-mode.
100 const char kAppModeAuthCode
[] = "app-mode-auth-code";
102 // Value of OAuth2 refresh token for --force-app-mode.
103 const char kAppModeOAuth2Token
[] = "app-mode-oauth-token";
105 // Enables overriding the path for the default authentication extension.
106 const char kAuthExtensionPath
[] = "auth-ext-path";
108 // Whitelist for Negotiate Auth servers
109 const char kAuthServerWhitelist
[] = "auth-server-whitelist";
111 // A flag that is used to tell Chrome that it was launched automatically at
112 // computer startup and not by some user action.
113 const char kAutoLaunchAtStartup
[] = "auto-launch-at-startup";
115 // This flag makes Chrome auto-select the provided choice when an extension asks
116 // permission to start desktop capture. Should only be used for tests. For
117 // instance, --auto-select-desktop-capture-source="Entire screen" will
118 // automatically select to share the entire screen in English locales.
119 const char kAutoSelectDesktopCaptureSource
[] =
120 "auto-select-desktop-capture-source";
122 // This flag causes the user engagement checks for showing app banners to be
123 // bypassed. It is intended to be used by developers who wish to test that their
124 // sites otherwise meet the criteria needed to show app banners.
125 const char kBypassAppBannerEngagementChecks
[] =
126 "bypass-app-banner-engagement-checks";
128 // Certificate Transparency: Uses the provided log(s) for checking Signed
129 // Certificate Timestamps provided with certificates.
130 // The switch's value is:
131 // log_description:log_key:log_url,log_description:log_key:log_url,...
133 // log_description is a textual description of the log.
134 // log_key is a Base64'd DER-encoded SubjectPublicKeyInfo of the log's
136 // log_url is a URL for the log, excluding the schema (which is always
137 // assumed to be HTTPS as required by RFC6962).
138 // Multiple logs can be specified by repeating description:key pairs,
139 // separated by a comma.
140 const char kCertificateTransparencyLog
[] =
141 "certificate-transparency-log";
143 // How often (in seconds) to check for updates. Should only be used for testing
145 const char kCheckForUpdateIntervalSec
[] = "check-for-update-interval";
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
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
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 list of BrowserThreads that cause browser process to crash
171 // if the given browser thread is not responsive. UI,IO,DB,FILE,CACHE are the
172 // list of BrowserThreads that are supported.
175 // --crash-on-hang-threads=UI:3:18,IO:3:18 --> Crash the browser if UI or IO
176 // is not responsive for 18 seconds and the number of browser threads that
177 // are responding is less than or equal to 3.
178 const char kCrashOnHangThreads
[] = "crash-on-hang-threads";
180 // Some platforms like ChromeOS default to empty desktop.
181 // Browser tests may need to add this switch so that at least one browser
182 // instance is created on startup.
183 // TODO(nkostylev): Investigate if this switch could be removed.
184 // (http://crbug.com/148675)
185 const char kCreateBrowserOnStartupForTests
[] =
186 "create-browser-on-startup-for-tests";
188 // Enables a frame context menu item that toggles the frame in and out of glass
189 // mode (Windows Vista and up only).
190 const char kDebugEnableFrameToggle
[] = "debug-enable-frame-toggle";
192 // Adds debugging entries such as Inspect Element to context menus of packed
194 const char kDebugPackedApps
[] = "debug-packed-apps";
196 // Triggers a plethora of diagnostic modes.
197 const char kDiagnostics
[] = "diagnostics";
199 // Sets the output format for diagnostic modes enabled by diagnostics flag.
200 const char kDiagnosticsFormat
[] = "diagnostics-format";
202 // Tells the diagnostics mode to do the requested recovery step(s).
203 const char kDiagnosticsRecovery
[] = "diagnostics-recovery";
205 // When kEnableSettingsWindow is used, About is shown as an overlay in Settings
206 // instead of as a separate page, unless this flag is specified.
207 const char kDisableAboutInSettings
[] = "disable-about-in-settings";
209 // Disables the display of a banner allowing the user to add a web
210 // app to their shelf (or platform-specific equivalent)
211 const char kDisableAddToShelf
[] = "disable-add-to-shelf";
213 // Disables the experimental asynchronous DNS client.
214 const char kDisableAsyncDns
[] = "disable-async-dns";
216 // Disable several subsystems which run network requests in the background.
217 // This is for use when doing network performance testing to avoid noise in the
219 const char kDisableBackgroundNetworking
[] = "disable-background-networking";
221 // Disables the bundled PPAPI version of Flash.
222 const char kDisableBundledPpapiFlash
[] = "disable-bundled-ppapi-flash";
224 // Disable hardware encoding support for Cast Streaming.
225 const char kDisableCastStreamingHWEncoding
[] =
226 "disable-cast-streaming-hw-encoding";
228 // Disables detection of child accounts.
229 const char kDisableChildAccountDetection
[] =
230 "disable-child-account-detection";
232 // Disables the client-side phishing detection feature. Note that even if
233 // client-side phishing detection is enabled, it will only be active if the
234 // user has opted in to UMA stats and SafeBrowsing is enabled in the
236 const char kDisableClientSidePhishingDetection
[] =
237 "disable-client-side-phishing-detection";
239 // Disable default component extensions with background pages - useful for
240 // performance tests where these pages may interfere with perf results.
241 const char kDisableComponentExtensionsWithBackgroundPages
[] =
242 "disable-component-extensions-with-background-pages";
244 const char kDisableComponentUpdate
[] = "disable-component-update";
246 // Disables installation of default apps on first run. This is used during
247 // automated testing.
248 const char kDisableDefaultApps
[] = "disable-default-apps";
250 // Disables device discovery notifications.
251 const char kDisableDeviceDiscoveryNotifications
[] =
252 "disable-device-discovery-notifications";
254 // Disables the dinosaur easter egg on the offline interstitial.
255 const char kDisableDinosaurEasterEgg
[] = "disable-dinosaur-easter-egg";
257 // Disables Domain Reliability Monitoring.
258 const char kDisableDomainReliability
[] = "disable-domain-reliability";
260 // Disable extensions.
261 const char kDisableExtensions
[] = "disable-extensions";
263 // Disable checking for user opt-in for extensions that want to inject script
264 // into file URLs (ie, always allow it). This is used during automated testing.
265 const char kDisableExtensionsFileAccessCheck
[] =
266 "disable-extensions-file-access-check";
268 // Disable the net::URLRequestThrottlerManager functionality for
269 // requests originating from extensions.
270 const char kDisableExtensionsHttpThrottling
[] =
271 "disable-extensions-http-throttling";
273 // Disable field trial tests configured in fieldtrial_testing_config.json.
274 const char kDisableFieldTrialTestingConfig
[] = "disable-field-trial-config";
276 // Disable the behavior that the second click on a launcher item (the click when
277 // the item is already active) minimizes the item.
278 const char kDisableMinimizeOnSecondLauncherItemClick
[] =
279 "disable-minimize-on-second-launcher-item-click";
281 // Disables the new bookmark app system.
282 const char kDisableNewBookmarkApps
[] = "disable-new-bookmark-apps";
284 // Disables showing popular sites on the NTP.
285 const char kDisableNTPPopularSites
[] = "disable-ntp-popular-sites";
287 // Disable auto-reload of error pages if offline.
288 const char kDisableOfflineAutoReload
[] = "disable-offline-auto-reload";
290 // Disable only auto-reloading error pages when the tab is visible.
291 const char kDisableOfflineAutoReloadVisibleOnly
[] =
292 "disable-offline-auto-reload-visible-only";
294 // Disable out-of-process V8 proxy resolver.
295 const char kDisableOutOfProcessPac
[] = "disable-out-of-process-pac";
297 // Disable the setting to prompt the user for their OS account password before
298 // revealing plaintext passwords in the password manager.
299 const char kDisablePasswordManagerReauthentication
[] =
300 "disable-password-manager-reauthentication";
302 // Disable the new material UI - requires out of process PDF plugin.
303 const char kDisablePdfMaterialUI
[] = "disable-pdf-material-ui";
305 // Don't use bubbles for content permissions requests instead of infobars.
306 const char kDisablePermissionsBubbles
[] = "disable-permissions-bubbles";
308 // Disable pop-up blocking.
309 const char kDisablePopupBlocking
[] = "disable-popup-blocking";
311 // Disable speculative TCP/IP preconnection.
312 const char kDisablePreconnect
[] = "disable-preconnect";
314 // Disables print preview (For testing, and for users who don't like us. :[ )
315 const char kDisablePrintPreview
[] = "disable-print-preview";
317 // Normally when the user attempts to navigate to a page that was the result of
318 // a post we prompt to make sure they want to. This switch may be used to
319 // disable that check. This switch is used during automated testing.
320 const char kDisablePromptOnRepost
[] = "disable-prompt-on-repost";
322 // Disables support for the QUIC protocol.
323 const char kDisableQuic
[] = "disable-quic";
325 // Disable use of Chromium's port selection for the ephemeral port via bind().
326 // This only has an effect if QUIC protocol is enabled.
327 const char kDisableQuicPortSelection
[] = "disable-quic-port-selection";
329 // Prevents the save password bubble from being enabled.
330 const char kDisableSavePasswordBubble
[] = "disable-save-password-bubble";
332 // Prevents SDCH persistence from being used.
333 const char kDisableSdchPersistence
[] = "disable-sdch-persistence";
335 // Disables using bubbles for session restore request.
336 const char kDisableSessionCrashedBubble
[] = "disable-session-crashed-bubble";
338 // Disables the Site Engagement service, which records interaction with sites
339 // and allocates certain resources accordingly.
340 const char kDisableSiteEngagementService
[] = "disable-site-engagement-service";
342 // Disables the suggestions service.
343 const char kDisableSuggestionsService
[] = "disable-suggestions-service";
345 // Disables syncing browser data to a Google Account.
346 const char kDisableSync
[] = "disable-sync";
348 // Disables syncing one or more sync data types that are on by default.
349 // See sync/internal_api/public/base/model_type.h for possible types. Types
350 // should be comma separated, and follow the naming convention for string
351 // representation of model types, e.g.:
352 // --disable-synctypes='Typed URLs, Bookmarks, Autofill Profiles'
353 const char kDisableSyncTypes
[] = "disable-sync-types";
355 // Disables the backend service for web resources.
356 const char kDisableWebResources
[] = "disable-web-resources";
358 // Some tests seem to require the application to close when the last
359 // browser window is closed. Thus, we need a switch to force this behavior
360 // for ChromeOS Aura, disable "zero window mode".
361 // TODO(pkotwicz): Investigate if this bug can be removed.
362 // (http://crbug.com/119175)
363 const char kDisableZeroBrowsersOpenForTests
[] =
364 "disable-zero-browsers-open-for-tests";
366 // Use a specific disk cache location, rather than one derived from the
368 const char kDiskCacheDir
[] = "disk-cache-dir";
370 // Forces the maximum disk space to be used by the disk cache, in bytes.
371 const char kDiskCacheSize
[] = "disk-cache-size";
373 const char kDnsLogDetails
[] = "dns-log-details";
375 // Disables prefetching of DNS information.
376 const char kDnsPrefetchDisable
[] = "dns-prefetch-disable";
378 // Requests that a running browser process dump its collected histograms to a
379 // given file. The file is overwritten if it exists.
380 const char kDumpBrowserHistograms
[] = "dump-browser-histograms";
382 // Overrides the path of Easy Unlock component app.
383 const char kEasyUnlockAppPath
[] = "easy-unlock-app-path";
385 // Enables the display of a banner allowing the user to add a web
386 // app to their shelf (or platform-specific equivalent)
387 const char kEnableAddToShelf
[] = "enable-add-to-shelf";
389 // Enable OS integration for Chrome app file associations.
390 const char kEnableAppsFileAssociations
[] = "enable-apps-file-associations";
392 // Enables the benchmarking extensions.
393 const char kEnableBenchmarking
[] = "enable-benchmarking";
395 // Enables the multi-level undo system for bookmarks.
396 const char kEnableBookmarkUndo
[] = "enable-bookmark-undo";
398 // Enables detection of child accounts.
399 const char kEnableChildAccountDetection
[] =
400 "enable-child-account-detection";
402 // If true, the clear browsing data dialog will show data volume counters,
404 const char kEnableClearBrowsingDataCounters
[] =
405 "enable-clear-browsing-data-counters";
407 // This applies only when the process type is "service". Enables the Cloud
408 // Print Proxy component within the service process.
409 const char kEnableCloudPrintProxy
[] = "enable-cloud-print-proxy";
411 // If true devtools experimental settings are enabled.
412 const char kEnableDevToolsExperiments
[] = "enable-devtools-experiments";
414 // Enable device discovery notifications.
415 const char kEnableDeviceDiscoveryNotifications
[] =
416 "enable-device-discovery-notifications";
418 // Enables Domain Reliability Monitoring.
419 const char kEnableDomainReliability
[] = "enable-domain-reliability";
421 // Download Notification. (value is "", "enabled" or "disabled")
422 const char kEnableDownloadNotification
[] = "enable-download-notification";
424 // Enables experimentation with ephemeral apps to be launched from the webstore.
425 const char kEnableEphemeralAppsInWebstore
[] =
426 "enable-ephemeral-apps-in-webstore";
428 // Enables experimental hotword features specific to always-on.
429 const char kEnableExperimentalHotwordHardware
[] = "enable-hotword-hardware";
431 // Enables logging for extension activity.
432 const char kEnableExtensionActivityLogging
[] =
433 "enable-extension-activity-logging";
435 const char kEnableExtensionActivityLogTesting
[] =
436 "enable-extension-activity-log-testing";
438 // Enable the fast unload controller, which speeds up tab/window close by
439 // running a tab's onunload js handler independently of the GUI -
440 // crbug.com/142458 .
441 const char kEnableFastUnload
[] = "enable-fast-unload";
443 // Enables support for the QUIC protocol for insecure schemes (http://).
444 // This is a temporary testing flag.
445 const char kEnableInsecureQuic
[] = "enable-insecure-quic";
447 // Enables experimentation with launching ephemeral apps via hyperlinks.
448 const char kEnableLinkableEphemeralApps
[] = "enable-linkable-ephemeral-apps";
450 // Enables an experimental Material Design version of chrome://downloads.
451 const char kEnableMaterialDesignDownloads
[] = "enable-md-downloads";
453 // Enables the material design Settings feature.
454 const char kEnableMaterialDesignSettings
[] = "enable-md-settings";
456 #if defined(ENABLE_MEDIA_ROUTER)
457 // Enables Media Router.
458 const char kEnableMediaRouter
[] = "enable-media-router";
461 // Runs the Native Client inside the renderer process and enables GPU plugin
462 // (internally adds lEnableGpuPlugin to the command line).
463 const char kEnableNaCl
[] = "enable-nacl";
465 // Enables tracing for each navigation. It will attempt to trace each navigation
466 // for 10s, until the buffer is full, or until the next navigation.
467 // It only works if a URL was provided by --trace-upload-url.
468 const char kEnableNavigationTracing
[] = "enable-navigation-tracing";
470 // Enables the network-related benchmarking extensions.
471 const char kEnableNetBenchmarking
[] = "enable-net-benchmarking";
473 // Enables the new bookmark app system.
474 const char kEnableNewBookmarkApps
[] = "enable-new-bookmark-apps";
476 // Enables showing popular sites on the NTP.
477 const char kEnableNTPPopularSites
[] = "enable-ntp-popular-sites";
479 // Enable auto-reload of error pages if offline.
480 const char kEnableOfflineAutoReload
[] = "enable-offline-auto-reload";
482 // Only auto-reload error pages when the tab is visible.
483 const char kEnableOfflineAutoReloadVisibleOnly
[] =
484 "enable-offline-auto-reload-visible-only";
486 // Enables panels (always on-top docked pop-up windows).
487 const char kEnablePanels
[] = "enable-panels";
489 // Enable the new material UI - requires out of process PDF plugin.
490 const char kEnablePdfMaterialUI
[] = "enable-pdf-material-ui";
492 // Enables presenting plugin placeholder content as shadow DOM.
493 const char kEnablePluginPlaceholderShadowDom
[] =
494 "enable-plugin-placeholder-shadow-dom";
496 // Enables a number of potentially annoying security features (strict mixed
497 // content mode, powerful feature restrictions, etc.)
498 const char kEnablePotentiallyAnnoyingSecurityFeatures
[] =
499 "enable-potentially-annoying-security-features";
501 // Enables the Power overlay in Settings.
502 const char kEnablePowerOverlay
[] = "enable-power-overlay";
504 // Enables showing unregistered printers in print preview
505 const char kEnablePrintPreviewRegisterPromos
[] =
506 "enable-print-preview-register-promos";
508 // Enables tracking of tasks in profiler for viewing via about:profiler.
509 // To predominantly disable tracking (profiling), use the command line switch:
510 // --enable-profiling=0
511 // Some tracking will still take place at startup, but it will be turned off
512 // during chrome_browser_main.
513 const char kEnableProfiling
[] = "enable-profiling";
515 // Enables support for the QUIC protocol. This is a temporary testing flag.
516 const char kEnableQuic
[] = "enable-quic";
518 // Enable use of Chromium's port selection for the ephemeral port via bind().
519 // This only has an effect if QUIC protocol is enabled.
520 const char kEnableQuicPortSelection
[] = "enable-quic-port-selection";
522 // Enables save password prompt bubble.
523 const char kEnableSavePasswordBubble
[] = "enable-save-password-bubble";
525 // Enables SDCH persistence.
526 const char kEnableSdchPersistence
[] = "enable-sdch-persistence";
528 // Enables using bubbles for session restore request instead of infobars.
529 const char kEnableSessionCrashedBubble
[] = "enable-session-crashed-bubble";
531 // Enable or disable settings in a separate browser window per profile
532 // (see SettingsWindowEnabled() below).
533 const char kEnableSettingsWindow
[] = "enable-settings-window";
534 const char kDisableSettingsWindow
[] = "disable-settings-window";
536 // A new user experience for transitioning into fullscreen and mouse pointer
538 const char kEnableSimplifiedFullscreenUI
[] = "enable-simplified-fullscreen-ui";
539 const char kDisableSimplifiedFullscreenUI
[] =
540 "disable-simplified-fullscreen-ui";
542 // Enable the Site Engagement service, which records interaction with sites and
543 // allocates certain resources accordingly.
544 const char kEnableSiteEngagementService
[] = "enable-site-engagement-service";
546 // Enables the suggestions service.
547 const char kEnableSuggestionsService
[] = "enable-suggestions-service";
549 // Enables the supervised user managed bookmarks folder.
550 const char kEnableSupervisedUserManagedBookmarksFolder
[] =
551 "enable-supervised-user-managed-bookmarks-folder";
553 // Enables user control over muting tab audio from the tab strip.
554 const char kEnableTabAudioMuting
[] = "enable-tab-audio-muting";
556 // Enables fanciful thumbnail processing. Used with NTP for
557 // instant-extended-api, where thumbnails are generally smaller.
558 const char kEnableThumbnailRetargeting
[] = "enable-thumbnail-retargeting";
560 // Enables Alternate-Protocol when the port is user controlled (> 1024).
561 const char kEnableUserAlternateProtocolPorts
[] =
562 "enable-user-controlled-alternate-protocol-ports";
564 // Enables a new "web app" style frame for hosted apps (including bookmark
566 extern const char kEnableWebAppFrame
[] = "enable-web-app-frame";
568 // Enables synchronizing WiFi credentials across devices, using Chrome Sync.
569 const char kEnableWifiCredentialSync
[] = "enable-wifi-credential-sync";
571 // Values for the kExtensionContentVerification flag.
572 // See ContentVerifierDelegate::Mode for more explanation.
573 const char kExtensionContentVerificationBootstrap
[] = "bootstrap";
574 const char kExtensionContentVerificationEnforceStrict
[] = "enforce_strict";
575 const char kExtensionContentVerificationEnforce
[] = "enforce";
577 // Name of the command line flag to force content verification to be on in one
579 const char kExtensionContentVerification
[] = "extension-content-verification";
581 // Turns on extension install verification if it would not otherwise have been
583 const char kExtensionsInstallVerification
[] = "extensions-install-verification";
585 // Specifies a comma-separated list of extension ids that should be forced to
586 // be treated as not from the webstore when doing install verification.
587 const char kExtensionsNotWebstore
[] = "extensions-not-webstore";
589 // Frequency in seconds for Extensions auto-update.
590 const char kExtensionsUpdateFrequency
[] = "extensions-update-frequency";
592 // Fakes the channel of the browser for purposes of Variations filtering. This
593 // is to be used for testing only. Possible values are "stable", "beta", "dev"
594 // and "canary". Note that this only applies if the browser's reported channel
596 const char kFakeVariationsChannel
[] = "fake-variations-channel";
598 // If this flag is present then this command line is being delegated to an
599 // already running chrome process via the fast path, ie: before chrome.dll is
600 // loaded. It is useful to tell the difference for tracking purposes.
601 const char kFastStart
[] = "fast-start";
603 // These two flags are added around the switches about:flags adds to the
604 // command line. This is useful to see which switches were added by about:flags
605 // on about:version. They don't have any effect.
606 const char kFlagSwitchesBegin
[] = "flag-switches-begin";
607 const char kFlagSwitchesEnd
[] = "flag-switches-end";
609 // Forces application mode. This hides certain system UI elements and forces
610 // the app to be installed if it hasn't been already.
611 const char kForceAppMode
[] = "force-app-mode";
613 // This option can be used to force parameters of field trials when testing
614 // changes locally. The argument is a list of key/value pairs prefixed by
615 // Trial/Group pair. The following shows setting parameters to 2 experiments
616 // where in the first, it forces "id" to be "foo" for the "Enabled" group of
617 // the "EnhancedBookmarks" trial:
618 // "EnhancedBookmarks.Enabled:id/foo,Experiment2.Group1:key1/value1"
619 // Trial names, groups names, parameter names, and value should all be URL
620 // escaped for all non-alphanumeric characters.
621 const char kForceFieldTrialParams
[] = "force-fieldtrial-params";
623 // Displays the First Run experience when the browser is started, regardless of
624 // whether or not it's actually the First Run (this overrides kNoFirstRun).
625 const char kForceFirstRun
[] = "force-first-run";
627 // Forces additional Chrome Variation Ids that will be sent in X-Client-Data
628 // header, specified as a 64-bit encoded list of numeric experiment ids. Ids
629 // prefixed with the character "t" will be treated as Trigger Variation Ids.
630 const char kForceVariationIds
[] = "force-variation-ids";
632 // Forces Chrome to use localNTP instead of server (GWS) NTP.
633 const char kForceLocalNtp
[] = "force-local-ntp";
635 // Enables grouping websites by domain and filtering them by period.
636 const char kHistoryEnableGroupByDomain
[] = "enable-grouped-history";
638 // Specifies which page will be displayed in newly-opened tabs. We need this
639 // for testing purposes so that the UI tests don't depend on what comes up for
640 // http://google.com.
641 const char kHomePage
[] = "homepage";
643 // Comma-separated list of rules that control how hostnames are mapped.
646 // "MAP * 127.0.0.1" --> Forces all hostnames to be mapped to 127.0.0.1
647 // "MAP *.google.com proxy" --> Forces all google.com subdomains to be
648 // resolved to "proxy".
649 // "MAP test.com [::1]:77 --> Forces "test.com" to resolve to IPv6 loopback.
650 // Will also force the port of the resulting
651 // socket address to be 77.
652 // "MAP * baz, EXCLUDE www.google.com" --> Remaps everything to "baz",
653 // except for "www.google.com".
655 // These mappings apply to the endpoint host in a net::URLRequest (the TCP
656 // connect and host resolver in a direct connection, and the CONNECT in an http
657 // proxy connection, and the endpoint host in a SOCKS proxy connection).
658 const char kHostRules
[] = "host-rules";
660 // The maximum number of retry attempts to resolve the host. Set this to zero
661 // to disable host resolver retry attempts.
662 const char kHostResolverRetryAttempts
[] = "host-resolver-retry-attempts";
664 // Causes net::URLFetchers to ignore requests for SSL client certificates,
665 // causing them to attempt an unauthenticated SSL/TLS session. This is intended
666 // for use when testing various service URLs (eg: kPromoServerURL, kSbURLPrefix,
667 // kSyncServiceURL, etc)
668 const char kIgnoreUrlFetcherCertRequests
[] =
669 "ignore-urlfetcher-cert-requests";
671 // Causes the browser to launch directly in incognito mode.
672 const char kIncognito
[] = "incognito";
674 // Causes Chrome to initiate an installation flow for the given app.
675 const char kInstallChromeApp
[] = "install-chrome-app";
677 // Causes Chrome to attempt to get metadata from the webstore for the
678 // app/extension ID given, and then prompt the user to download and install it.
679 // This is allowed *only* for ephemeral apps. All other ids will be ignored.
680 const char kInstallEphemeralAppFromWebstore
[] =
681 "install-ephemeral-app-from-webstore";
683 // A list of whitelists to install for a supervised user, for testing.
684 // The list is of the following form: <id>[:<name>],[<id>[:<name>],...]
685 const char kInstallSupervisedUserWhitelists
[] =
686 "install-supervised-user-whitelists";
688 // Marks a renderer as an Instant process.
689 const char kInstantProcess
[] = "instant-process";
691 // Invalidation service should use GCM network channel even if experiment is not
693 const char kInvalidationUseGCMChannel
[] = "invalidation-use-gcm-channel";
695 // Disable latest shipping ECMAScript 6 features.
696 const char kDisableJavaScriptHarmonyShipping
[] =
697 "disable-javascript-harmony-shipping";
699 // Enables experimental Harmony (ECMAScript 6) features.
700 const char kJavaScriptHarmony
[] = "javascript-harmony";
702 // Dumps IPC messages sent from renderer processes to the browser process to
703 // the given directory. Used primarily to gather samples for IPC fuzzing.
704 const char kIpcDumpDirectory
[] = "ipc-dump-directory";
706 // Used for testing - keeps browser alive after last browser window closes.
707 const char kKeepAliveForTest
[] = "keep-alive-for-test";
709 // Enable Kiosk mode.
710 const char kKioskMode
[] = "kiosk";
712 // Print automatically in kiosk mode. |kKioskMode| must be set as well.
713 // See http://crbug.com/31395.
714 const char kKioskModePrinting
[] = "kiosk-printing";
716 // Comma-separated list of directories with component extensions to load.
717 const char kLoadComponentExtension
[] = "load-component-extension";
719 // Loads an extension from the specified directory.
720 const char kLoadExtension
[] = "load-extension";
722 #if !defined(OFFICIAL_BUILD)
723 // Enables a live-reload for local NTP resources. This only works when Chrome
724 // is running from a Chrome source directory.
725 const char kLocalNtpReload
[] = "local-ntp-reload";
728 // Makes Chrome default browser
729 const char kMakeDefaultBrowser
[] = "make-default-browser";
731 // Use to opt-in to marking HTTP as non-secure.
732 const char kMarkNonSecureAs
[] = "mark-non-secure-as";
733 const char kMarkNonSecureAsNeutral
[] = "neutral";
734 const char kMarkNonSecureAsDubious
[] = "dubious";
735 const char kMarkNonSecureAsNonSecure
[] = "non-secure";
737 // Forces the maximum disk space to be used by the media cache, in bytes.
738 const char kMediaCacheSize
[] = "media-cache-size";
740 // Enables histograming of tasks served by MessageLoop. See
741 // about:histograms/Loop for results, which show frequency of messages on each
742 // thread, including APC count, object signalling count, etc.
743 const char kMessageLoopHistogrammer
[] = "message-loop-histogrammer";
745 // Enables the recording of metrics reports but disables reporting. In contrast
746 // to kDisableMetrics, this executes all the code that a normal client would
747 // use for reporting, except the report is dropped rather than sent to the
748 // server. This is useful for finding issues in the metrics code during UI and
749 // performance tests.
750 const char kMetricsRecordingOnly
[] = "metrics-recording-only";
752 // Allows setting a different destination ID for connection-monitoring GCM
753 // messages. Useful when running against a non-prod management server.
754 const char kMonitoringDestinationID
[] = "monitoring-destination-id";
756 // Sets the granularity of events to capture in the network log. The mode can be
757 // set to one of the following values:
759 // "IncludeCookiesAndCredentials"
760 // "IncludeSocketBytes"
762 // See the functions of the corresponding name in net_log_capture_mode.h for a
763 // description of their meaning.
764 const char kNetLogCaptureMode
[] = "net-log-capture-mode";
766 // Disables the default browser check. Useful for UI/browser tests where we
767 // want to avoid having the default browser info-bar displayed.
768 const char kNoDefaultBrowserCheck
[] = "no-default-browser-check";
770 // By default, an https page can load images, fonts or frames from an http
771 // page. This switch overrides this to block this lesser mixed-content problem.
772 const char kNoDisplayingInsecureContent
[] = "no-displaying-insecure-content";
774 // Disables all experiments set on about:flags. Does not disable about:flags
775 // itself. Useful if an experiment makes chrome crash at startup: One can start
776 // chrome with --no-experiments, disable the problematic lab at about:flags and
777 // then restart chrome without this switch again.
778 const char kNoExperiments
[] = "no-experiments";
780 // Skip First Run tasks, whether or not it's actually the First Run. Overridden
781 // by kForceFirstRun. This does not drop the First Run sentinel and thus doesn't
782 // prevent first run from occuring the next time chrome is launched without this
784 const char kNoFirstRun
[] = "no-first-run";
786 // Don't send hyperlink auditing pings
787 const char kNoPings
[] = "no-pings";
789 // Don't use a proxy server, always make direct connections. Overrides any
790 // other proxy server flags that are passed.
791 const char kNoProxyServer
[] = "no-proxy-server";
793 // Disables the service process from adding itself as an autorun process. This
794 // does not delete existing autorun registrations, it just prevents the service
795 // from registering a new one.
796 const char kNoServiceAutorun
[] = "no-service-autorun";
798 // Does not automatically open a browser window on startup (used when
799 // launching Chrome for the purpose of hosting background apps).
800 const char kNoStartupWindow
[] = "no-startup-window";
802 // Disables checking whether we received an acknowledgment when registering
803 // a supervised user. Also disables the timeout during registration that waits
804 // for the ack. Useful when debugging against a server that does not
805 // support notifications.
806 const char kNoSupervisedUserAcknowledgmentCheck
[] =
807 "no-managed-user-acknowledgment-check";
809 // Specifies the maximum number of threads to use for running the Proxy
810 // Autoconfig (PAC) script.
811 const char kNumPacThreads
[] = "num-pac-threads";
813 // Launches URL in new browser window.
814 const char kOpenInNewWindow
[] = "new-window";
816 // Force use of QUIC for requests to the specified origin.
817 const char kOriginToForceQuicOn
[] = "origin-to-force-quic-on";
819 // The time that a new chrome process which is delegating to an already running
820 // chrome process started. (See ProcessSingleton for more details.)
821 const char kOriginalProcessStartTime
[] = "original-process-start-time";
823 // Packages an extension to a .crx installable file from a given directory.
824 const char kPackExtension
[] = "pack-extension";
826 // Optional PEM private key to use in signing packaged .crx.
827 const char kPackExtensionKey
[] = "pack-extension-key";
829 // Specifies the path to the user data folder for the parent profile.
830 const char kParentProfile
[] = "parent-profile";
832 // Development flag for permission request API. This flag is needed until
833 // the API is finalized.
834 // TODO(bauerb): Remove when this flag is not needed anymore.
835 const char kPermissionRequestApiScope
[] = "permission-request-api-scope";
837 // Development flag for permission request API. This flag is needed until
838 // the API is finalized.
839 // TODO(bauerb): Remove when this flag is not needed anymore.
840 const char kPermissionRequestApiUrl
[] = "permission-request-api-url";
842 // Use the PPAPI (Pepper) Flash found at the given path.
843 const char kPpapiFlashPath
[] = "ppapi-flash-path";
845 // Report the given version for the PPAPI (Pepper) Flash. The version should be
846 // numbers separated by '.'s (e.g., "12.3.456.78"). If not specified, it
847 // defaults to "10.2.999.999".
848 const char kPpapiFlashVersion
[] = "ppapi-flash-version";
850 // Triggers prerendering of pages from suggestions in the omnibox. Only has an
851 // effect when Instant is either disabled or restricted to search, and when
852 // prerender is enabled.
853 const char kPrerenderFromOmnibox
[] = "prerender-from-omnibox";
854 // These are the values the kPrerenderFromOmnibox switch may have, as in
855 // "--prerender-from-omnibox=auto". auto: Allow field trial selection.
856 const char kPrerenderFromOmniboxSwitchValueAuto
[] = "auto";
857 // disabled: No prerendering.
858 const char kPrerenderFromOmniboxSwitchValueDisabled
[] = "disabled";
859 // enabled: Guaranteed prerendering.
860 const char kPrerenderFromOmniboxSwitchValueEnabled
[] = "enabled";
861 // Controls speculative prerendering of pages, and content prefetching. Both
862 // are dispatched from <link rel=prefetch href=...> elements.
863 const char kPrerenderMode
[] = "prerender";
864 // These are the values the kPrerenderMode switch may have, as in
865 // "--prerender=disabled".
866 // disabled: No prerendering.
867 const char kPrerenderModeSwitchValueDisabled
[] = "disabled";
868 // enabled: Prerendering.
869 const char kPrerenderModeSwitchValueEnabled
[] = "enabled";
871 // Use IPv6 only for privet HTTP.
872 const char kPrivetIPv6Only
[] = "privet-ipv6-only";
874 // Outputs the product version information and quit. Used as an internal api to
875 // detect the installed version of Chrome on Linux.
876 const char kProductVersion
[] = "product-version";
878 // Selects directory of profile to associate with the first browser launched.
879 const char kProfileDirectory
[] = "profile-directory";
881 // Starts the sampling based profiler for the browser process at startup. This
882 // will only work if chrome has been built with the gyp variable profiling=1.
883 // The output will go to the value of kProfilingFile.
884 const char kProfilingAtStart
[] = "profiling-at-start";
886 // Specifies a location for profiling output. This will only work if chrome has
887 // been built with the gyp variable profiling=1.
889 // {pid} if present will be replaced by the pid of the process.
890 // {count} if present will be incremented each time a profile is generated
892 // The default is chrome-profile-{pid}.
893 const char kProfilingFile
[] = "profiling-file";
895 // Controls whether profile data is periodically flushed to a file. Normally
896 // the data gets written on exit but cases exist where chrome doesn't exit
897 // cleanly (especially when using single-process). A time in seconds can be
899 const char kProfilingFlush
[] = "profiling-flush";
901 // Forces proxy auto-detection.
902 const char kProxyAutoDetect
[] = "proxy-auto-detect";
904 // Specifies a list of hosts for whom we bypass proxy settings and use direct
905 // connections. Ignored if --proxy-auto-detect or --no-proxy-server are also
906 // specified. This is a comma-separated list of bypass rules. See:
907 // "net/proxy/proxy_bypass_rules.h" for the format of these rules.
908 const char kProxyBypassList
[] = "proxy-bypass-list";
910 // Uses the pac script at the given URL
911 const char kProxyPacUrl
[] = "proxy-pac-url";
913 // Uses a specified proxy server, overrides system settings. This switch only
914 // affects HTTP and HTTPS requests.
915 const char kProxyServer
[] = "proxy-server";
917 // Specifies a comma separated list of QUIC connection options to send to
919 const char kQuicConnectionOptions
[] = "quic-connection-options";
921 // Specifies the maximum length for a QUIC packet.
922 const char kQuicMaxPacketLength
[] = "quic-max-packet-length";
924 // Specifies the version of QUIC to use.
925 const char kQuicVersion
[] = "quic-version";
927 // Porvides a list of addresses to discover DevTools remote debugging targets.
928 // The format is <host>:<port>,...,<host>:port.
929 const char kRemoteDebuggingTargets
[] = "remote-debugging-targets";
931 // Indicates the last session should be restored on startup. This overrides the
932 // preferences value and is primarily intended for testing. The value of this
933 // switch is the number of tabs to wait until loaded before 'load completed' is
934 // sent to the ui_test.
935 const char kRestoreLastSession
[] = "restore-last-session";
937 // Causes all iframes to be denied all permissions by default. Allowing
938 // particular permissions for an iframe may involve listing the names of
939 // these permissions as values of new iframe attributes.
940 const char kRestrictIFramePermissions
[] = "restrict-iframe-permissions";
942 // Disable saving pages as HTML-only, disable saving pages as HTML Complete
943 // (with a directory of sub-resources). Enable only saving pages as MHTML.
944 // See http://crbug.com/120416 for how to remove this switch.
945 const char kSavePageAsMHTML
[] = "save-page-as-mhtml";
947 // If present, safebrowsing only performs update when
948 // SafeBrowsingProtocolManager::ForceScheduleNextUpdate() is explicitly called.
949 // This is used for testing only.
950 const char kSbDisableAutoUpdate
[] = "safebrowsing-disable-auto-update";
952 // TODO(lzheng): Remove this flag once the feature works fine
953 // (http://crbug.com/74848).
955 // Disables safebrowsing feature that checks download url and downloads
956 // content's hash to make sure the content are not malicious.
957 const char kSbDisableDownloadProtection
[] =
958 "safebrowsing-disable-download-protection";
960 // Disables safebrowsing feature that checks for blacklisted extensions.
961 const char kSbDisableExtensionBlacklist
[] =
962 "safebrowsing-disable-extension-blacklist";
964 // Causes the process to run as a service process.
965 const char kServiceProcess
[] = "service";
967 // If true the app list will be shown.
968 const char kShowAppList
[] = "show-app-list";
970 // Command line flag offering a "Show saved copy" option to the user if offline.
971 // The various modes are disabled, primary, or secondary. Primary/secondary
972 // refers to button placement (for experiment).
973 const char kShowSavedCopy
[] = "show-saved-copy";
975 // Values for the kShowSavedCopy flag.
976 const char kEnableShowSavedCopyPrimary
[] = "primary";
977 const char kEnableShowSavedCopySecondary
[] = "secondary";
978 const char kDisableShowSavedCopy
[] = "disable";
980 // Does not show an infobar when an extension attaches to a page using
981 // chrome.debugger page. Required to attach to extension background pages.
982 const char kSilentDebuggerExtensionAPI
[] = "silent-debugger-extension-api";
984 // Causes Chrome to launch without opening any windows by default. Useful if
985 // one wishes to use Chrome as an ash server.
986 const char kSilentLaunch
[] = "silent-launch";
988 // Simulates that elevation is needed to recover upgrade channel.
989 const char kSimulateElevatedRecovery
[] = "simulate-elevated-recovery";
991 // Simulates a critical update being available.
992 const char kSimulateCriticalUpdate
[] = "simulate-critical-update";
994 // Simulates that current version is outdated.
995 const char kSimulateOutdated
[] = "simulate-outdated";
997 // Simulates that current version is outdated and auto-update is off.
998 const char kSimulateOutdatedNoAU
[] = "simulate-outdated-no-au";
1000 // Simulates an update being available.
1001 const char kSimulateUpgrade
[] = "simulate-upgrade";
1003 // Speculative resource prefetching.
1004 const char kSpeculativeResourcePrefetching
[] =
1005 "speculative-resource-prefetching";
1007 // Speculative resource prefetching is disabled.
1008 const char kSpeculativeResourcePrefetchingDisabled
[] = "disabled";
1010 // Speculative resource prefetching will only learn about resources that need to
1011 // be prefetched but will not prefetch them.
1012 const char kSpeculativeResourcePrefetchingLearning
[] = "learning";
1014 // Speculative resource prefetching is enabled.
1015 const char kSpeculativeResourcePrefetchingEnabled
[] = "enabled";
1017 #if defined(ENABLE_SPELLCHECK)
1018 #if defined(OS_ANDROID)
1019 // Enables use of the Android spellchecker.
1020 const char kEnableAndroidSpellChecker
[] = "enable-android-spellchecker";
1023 // Enables the multilingual spellchecker.
1024 const char kEnableMultilingualSpellChecker
[] =
1025 "enable-multilingual-spellchecker";
1027 // Enables auto correction for misspelled words.
1028 const char kEnableSpellingAutoCorrect
[] = "enable-spelling-auto-correct";
1030 // Enables participation in the field trial for user feedback to spelling
1032 const char kEnableSpellingFeedbackFieldTrial
[] =
1033 "enable-spelling-feedback-field-trial";
1035 // Specifies the URL where spelling service feedback data will be sent instead
1036 // of the default URL. This switch is for temporary testing only.
1037 // TODO(rouslan): Remove this flag when feedback testing is complete. Revisit by
1039 const char kSpellingServiceFeedbackUrl
[] = "spelling-service-feedback-url";
1041 // Specifies the number of seconds between sending batches of feedback to
1042 // spelling service. The default is 30 minutes. The minimum is 5 seconds. This
1043 // switch is for temporary testing only.
1044 // TODO(rouslan): Remove this flag when feedback testing is complete. Revisit by
1046 const char kSpellingServiceFeedbackIntervalSeconds
[] =
1047 "spelling-service-feedback-interval-seconds";
1050 // Specifies the maximum SSL/TLS version ("tls1", "tls1.1", or "tls1.2").
1051 const char kSSLVersionMax
[] = "ssl-version-max";
1053 // Specifies the minimum SSL/TLS version ("tls1", "tls1.1", or "tls1.2").
1054 const char kSSLVersionMin
[] = "ssl-version-min";
1056 // Specifies the minimum SSL/TLS version ("tls1", "tls1.1", or "tls1.2") that
1057 // TLS fallback will accept.
1058 const char kSSLVersionFallbackMin
[] = "ssl-version-fallback-min";
1060 // These values aren't switches, but rather the values that kSSLVersionMax,
1061 // kSSLVersionMin and kSSLVersionFallbackMin can have.
1062 const char kSSLVersionTLSv1
[] = "tls1";
1063 const char kSSLVersionTLSv11
[] = "tls1.1";
1064 const char kSSLVersionTLSv12
[] = "tls1.2";
1066 // Starts the browser maximized, regardless of any previous settings.
1067 const char kStartMaximized
[] = "start-maximized";
1069 // Sets the supervised user ID for any loaded or newly created profile to the
1070 // given value. Pass an empty string to mark the profile as non-supervised.
1071 // Used for testing.
1072 const char kSupervisedUserId
[] = "managed-user-id";
1074 // Enables/disables SafeSites filtering for supervised users. Possible values
1075 // are "enabled", "disabled", "blacklist-only", and "online-check-only".
1076 const char kSupervisedUserSafeSites
[] = "supervised-user-safesites";
1078 // Used to authenticate requests to the Sync service for supervised users.
1079 // Setting this switch also causes Sync to be set up for a supervised user.
1080 const char kSupervisedUserSyncToken
[] = "managed-user-sync-token";
1082 // This flag causes sync to retry very quickly (see polling_constants.h) the
1083 // when it encounters an error, as the first step towards exponential backoff.
1084 const char kSyncShortInitialRetryOverride
[] =
1085 "sync-short-initial-retry-override";
1087 // Overrides the default server used for profile sync.
1088 const char kSyncServiceURL
[] = "sync-url";
1090 // Enables deferring sync backend initialization until user initiated changes
1092 const char kSyncDisableDeferredStartup
[] = "sync-disable-deferred-startup";
1094 // Allows overriding the deferred init fallback timeout.
1095 const char kSyncDeferredStartupTimeoutSeconds
[] =
1096 "sync-deferred-startup-timeout-seconds";
1098 // Enables feature to avoid unnecessary GetUpdate requests.
1099 const char kSyncEnableGetUpdateAvoidance
[] =
1100 "sync-enable-get-update-avoidance";
1102 // Enables clearing of sync data when a user enables passphrase encryption.
1103 const char kSyncEnableClearDataOnPassphraseEncryption
[] =
1104 "enable-clear-sync-data-on-passphrase-encryption";
1106 // Disable data backup when user's not signed in.
1107 const char kSyncDisableBackup
[] = "disable-sync-backup";
1109 // Disable sync rollback.
1110 const char kSyncDisableRollback
[] = "disable-sync-rollback";
1112 // Passes the name of the current running automated test to Chrome.
1113 const char kTestName
[] = "test-name";
1115 // Disables same-origin check on HTTP resources pushed via a SPDY proxy.
1116 // The value is the host:port of the trusted proxy.
1117 const char kTrustedSpdyProxy
[] = "trusted-spdy-proxy";
1119 // Experimental. Shows a dialog asking the user to try chrome. This flag is to
1120 // be used only by the upgrade process.
1121 const char kTryChromeAgain
[] = "try-chrome-again";
1123 // Overrides per-origin quota settings to unlimited storage for any
1124 // apps/origins. This should be used only for testing purpose.
1125 const char kUnlimitedStorage
[] = "unlimited-storage";
1127 // Treat given (insecure) origins as secure origins. Multiple origins can be
1128 // supplied. Has no effect unless --user-data-dir is also supplied.
1130 // --unsafely-treat-insecure-origin-as-secure=http://a.test,http://b.test
1131 // --user-data-dir=/test/only/profile/dir
1132 const char kUnsafelyTreatInsecureOriginAsSecure
[] =
1133 "unsafely-treat-insecure-origin-as-secure";
1135 // Uses Spdy for the transport protocol instead of HTTP. This is a temporary
1137 const char kUseSpdy
[] = "use-spdy";
1139 // A string used to override the default user agent with a custom one.
1140 const char kUserAgent
[] = "user-agent";
1142 // Specifies the user data directory, which is where the browser will look for
1143 // all of its state.
1144 const char kUserDataDir
[] = "user-data-dir";
1146 // Examines a .crx for validity and prints the result.
1147 const char kValidateCrx
[] = "validate-crx";
1149 // Uses experimental simple cache backend if possible.
1150 const char kUseSimpleCacheBackend
[] = "use-simple-cache-backend";
1152 // Enables using an in-process Mojo service for the v8 proxy resolver.
1153 const char kV8PacMojoInProcess
[] = "v8-pac-mojo-in-process";
1155 // Enables using an out-of-process Mojo service for the v8 proxy resolver.
1156 const char kV8PacMojoOutOfProcess
[] = "v8-pac-mojo-out-of-process";
1158 // Specifies a custom URL for the server which reports variation data to the
1159 // client. Specifying this switch enables the Variations service on
1160 // unofficial builds. See variations_service.cc.
1161 const char kVariationsServerURL
[] = "variations-server-url";
1163 // Prints version information and quits.
1164 const char kVersion
[] = "version";
1166 // Specify the initial window position: --window-position=x,y
1167 const char kWindowPosition
[] = "window-position";
1169 // Specify the initial window size: --window-size=w,h
1170 const char kWindowSize
[] = "window-size";
1172 // Uses WinHTTP to fetch and evaluate PAC scripts. Otherwise the default is to
1173 // use Chromium's network stack to fetch, and V8 to evaluate.
1174 const char kWinHttpProxyResolver
[] = "winhttp-proxy-resolver";
1176 // Specifies which category option was clicked in the Windows Jumplist that
1177 // resulted in a browser startup.
1178 const char kWinJumplistAction
[] = "win-jumplist-action";
1180 #if defined(OS_ANDROID)
1181 // Android authentication account type for SPNEGO authentication
1182 const char kAuthAndroidNegotiateAccountType
[] = "auth-spnego-account-type";
1184 // Disables support for playing videos on Chromecast devices.
1185 const char kDisableCast
[] = "disable-cast";
1187 // Disables Contextual Search.
1188 const char kDisableContextualSearch
[] = "disable-contextual-search";
1190 // Disables zero suggest experiment on Dev channel.
1191 const char kDisableZeroSuggest
[] = "disable-zero-suggest";
1193 // Enable the accessibility tab switcher.
1194 const char kEnableAccessibilityTabSwitcher
[] =
1195 "enable-accessibility-tab-switcher";
1197 // Enables Contextual Search.
1198 const char kEnableContextualSearch
[] = "enable-contextual-search";
1200 // Enables the DOM distiller animated button UI for Android.
1201 const char kEnableDomDistillerButtonAnimation
[] =
1202 "enable-dom-distiller-button-animation";
1204 // Enables chrome hosted mode for Android.
1205 const char kEnableHostedMode
[] = "enable-hosted-mode";
1207 // Enables context-sensitive reader mode button in the toolbar.
1208 const char kEnableReaderModeToolbarIcon
[] =
1209 "enable-reader-mode-toolbar-icon";
1211 // Enables zero suggest functionality on Dev channel, showing most visited
1212 // sites as default suggestions.
1213 const char kEnableZeroSuggestMostVisited
[] =
1214 "enable-zero-suggest-most-visited";
1216 // Enable zero suggest functionality on Dev channel, showing most visited
1217 // sites on non-search-result pages as default suggestions.
1218 const char kEnableZeroSuggestMostVisitedWithoutSerp
[] =
1219 "enable-zero-suggest-most-visited-without-serp";
1221 // Specifies Android phone page loading progress bar animation.
1222 const char kProgressBarAnimation
[] = "progress-bar-animation";
1223 #endif // defined(OS_ANDROID)
1225 #if defined(USE_ASH)
1226 const char kOpenAsh
[] = "open-ash";
1229 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_CHROMEOS)
1230 // These flags show the man page on Linux. They are equivalent to each
1232 const char kHelp
[] = "help";
1233 const char kHelpShort
[] = "h";
1235 // Specifies which password store to use (detect, default, gnome, kwallet).
1236 const char kPasswordStore
[] = "password-store";
1239 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
1240 // Triggers migration of user data directory to another directory
1241 // specified as a parameter. The migration is done under singleton lock,
1242 // and sanity checks are made to avoid corrupting the profile.
1243 // The browser exits after migration is complete.
1244 const char kMigrateDataDirForSxS
[] = "migrate-data-dir-for-sxs";
1245 #endif // defined(OS_LINUX) && !defined(OS_CHROMEOS)
1247 #if defined(OS_MACOSX)
1248 // Prevents Chrome from quitting when Chrome Apps are open.
1249 const char kAppsKeepChromeAliveInTests
[] = "apps-keep-chrome-alive-in-tests";
1251 // Shows a notification when quitting Chrome with hosted apps running. Default
1252 // behavior is to also quit all hosted apps.
1253 const char kHostedAppQuitNotification
[] = "enable-hosted-app-quit-notification";
1255 // Disable the toolkit-views App Info dialog for Mac.
1256 const char kDisableAppInfoDialogMac
[] = "disable-app-info-dialog-mac";
1258 // Disables custom Cmd+` window cycling for platform apps and hosted apps.
1259 const char kDisableAppWindowCycling
[] = "disable-app-window-cycling";
1261 // Disables app shim creation for hosted apps on Mac.
1262 const char kDisableHostedAppShimCreation
[] = "disable-hosted-app-shim-creation";
1264 // Disables use of toolkit-views based native app windows.
1265 const char kDisableMacViewsNativeAppWindows
[] =
1266 "disable-mac-views-native-app-windows";
1268 // Enable the toolkit-views App Info dialog for Mac. This is accessible from
1269 // chrome://apps and chrome://extensions and is already enabled on non-mac.
1270 const char kEnableAppInfoDialogMac
[] = "enable-app-info-dialog-mac";
1272 // Enables custom Cmd+` window cycling for platform apps and hosted apps.
1273 const char kEnableAppWindowCycling
[] = "enable-app-window-cycling";
1275 // Enables use of toolkit-views based native app windows.
1276 const char kEnableMacViewsNativeAppWindows
[] =
1277 "enable-mac-views-native-app-windows";
1279 // Enables Translate experimental new UX which replaces the infobar.
1280 const char kEnableTranslateNewUX
[] = "enable-translate-new-ux";
1282 // This is how the metrics client ID is passed from the browser process to its
1283 // children. With Crashpad, the metrics client ID is distinct from the crash
1285 const char kMetricsClientID
[] = "metrics-client-id";
1287 // A process type (switches::kProcessType) that relaunches the browser. See
1288 // chrome/browser/mac/relauncher.h.
1289 const char kRelauncherProcess
[] = "relauncher";
1290 #endif // defined(OS_MACOSX)
1292 // Use bubbles for content permissions requests instead of infobars.
1293 const char kEnablePermissionsBubbles
[] = "enable-permissions-bubbles";
1296 // Fallback to XPS. By default connector uses CDD.
1297 const char kEnableCloudPrintXps
[] = "enable-cloud-print-xps";
1299 // Force-enables the profile shortcut manager. This is needed for tests since
1300 // they use a custom-user-data-dir which disables this.
1301 const char kEnableProfileShortcutManager
[] = "enable-profile-shortcut-manager";
1303 // For the DelegateExecute verb handler to launch Chrome in metro mode on
1304 // Windows 8 and higher. Used when relaunching metro Chrome.
1305 const char kForceImmersive
[] = "force-immersive";
1307 // Whether or not the browser should warn if the profile is on a network share.
1308 // This flag is only relevant for Windows currently.
1309 const char kNoNetworkProfileWarning
[] = "no-network-profile-warning";
1311 // For the DelegateExecute verb handler to launch Chrome in desktop mode on
1312 // Windows 8 and higher. Used when relaunching metro Chrome.
1313 const char kForceDesktop
[] = "force-desktop";
1315 // Makes Windows happy by allowing it to show "Enable access to this program"
1316 // checkbox in Add/Remove Programs->Set Program Access and Defaults. This only
1317 // shows an error box because the only way to hide Chrome is by uninstalling
1319 const char kHideIcons
[] = "hide-icons";
1321 // Relaunches metro Chrome on Windows 8 and higher using a given shortcut.
1322 const char kRelaunchShortcut
[] = "relaunch-shortcut";
1325 const char kShowIcons
[] = "show-icons";
1327 // Runs un-installation steps that were done by chrome first-run.
1328 const char kUninstall
[] = "uninstall";
1330 // Requests that Chrome launch the Metro viewer process via the given appid
1331 // (which is assumed to be registered as default browser) and synchronously
1333 const char kViewerLaunchViaAppId
[] = "viewer-launch-via-appid";
1335 // Waits for the given handle to be signaled before relaunching metro Chrome on
1336 // Windows 8 and higher.
1337 const char kWaitForMutex
[] = "wait-for-mutex";
1339 // Indicates that chrome was launched to service a search request in Windows 8.
1340 const char kWindows8Search
[] = "windows8-search";
1341 #endif // defined(OS_WIN)
1343 #if defined(OS_WIN) || defined(OS_MACOSX)
1344 // Enable tab discarding when system is under memory pressure.
1345 const char kEnableTabDiscarding
[] = "enable-tab-discarding";
1346 #endif // defined(OS_WIN) || defined(OS_MACOSX)
1348 #if defined(ENABLE_IPC_FUZZER)
1349 // Specifies the testcase used by the IPC fuzzer.
1350 const char kIpcFuzzerTestcase
[] = "ipc-fuzzer-testcase";
1353 #if defined(ENABLE_PRINT_PREVIEW) && !defined(OFFICIAL_BUILD)
1354 // Enables support to debug printing subsystem.
1355 const char kDebugPrint
[] = "debug-print";
1358 #if defined(ENABLE_TASK_MANAGER)
1359 // Enables the new implementation of the task manager.
1360 const char kEnableNewTaskManager
[] = "enable-new-task-manager";
1361 #endif // defined(ENABLE_TASK_MANAGER)
1363 bool AboutInSettingsEnabled() {
1364 return SettingsWindowEnabled() &&
1365 !base::CommandLine::ForCurrentProcess()->HasSwitch(
1366 ::switches::kDisableAboutInSettings
);
1369 bool MdDownloadsEnabled() {
1370 return base::CommandLine::ForCurrentProcess()->HasSwitch(
1371 ::switches::kEnableMaterialDesignDownloads
);
1374 bool MdSettingsEnabled() {
1375 return base::CommandLine::ForCurrentProcess()->HasSwitch(
1376 ::switches::kEnableMaterialDesignSettings
);
1379 bool MediaRouterEnabled() {
1380 return base::CommandLine::ForCurrentProcess()->HasSwitch(
1381 ::switches::kEnableMediaRouter
);
1384 bool PdfMaterialUIEnabled() {
1385 if (base::CommandLine::ForCurrentProcess()->HasSwitch(kEnablePdfMaterialUI
))
1388 if (base::CommandLine::ForCurrentProcess()->HasSwitch(kDisablePdfMaterialUI
))
1395 bool SettingsWindowEnabled() {
1396 #if defined(OS_CHROMEOS)
1397 return !base::CommandLine::ForCurrentProcess()->HasSwitch(
1398 ::switches::kDisableSettingsWindow
);
1400 return base::CommandLine::ForCurrentProcess()->HasSwitch(
1401 ::switches::kEnableSettingsWindow
);
1405 #if defined(OS_CHROMEOS)
1406 bool PowerOverlayEnabled() {
1407 return base::CommandLine::ForCurrentProcess()->HasSwitch(
1408 ::switches::kEnablePowerOverlay
);
1412 #if defined(ENABLE_TASK_MANAGER)
1413 bool NewTaskManagerEnabled() {
1414 return base::CommandLine::ForCurrentProcess()->HasSwitch(
1415 kEnableNewTaskManager
);
1417 #endif // defined(ENABLE_TASK_MANAGER)
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