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 // The URL that the webstore APIs download extensions from.
86 // Note: the URL must contain one '%s' for the extension ID.
87 const char kAppsGalleryDownloadURL
[] = "apps-gallery-download-url";
89 // The URL to use for the gallery link in the app launcher.
90 const char kAppsGalleryURL
[] = "apps-gallery-url";
92 // The update url used by gallery/webstore extensions.
93 const char kAppsGalleryUpdateURL
[] = "apps-gallery-update-url";
95 // Value of GAIA auth code for --force-app-mode.
96 const char kAppModeAuthCode
[] = "app-mode-auth-code";
98 // Value of OAuth2 refresh token for --force-app-mode.
99 const char kAppModeOAuth2Token
[] = "app-mode-oauth-token";
101 // Enables overriding the path for the default authentication extension.
102 const char kAuthExtensionPath
[] = "auth-ext-path";
104 // Whitelist for Negotiate Auth servers
105 const char kAuthServerWhitelist
[] = "auth-server-whitelist";
107 // A flag that is used to tell Chrome that it was launched automatically at
108 // computer startup and not by some user action.
109 const char kAutoLaunchAtStartup
[] = "auto-launch-at-startup";
111 // This flag makes Chrome auto-select the provided choice when an extension asks
112 // permission to start desktop capture. Should only be used for tests. For
113 // instance, --auto-select-desktop-capture-source="Entire screen" will
114 // automatically select to share the entire screen in English locales.
115 const char kAutoSelectDesktopCaptureSource
[] =
116 "auto-select-desktop-capture-source";
118 // This flag causes the user engagement checks for showing app banners to be
119 // bypassed. It is intended to be used by developers who wish to test that their
120 // sites otherwise meet the criteria needed to show app banners.
121 const char kBypassAppBannerEngagementChecks
[] =
122 "bypass-app-banner-engagement-checks";
124 // Certificate Transparency: Uses the provided log(s) for checking Signed
125 // Certificate Timestamps provided with certificates.
126 // The switch's value is:
127 // log_description:log_key:log_url,log_description:log_key:log_url,...
129 // log_description is a textual description of the log.
130 // log_key is a Base64'd DER-encoded SubjectPublicKeyInfo of the log's
132 // log_url is a URL for the log, excluding the schema (which is always
133 // assumed to be HTTPS as required by RFC6962).
134 // Multiple logs can be specified by repeating description:key pairs,
135 // separated by a comma.
136 const char kCertificateTransparencyLog
[] =
137 "certificate-transparency-log";
139 // How often (in seconds) to check for updates. Should only be used for testing
141 const char kCheckForUpdateIntervalSec
[] = "check-for-update-interval";
143 // Comma-separated list of SSL cipher suites to disable.
144 const char kCipherSuiteBlacklist
[] = "cipher-suite-blacklist";
146 // Tells chrome to display the cloud print dialog and upload the specified file
148 const char kCloudPrintFile
[] = "cloud-print-file";
150 // Specifies the mime type to be used when uploading data from the file
151 // referenced by cloud-print-file. Defaults to "application/pdf" if
153 const char kCloudPrintFileType
[] = "cloud-print-file-type";
155 // Used with kCloudPrintFile to specify a JSON print ticket for the resulting
156 // print job. Defaults to null if unspecified.
157 const char kCloudPrintPrintTicket
[] = "cloud-print-print-ticket";
159 // Used with kCloudPrintFile to specify a title for the resulting print job.
160 const char kCloudPrintJobTitle
[] = "cloud-print-job-title";
162 // Setup cloud print proxy for provided printers. This does not start
163 // service or register proxy for autostart.
164 const char kCloudPrintSetupProxy
[] = "cloud-print-setup-proxy";
166 // Comma-separated list of BrowserThreads that cause browser process to crash
167 // if the given browser thread is not responsive. UI,IO,DB,FILE,CACHE are the
168 // list of BrowserThreads that are supported.
171 // --crash-on-hang-threads=UI:3:18,IO:3:18 --> Crash the browser if UI or IO
172 // is not responsive for 18 seconds and the number of browser threads that
173 // are responding is less than or equal to 3.
174 const char kCrashOnHangThreads
[] = "crash-on-hang-threads";
176 // Some platforms like ChromeOS default to empty desktop.
177 // Browser tests may need to add this switch so that at least one browser
178 // instance is created on startup.
179 // TODO(nkostylev): Investigate if this switch could be removed.
180 // (http://crbug.com/148675)
181 const char kCreateBrowserOnStartupForTests
[] =
182 "create-browser-on-startup-for-tests";
184 // Enables a frame context menu item that toggles the frame in and out of glass
185 // mode (Windows Vista and up only).
186 const char kDebugEnableFrameToggle
[] = "debug-enable-frame-toggle";
188 // Adds debugging entries such as Inspect Element to context menus of packed
190 const char kDebugPackedApps
[] = "debug-packed-apps";
192 // Triggers a plethora of diagnostic modes.
193 const char kDiagnostics
[] = "diagnostics";
195 // Sets the output format for diagnostic modes enabled by diagnostics flag.
196 const char kDiagnosticsFormat
[] = "diagnostics-format";
198 // Tells the diagnostics mode to do the requested recovery step(s).
199 const char kDiagnosticsRecovery
[] = "diagnostics-recovery";
201 // When kEnableSettingsWindow is used, About is shown as an overlay in Settings
202 // instead of as a separate page, unless this flag is specified.
203 const char kDisableAboutInSettings
[] = "disable-about-in-settings";
205 // Disables the display of a banner allowing the user to add a web
206 // app to their shelf (or platform-specific equivalent)
207 const char kDisableAddToShelf
[] = "disable-add-to-shelf";
209 // Disables the experimental asynchronous DNS client.
210 const char kDisableAsyncDns
[] = "disable-async-dns";
212 // Disable several subsystems which run network requests in the background.
213 // This is for use when doing network performance testing to avoid noise in the
215 const char kDisableBackgroundNetworking
[] = "disable-background-networking";
217 // Disables the bundled PPAPI version of Flash.
218 const char kDisableBundledPpapiFlash
[] = "disable-bundled-ppapi-flash";
220 // Disable hardware encoding support for Cast Streaming.
221 const char kDisableCastStreamingHWEncoding
[] =
222 "disable-cast-streaming-hw-encoding";
224 // Disables detection of child accounts.
225 const char kDisableChildAccountDetection
[] =
226 "disable-child-account-detection";
228 // Disables the client-side phishing detection feature. Note that even if
229 // client-side phishing detection is enabled, it will only be active if the
230 // user has opted in to UMA stats and SafeBrowsing is enabled in the
232 const char kDisableClientSidePhishingDetection
[] =
233 "disable-client-side-phishing-detection";
235 // Disable default component extensions with background pages - useful for
236 // performance tests where these pages may interfere with perf results.
237 const char kDisableComponentExtensionsWithBackgroundPages
[] =
238 "disable-component-extensions-with-background-pages";
240 const char kDisableComponentUpdate
[] = "disable-component-update";
242 // Disables installation of default apps on first run. This is used during
243 // automated testing.
244 const char kDisableDefaultApps
[] = "disable-default-apps";
246 // Disables device discovery notifications.
247 const char kDisableDeviceDiscoveryNotifications
[] =
248 "disable-device-discovery-notifications";
250 // Disables the dinosaur easter egg on the offline interstitial.
251 const char kDisableDinosaurEasterEgg
[] = "disable-dinosaur-easter-egg";
253 // Disables Domain Reliability Monitoring.
254 const char kDisableDomainReliability
[] = "disable-domain-reliability";
256 // Disable extensions.
257 const char kDisableExtensions
[] = "disable-extensions";
259 // Disable checking for user opt-in for extensions that want to inject script
260 // into file URLs (ie, always allow it). This is used during automated testing.
261 const char kDisableExtensionsFileAccessCheck
[] =
262 "disable-extensions-file-access-check";
264 // Disable the net::URLRequestThrottlerManager functionality for
265 // requests originating from extensions.
266 const char kDisableExtensionsHttpThrottling
[] =
267 "disable-extensions-http-throttling";
269 // Disable field trial tests configured in fieldtrial_testing_config.json.
270 const char kDisableFieldTrialTestingConfig
[] = "disable-field-trial-config";
272 // Disables the Material Design version of chrome://downloads.
273 const char kDisableMaterialDesignDownloads
[] = "disable-md-downloads";
275 // Disable the behavior that the second click on a launcher item (the click when
276 // the item is already active) minimizes the item.
277 const char kDisableMinimizeOnSecondLauncherItemClick
[] =
278 "disable-minimize-on-second-launcher-item-click";
280 // Disables the new bookmark app system.
281 const char kDisableNewBookmarkApps
[] = "disable-new-bookmark-apps";
283 // Disables showing popular sites on the NTP.
284 const char kDisableNTPPopularSites
[] = "disable-ntp-popular-sites";
286 // Disable auto-reload of error pages if offline.
287 const char kDisableOfflineAutoReload
[] = "disable-offline-auto-reload";
289 // Disable only auto-reloading error pages when the tab is visible.
290 const char kDisableOfflineAutoReloadVisibleOnly
[] =
291 "disable-offline-auto-reload-visible-only";
293 // Disable out-of-process V8 proxy resolver.
294 const char kDisableOutOfProcessPac
[] = "disable-out-of-process-pac";
296 // Disable the setting to prompt the user for their OS account password before
297 // revealing plaintext passwords in the password manager.
298 const char kDisablePasswordManagerReauthentication
[] =
299 "disable-password-manager-reauthentication";
301 // Disable the new material UI - requires out of process PDF plugin.
302 const char kDisablePdfMaterialUI
[] = "disable-pdf-material-ui";
304 // Don't use bubbles for content permissions requests instead of infobars.
305 const char kDisablePermissionsBubbles
[] = "disable-permissions-bubbles";
307 // Disable pop-up blocking.
308 const char kDisablePopupBlocking
[] = "disable-popup-blocking";
310 // Disable speculative TCP/IP preconnection.
311 const char kDisablePreconnect
[] = "disable-preconnect";
313 // Disables print preview (For testing, and for users who don't like us. :[ )
314 const char kDisablePrintPreview
[] = "disable-print-preview";
316 // Normally when the user attempts to navigate to a page that was the result of
317 // a post we prompt to make sure they want to. This switch may be used to
318 // disable that check. This switch is used during automated testing.
319 const char kDisablePromptOnRepost
[] = "disable-prompt-on-repost";
321 // Disables support for the QUIC protocol.
322 const char kDisableQuic
[] = "disable-quic";
324 // Disable use of Chromium's port selection for the ephemeral port via bind().
325 // This only has an effect if QUIC protocol is enabled.
326 const char kDisableQuicPortSelection
[] = "disable-quic-port-selection";
328 // Prevents the save password bubble from being enabled.
329 const char kDisableSavePasswordBubble
[] = "disable-save-password-bubble";
331 // Prevents SDCH persistence from being used.
332 const char kDisableSdchPersistence
[] = "disable-sdch-persistence";
334 // Disables using bubbles for session restore request.
335 const char kDisableSessionCrashedBubble
[] = "disable-session-crashed-bubble";
337 // Disables the Site Engagement service, which records interaction with sites
338 // and allocates certain resources accordingly.
339 const char kDisableSiteEngagementService
[] = "disable-site-engagement-service";
341 // Disables the suggestions service.
342 const char kDisableSuggestionsService
[] = "disable-suggestions-service";
344 // Disables syncing browser data to a Google Account.
345 const char kDisableSync
[] = "disable-sync";
347 // Disables syncing one or more sync data types that are on by default.
348 // See sync/internal_api/public/base/model_type.h for possible types. Types
349 // should be comma separated, and follow the naming convention for string
350 // representation of model types, e.g.:
351 // --disable-synctypes='Typed URLs, Bookmarks, Autofill Profiles'
352 const char kDisableSyncTypes
[] = "disable-sync-types";
354 // Disables the backend service for web resources.
355 const char kDisableWebResources
[] = "disable-web-resources";
357 // Some tests seem to require the application to close when the last
358 // browser window is closed. Thus, we need a switch to force this behavior
359 // for ChromeOS Aura, disable "zero window mode".
360 // TODO(pkotwicz): Investigate if this bug can be removed.
361 // (http://crbug.com/119175)
362 const char kDisableZeroBrowsersOpenForTests
[] =
363 "disable-zero-browsers-open-for-tests";
365 // Use a specific disk cache location, rather than one derived from the
367 const char kDiskCacheDir
[] = "disk-cache-dir";
369 // Forces the maximum disk space to be used by the disk cache, in bytes.
370 const char kDiskCacheSize
[] = "disk-cache-size";
372 const char kDnsLogDetails
[] = "dns-log-details";
374 // Disables prefetching of DNS information.
375 const char kDnsPrefetchDisable
[] = "dns-prefetch-disable";
377 // Requests that a running browser process dump its collected histograms to a
378 // given file. The file is overwritten if it exists.
379 const char kDumpBrowserHistograms
[] = "dump-browser-histograms";
381 // Overrides the path of Easy Unlock component app.
382 const char kEasyUnlockAppPath
[] = "easy-unlock-app-path";
384 // Enables the display of a banner allowing the user to add a web
385 // app to their shelf (or platform-specific equivalent)
386 const char kEnableAddToShelf
[] = "enable-add-to-shelf";
388 // Enable OS integration for Chrome app file associations.
389 const char kEnableAppsFileAssociations
[] = "enable-apps-file-associations";
391 // Enables the benchmarking extensions.
392 const char kEnableBenchmarking
[] = "enable-benchmarking";
394 // Enables the multi-level undo system for bookmarks.
395 const char kEnableBookmarkUndo
[] = "enable-bookmark-undo";
397 // Enables detection of child accounts.
398 const char kEnableChildAccountDetection
[] =
399 "enable-child-account-detection";
401 // If true, the clear browsing data dialog will show data volume counters,
403 const char kEnableClearBrowsingDataCounters
[] =
404 "enable-clear-browsing-data-counters";
406 // This applies only when the process type is "service". Enables the Cloud
407 // Print Proxy component within the service process.
408 const char kEnableCloudPrintProxy
[] = "enable-cloud-print-proxy";
410 // If true devtools experimental settings are enabled.
411 const char kEnableDevToolsExperiments
[] = "enable-devtools-experiments";
413 // Enable device discovery notifications.
414 const char kEnableDeviceDiscoveryNotifications
[] =
415 "enable-device-discovery-notifications";
417 // Enables Domain Reliability Monitoring.
418 const char kEnableDomainReliability
[] = "enable-domain-reliability";
420 // Download Notification. (value is "", "enabled" or "disabled")
421 const char kEnableDownloadNotification
[] = "enable-download-notification";
423 // Enables experimentation with ephemeral apps to be launched from the webstore.
424 const char kEnableEphemeralAppsInWebstore
[] =
425 "enable-ephemeral-apps-in-webstore";
427 // Enables experimental hotword features specific to always-on.
428 const char kEnableExperimentalHotwordHardware
[] = "enable-hotword-hardware";
430 // Enables logging for extension activity.
431 const char kEnableExtensionActivityLogging
[] =
432 "enable-extension-activity-logging";
434 const char kEnableExtensionActivityLogTesting
[] =
435 "enable-extension-activity-log-testing";
437 // Enable the fast unload controller, which speeds up tab/window close by
438 // running a tab's onunload js handler independently of the GUI -
439 // crbug.com/142458 .
440 const char kEnableFastUnload
[] = "enable-fast-unload";
442 // Enables support for the QUIC protocol for insecure schemes (http://).
443 // This is a temporary testing flag.
444 const char kEnableInsecureQuic
[] = "enable-insecure-quic";
446 // Enables the Material Design version of chrome://downloads.
447 const char kEnableMaterialDesignDownloads
[] = "enable-md-downloads";
449 // Enables the material design Settings feature.
450 const char kEnableMaterialDesignSettings
[] = "enable-md-settings";
452 // Enables Media Router.
453 const char kEnableMediaRouter
[] = "enable-media-router";
455 // Runs the Native Client inside the renderer process and enables GPU plugin
456 // (internally adds lEnableGpuPlugin to the command line).
457 const char kEnableNaCl
[] = "enable-nacl";
459 // Enables tracing for each navigation. It will attempt to trace each navigation
460 // for 10s, until the buffer is full, or until the next navigation.
461 // It only works if a URL was provided by --trace-upload-url.
462 const char kEnableNavigationTracing
[] = "enable-navigation-tracing";
464 // Enables the network-related benchmarking extensions.
465 const char kEnableNetBenchmarking
[] = "enable-net-benchmarking";
467 // Enables the new bookmark app system.
468 const char kEnableNewBookmarkApps
[] = "enable-new-bookmark-apps";
470 // Enables showing popular sites on the NTP.
471 const char kEnableNTPPopularSites
[] = "enable-ntp-popular-sites";
473 // Enable auto-reload of error pages if offline.
474 const char kEnableOfflineAutoReload
[] = "enable-offline-auto-reload";
476 // Only auto-reload error pages when the tab is visible.
477 const char kEnableOfflineAutoReloadVisibleOnly
[] =
478 "enable-offline-auto-reload-visible-only";
480 // Enables panels (always on-top docked pop-up windows).
481 const char kEnablePanels
[] = "enable-panels";
483 // Enable the new material UI - requires out of process PDF plugin.
484 const char kEnablePdfMaterialUI
[] = "enable-pdf-material-ui";
486 // Enables a number of potentially annoying security features (strict mixed
487 // content mode, powerful feature restrictions, etc.)
488 const char kEnablePotentiallyAnnoyingSecurityFeatures
[] =
489 "enable-potentially-annoying-security-features";
491 // Enables the Power overlay in Settings.
492 const char kEnablePowerOverlay
[] = "enable-power-overlay";
494 // Enables showing unregistered printers in print preview
495 const char kEnablePrintPreviewRegisterPromos
[] =
496 "enable-print-preview-register-promos";
498 // Enables tracking of tasks in profiler for viewing via about:profiler.
499 // To predominantly disable tracking (profiling), use the command line switch:
500 // --enable-profiling=0
501 // Some tracking will still take place at startup, but it will be turned off
502 // during chrome_browser_main.
503 const char kEnableProfiling
[] = "enable-profiling";
505 // Enable or disable background mode for the Push API.
506 const char kEnablePushApiBackgroundMode
[] = "enable-push-api-background-mode";
507 const char kDisablePushApiBackgroundMode
[] = "disable-push-api-background-mode";
509 // Enables support for the QUIC protocol. This is a temporary testing flag.
510 const char kEnableQuic
[] = "enable-quic";
512 // Enable use of Chromium's port selection for the ephemeral port via bind().
513 // This only has an effect if QUIC protocol is enabled.
514 const char kEnableQuicPortSelection
[] = "enable-quic-port-selection";
516 // Enables save password prompt bubble.
517 const char kEnableSavePasswordBubble
[] = "enable-save-password-bubble";
519 // Enables SDCH persistence.
520 const char kEnableSdchPersistence
[] = "enable-sdch-persistence";
522 // Enables using bubbles for session restore request instead of infobars.
523 const char kEnableSessionCrashedBubble
[] = "enable-session-crashed-bubble";
525 // Enable or disable settings in a separate browser window per profile
526 // (see SettingsWindowEnabled() below).
527 const char kEnableSettingsWindow
[] = "enable-settings-window";
528 const char kDisableSettingsWindow
[] = "disable-settings-window";
530 // A new user experience for transitioning into fullscreen and mouse pointer
532 const char kEnableSimplifiedFullscreenUI
[] = "enable-simplified-fullscreen-ui";
533 const char kDisableSimplifiedFullscreenUI
[] =
534 "disable-simplified-fullscreen-ui";
536 // Enable the Site Engagement service, which records interaction with sites and
537 // allocates certain resources accordingly.
538 const char kEnableSiteEngagementService
[] = "enable-site-engagement-service";
540 // Enables the suggestions service.
541 const char kEnableSuggestionsService
[] = "enable-suggestions-service";
543 // Enables the supervised user managed bookmarks folder.
544 const char kEnableSupervisedUserManagedBookmarksFolder
[] =
545 "enable-supervised-user-managed-bookmarks-folder";
547 // Enables user control over muting tab audio from the tab strip.
548 const char kEnableTabAudioMuting
[] = "enable-tab-audio-muting";
550 // Enables fanciful thumbnail processing. Used with NTP for
551 // instant-extended-api, where thumbnails are generally smaller.
552 const char kEnableThumbnailRetargeting
[] = "enable-thumbnail-retargeting";
554 // Enables Alternate-Protocol when the port is user controlled (> 1024).
555 const char kEnableUserAlternateProtocolPorts
[] =
556 "enable-user-controlled-alternate-protocol-ports";
558 // Enables a new "web app" style frame for hosted apps (including bookmark
560 const char kEnableWebAppFrame
[] = "enable-web-app-frame";
562 // Enables synchronizing WiFi credentials across devices, using Chrome Sync.
563 const char kEnableWifiCredentialSync
[] = "enable-wifi-credential-sync";
565 // Values for the kExtensionContentVerification flag.
566 // See ContentVerifierDelegate::Mode for more explanation.
567 const char kExtensionContentVerificationBootstrap
[] = "bootstrap";
568 const char kExtensionContentVerificationEnforceStrict
[] = "enforce_strict";
569 const char kExtensionContentVerificationEnforce
[] = "enforce";
571 // Name of the command line flag to force content verification to be on in one
573 const char kExtensionContentVerification
[] = "extension-content-verification";
575 // Turns on extension install verification if it would not otherwise have been
577 const char kExtensionsInstallVerification
[] = "extensions-install-verification";
579 // Specifies a comma-separated list of extension ids that should be forced to
580 // be treated as not from the webstore when doing install verification.
581 const char kExtensionsNotWebstore
[] = "extensions-not-webstore";
583 // Frequency in seconds for Extensions auto-update.
584 const char kExtensionsUpdateFrequency
[] = "extensions-update-frequency";
586 // If this flag is present then this command line is being delegated to an
587 // already running chrome process via the fast path, ie: before chrome.dll is
588 // loaded. It is useful to tell the difference for tracking purposes.
589 const char kFastStart
[] = "fast-start";
591 // These two flags are added around the switches about:flags adds to the
592 // command line. This is useful to see which switches were added by about:flags
593 // on about:version. They don't have any effect.
594 const char kFlagSwitchesBegin
[] = "flag-switches-begin";
595 const char kFlagSwitchesEnd
[] = "flag-switches-end";
597 // Forces application mode. This hides certain system UI elements and forces
598 // the app to be installed if it hasn't been already.
599 const char kForceAppMode
[] = "force-app-mode";
601 // This option can be used to force parameters of field trials when testing
602 // changes locally. The argument is a list of key/value pairs prefixed by
603 // Trial/Group pair. The following shows setting parameters to 2 experiments
604 // where in the first, it forces "id" to be "foo" for the "Enabled" group of
605 // the "EnhancedBookmarks" trial:
606 // "EnhancedBookmarks.Enabled:id/foo,Experiment2.Group1:key1/value1"
607 // Trial names, groups names, parameter names, and value should all be URL
608 // escaped for all non-alphanumeric characters.
609 const char kForceFieldTrialParams
[] = "force-fieldtrial-params";
611 // Displays the First Run experience when the browser is started, regardless of
612 // whether or not it's actually the First Run (this overrides kNoFirstRun).
613 const char kForceFirstRun
[] = "force-first-run";
615 // Forces additional Chrome Variation Ids that will be sent in X-Client-Data
616 // header, specified as a 64-bit encoded list of numeric experiment ids. Ids
617 // prefixed with the character "t" will be treated as Trigger Variation Ids.
618 const char kForceVariationIds
[] = "force-variation-ids";
620 // Forces Chrome to use localNTP instead of server (GWS) NTP.
621 const char kForceLocalNtp
[] = "force-local-ntp";
623 // Enables grouping websites by domain and filtering them by period.
624 const char kHistoryEnableGroupByDomain
[] = "enable-grouped-history";
626 // Specifies which page will be displayed in newly-opened tabs. We need this
627 // for testing purposes so that the UI tests don't depend on what comes up for
628 // http://google.com.
629 const char kHomePage
[] = "homepage";
631 // Comma-separated list of rules that control how hostnames are mapped.
634 // "MAP * 127.0.0.1" --> Forces all hostnames to be mapped to 127.0.0.1
635 // "MAP *.google.com proxy" --> Forces all google.com subdomains to be
636 // resolved to "proxy".
637 // "MAP test.com [::1]:77 --> Forces "test.com" to resolve to IPv6 loopback.
638 // Will also force the port of the resulting
639 // socket address to be 77.
640 // "MAP * baz, EXCLUDE www.google.com" --> Remaps everything to "baz",
641 // except for "www.google.com".
643 // These mappings apply to the endpoint host in a net::URLRequest (the TCP
644 // connect and host resolver in a direct connection, and the CONNECT in an http
645 // proxy connection, and the endpoint host in a SOCKS proxy connection).
646 const char kHostRules
[] = "host-rules";
648 // The maximum number of retry attempts to resolve the host. Set this to zero
649 // to disable host resolver retry attempts.
650 const char kHostResolverRetryAttempts
[] = "host-resolver-retry-attempts";
652 // Causes net::URLFetchers to ignore requests for SSL client certificates,
653 // causing them to attempt an unauthenticated SSL/TLS session. This is intended
654 // for use when testing various service URLs (eg: kPromoServerURL, kSbURLPrefix,
655 // kSyncServiceURL, etc)
656 const char kIgnoreUrlFetcherCertRequests
[] =
657 "ignore-urlfetcher-cert-requests";
659 // Causes the browser to launch directly in incognito mode.
660 const char kIncognito
[] = "incognito";
662 // Causes Chrome to initiate an installation flow for the given app.
663 const char kInstallChromeApp
[] = "install-chrome-app";
665 // A list of whitelists to install for a supervised user, for testing.
666 // The list is of the following form: <id>[:<name>],[<id>[:<name>],...]
667 const char kInstallSupervisedUserWhitelists
[] =
668 "install-supervised-user-whitelists";
670 // Marks a renderer as an Instant process.
671 const char kInstantProcess
[] = "instant-process";
673 // Invalidation service should use GCM network channel even if experiment is not
675 const char kInvalidationUseGCMChannel
[] = "invalidation-use-gcm-channel";
677 // Disable latest shipping ECMAScript 6 features.
678 const char kDisableJavaScriptHarmonyShipping
[] =
679 "disable-javascript-harmony-shipping";
681 // Enables experimental Harmony (ECMAScript 6) features.
682 const char kJavaScriptHarmony
[] = "javascript-harmony";
684 // Dumps IPC messages sent from renderer processes to the browser process to
685 // the given directory. Used primarily to gather samples for IPC fuzzing.
686 const char kIpcDumpDirectory
[] = "ipc-dump-directory";
688 // Used for testing - keeps browser alive after last browser window closes.
689 const char kKeepAliveForTest
[] = "keep-alive-for-test";
691 // Enable Kiosk mode.
692 const char kKioskMode
[] = "kiosk";
694 // Print automatically in kiosk mode. |kKioskMode| must be set as well.
695 // See http://crbug.com/31395.
696 const char kKioskModePrinting
[] = "kiosk-printing";
698 // Comma-separated list of directories with component extensions to load.
699 const char kLoadComponentExtension
[] = "load-component-extension";
701 // Loads an extension from the specified directory.
702 const char kLoadExtension
[] = "load-extension";
704 #if !defined(OFFICIAL_BUILD)
705 // Enables a live-reload for local NTP resources. This only works when Chrome
706 // is running from a Chrome source directory.
707 const char kLocalNtpReload
[] = "local-ntp-reload";
710 // Makes Chrome default browser
711 const char kMakeDefaultBrowser
[] = "make-default-browser";
713 // Use to opt-in to marking HTTP as non-secure.
714 const char kMarkNonSecureAs
[] = "mark-non-secure-as";
715 const char kMarkNonSecureAsNeutral
[] = "neutral";
716 const char kMarkNonSecureAsNonSecure
[] = "non-secure";
718 // Forces the maximum disk space to be used by the media cache, in bytes.
719 const char kMediaCacheSize
[] = "media-cache-size";
721 // Enables histograming of tasks served by MessageLoop. See
722 // about:histograms/Loop for results, which show frequency of messages on each
723 // thread, including APC count, object signalling count, etc.
724 const char kMessageLoopHistogrammer
[] = "message-loop-histogrammer";
726 // Enables the recording of metrics reports but disables reporting. In contrast
727 // to kDisableMetrics, this executes all the code that a normal client would
728 // use for reporting, except the report is dropped rather than sent to the
729 // server. This is useful for finding issues in the metrics code during UI and
730 // performance tests.
731 const char kMetricsRecordingOnly
[] = "metrics-recording-only";
733 // Allows setting a different destination ID for connection-monitoring GCM
734 // messages. Useful when running against a non-prod management server.
735 const char kMonitoringDestinationID
[] = "monitoring-destination-id";
737 // Sets the granularity of events to capture in the network log. The mode can be
738 // set to one of the following values:
740 // "IncludeCookiesAndCredentials"
741 // "IncludeSocketBytes"
743 // See the functions of the corresponding name in net_log_capture_mode.h for a
744 // description of their meaning.
745 const char kNetLogCaptureMode
[] = "net-log-capture-mode";
747 // Disables the default browser check. Useful for UI/browser tests where we
748 // want to avoid having the default browser info-bar displayed.
749 const char kNoDefaultBrowserCheck
[] = "no-default-browser-check";
751 // By default, an https page can load images, fonts or frames from an http
752 // page. This switch overrides this to block this lesser mixed-content problem.
753 const char kNoDisplayingInsecureContent
[] = "no-displaying-insecure-content";
755 // Disables all experiments set on about:flags. Does not disable about:flags
756 // itself. Useful if an experiment makes chrome crash at startup: One can start
757 // chrome with --no-experiments, disable the problematic lab at about:flags and
758 // then restart chrome without this switch again.
759 const char kNoExperiments
[] = "no-experiments";
761 // Skip First Run tasks, whether or not it's actually the First Run. Overridden
762 // by kForceFirstRun. This does not drop the First Run sentinel and thus doesn't
763 // prevent first run from occuring the next time chrome is launched without this
765 const char kNoFirstRun
[] = "no-first-run";
767 // Don't send hyperlink auditing pings
768 const char kNoPings
[] = "no-pings";
770 // Don't use a proxy server, always make direct connections. Overrides any
771 // other proxy server flags that are passed.
772 const char kNoProxyServer
[] = "no-proxy-server";
774 // Disables the service process from adding itself as an autorun process. This
775 // does not delete existing autorun registrations, it just prevents the service
776 // from registering a new one.
777 const char kNoServiceAutorun
[] = "no-service-autorun";
779 // Does not automatically open a browser window on startup (used when
780 // launching Chrome for the purpose of hosting background apps).
781 const char kNoStartupWindow
[] = "no-startup-window";
783 // Disables checking whether we received an acknowledgment when registering
784 // a supervised user. Also disables the timeout during registration that waits
785 // for the ack. Useful when debugging against a server that does not
786 // support notifications.
787 const char kNoSupervisedUserAcknowledgmentCheck
[] =
788 "no-managed-user-acknowledgment-check";
790 // Specifies the maximum number of threads to use for running the Proxy
791 // Autoconfig (PAC) script.
792 const char kNumPacThreads
[] = "num-pac-threads";
794 // Launches URL in new browser window.
795 const char kOpenInNewWindow
[] = "new-window";
797 // Force use of QUIC for requests to the specified origin.
798 const char kOriginToForceQuicOn
[] = "origin-to-force-quic-on";
800 // The time that a new chrome process which is delegating to an already running
801 // chrome process started. (See ProcessSingleton for more details.)
802 const char kOriginalProcessStartTime
[] = "original-process-start-time";
804 // Packages an extension to a .crx installable file from a given directory.
805 const char kPackExtension
[] = "pack-extension";
807 // Optional PEM private key to use in signing packaged .crx.
808 const char kPackExtensionKey
[] = "pack-extension-key";
810 // Specifies the path to the user data folder for the parent profile.
811 const char kParentProfile
[] = "parent-profile";
813 // Development flag for permission request API. This flag is needed until
814 // the API is finalized.
815 // TODO(bauerb): Remove when this flag is not needed anymore.
816 const char kPermissionRequestApiScope
[] = "permission-request-api-scope";
818 // Development flag for permission request API. This flag is needed until
819 // the API is finalized.
820 // TODO(bauerb): Remove when this flag is not needed anymore.
821 const char kPermissionRequestApiUrl
[] = "permission-request-api-url";
823 // Use the PPAPI (Pepper) Flash found at the given path.
824 const char kPpapiFlashPath
[] = "ppapi-flash-path";
826 // Report the given version for the PPAPI (Pepper) Flash. The version should be
827 // numbers separated by '.'s (e.g., "12.3.456.78"). If not specified, it
828 // defaults to "10.2.999.999".
829 const char kPpapiFlashVersion
[] = "ppapi-flash-version";
831 // Triggers prerendering of pages from suggestions in the omnibox. Only has an
832 // effect when Instant is either disabled or restricted to search, and when
833 // prerender is enabled.
834 const char kPrerenderFromOmnibox
[] = "prerender-from-omnibox";
835 // These are the values the kPrerenderFromOmnibox switch may have, as in
836 // "--prerender-from-omnibox=auto". auto: Allow field trial selection.
837 const char kPrerenderFromOmniboxSwitchValueAuto
[] = "auto";
838 // disabled: No prerendering.
839 const char kPrerenderFromOmniboxSwitchValueDisabled
[] = "disabled";
840 // enabled: Guaranteed prerendering.
841 const char kPrerenderFromOmniboxSwitchValueEnabled
[] = "enabled";
842 // Controls speculative prerendering of pages, and content prefetching. Both
843 // are dispatched from <link rel=prefetch href=...> elements.
844 const char kPrerenderMode
[] = "prerender";
845 // These are the values the kPrerenderMode switch may have, as in
846 // "--prerender=disabled".
847 // disabled: No prerendering.
848 const char kPrerenderModeSwitchValueDisabled
[] = "disabled";
849 // enabled: Prerendering.
850 const char kPrerenderModeSwitchValueEnabled
[] = "enabled";
852 // Use IPv6 only for privet HTTP.
853 const char kPrivetIPv6Only
[] = "privet-ipv6-only";
855 // Outputs the product version information and quit. Used as an internal api to
856 // detect the installed version of Chrome on Linux.
857 const char kProductVersion
[] = "product-version";
859 // Selects directory of profile to associate with the first browser launched.
860 const char kProfileDirectory
[] = "profile-directory";
862 // Starts the sampling based profiler for the browser process at startup. This
863 // will only work if chrome has been built with the gyp variable profiling=1.
864 // The output will go to the value of kProfilingFile.
865 const char kProfilingAtStart
[] = "profiling-at-start";
867 // Specifies a location for profiling output. This will only work if chrome has
868 // been built with the gyp variable profiling=1.
870 // {pid} if present will be replaced by the pid of the process.
871 // {count} if present will be incremented each time a profile is generated
873 // The default is chrome-profile-{pid}.
874 const char kProfilingFile
[] = "profiling-file";
876 // Controls whether profile data is periodically flushed to a file. Normally
877 // the data gets written on exit but cases exist where chrome doesn't exit
878 // cleanly (especially when using single-process). A time in seconds can be
880 const char kProfilingFlush
[] = "profiling-flush";
882 // Forces proxy auto-detection.
883 const char kProxyAutoDetect
[] = "proxy-auto-detect";
885 // Specifies a list of hosts for whom we bypass proxy settings and use direct
886 // connections. Ignored if --proxy-auto-detect or --no-proxy-server are also
887 // specified. This is a comma-separated list of bypass rules. See:
888 // "net/proxy/proxy_bypass_rules.h" for the format of these rules.
889 const char kProxyBypassList
[] = "proxy-bypass-list";
891 // Uses the pac script at the given URL
892 const char kProxyPacUrl
[] = "proxy-pac-url";
894 // Uses a specified proxy server, overrides system settings. This switch only
895 // affects HTTP and HTTPS requests.
896 const char kProxyServer
[] = "proxy-server";
898 // Specifies a comma separated list of QUIC connection options to send to
900 const char kQuicConnectionOptions
[] = "quic-connection-options";
902 // Specifies the maximum length for a QUIC packet.
903 const char kQuicMaxPacketLength
[] = "quic-max-packet-length";
905 // Specifies the version of QUIC to use.
906 const char kQuicVersion
[] = "quic-version";
908 // Porvides a list of addresses to discover DevTools remote debugging targets.
909 // The format is <host>:<port>,...,<host>:port.
910 const char kRemoteDebuggingTargets
[] = "remote-debugging-targets";
912 // Indicates the last session should be restored on startup. This overrides the
913 // preferences value and is primarily intended for testing. The value of this
914 // switch is the number of tabs to wait until loaded before 'load completed' is
915 // sent to the ui_test.
916 const char kRestoreLastSession
[] = "restore-last-session";
918 // Causes all iframes to be denied all permissions by default. Allowing
919 // particular permissions for an iframe may involve listing the names of
920 // these permissions as values of new iframe attributes.
921 const char kRestrictIFramePermissions
[] = "restrict-iframe-permissions";
923 // Disable saving pages as HTML-only, disable saving pages as HTML Complete
924 // (with a directory of sub-resources). Enable only saving pages as MHTML.
925 // See http://crbug.com/120416 for how to remove this switch.
926 const char kSavePageAsMHTML
[] = "save-page-as-mhtml";
928 // If present, safebrowsing only performs update when
929 // SafeBrowsingProtocolManager::ForceScheduleNextUpdate() is explicitly called.
930 // This is used for testing only.
931 const char kSbDisableAutoUpdate
[] = "safebrowsing-disable-auto-update";
933 // TODO(lzheng): Remove this flag once the feature works fine
934 // (http://crbug.com/74848).
936 // Disables safebrowsing feature that checks download url and downloads
937 // content's hash to make sure the content are not malicious.
938 const char kSbDisableDownloadProtection
[] =
939 "safebrowsing-disable-download-protection";
941 // Disables safebrowsing feature that checks for blacklisted extensions.
942 const char kSbDisableExtensionBlacklist
[] =
943 "safebrowsing-disable-extension-blacklist";
945 // Causes the process to run as a service process.
946 const char kServiceProcess
[] = "service";
948 // If true the app list will be shown.
949 const char kShowAppList
[] = "show-app-list";
951 // Command line flag offering a "Show saved copy" option to the user if offline.
952 // The various modes are disabled, primary, or secondary. Primary/secondary
953 // refers to button placement (for experiment).
954 const char kShowSavedCopy
[] = "show-saved-copy";
956 // Values for the kShowSavedCopy flag.
957 const char kEnableShowSavedCopyPrimary
[] = "primary";
958 const char kEnableShowSavedCopySecondary
[] = "secondary";
959 const char kDisableShowSavedCopy
[] = "disable";
961 // Does not show an infobar when an extension attaches to a page using
962 // chrome.debugger page. Required to attach to extension background pages.
963 const char kSilentDebuggerExtensionAPI
[] = "silent-debugger-extension-api";
965 // Causes Chrome to launch without opening any windows by default. Useful if
966 // one wishes to use Chrome as an ash server.
967 const char kSilentLaunch
[] = "silent-launch";
969 // Simulates that elevation is needed to recover upgrade channel.
970 const char kSimulateElevatedRecovery
[] = "simulate-elevated-recovery";
972 // Simulates a critical update being available.
973 const char kSimulateCriticalUpdate
[] = "simulate-critical-update";
975 // Simulates that current version is outdated.
976 const char kSimulateOutdated
[] = "simulate-outdated";
978 // Simulates that current version is outdated and auto-update is off.
979 const char kSimulateOutdatedNoAU
[] = "simulate-outdated-no-au";
981 // Simulates an update being available.
982 const char kSimulateUpgrade
[] = "simulate-upgrade";
984 // Speculative resource prefetching.
985 const char kSpeculativeResourcePrefetching
[] =
986 "speculative-resource-prefetching";
988 // Speculative resource prefetching is disabled.
989 const char kSpeculativeResourcePrefetchingDisabled
[] = "disabled";
991 // Speculative resource prefetching will only learn about resources that need to
992 // be prefetched but will not prefetch them.
993 const char kSpeculativeResourcePrefetchingLearning
[] = "learning";
995 // Speculative resource prefetching is enabled.
996 const char kSpeculativeResourcePrefetchingEnabled
[] = "enabled";
998 #if defined(ENABLE_SPELLCHECK)
999 #if defined(OS_ANDROID)
1000 // Enables use of the Android spellchecker.
1001 const char kEnableAndroidSpellChecker
[] = "enable-android-spellchecker";
1004 // Enables the multilingual spellchecker.
1005 const char kEnableMultilingualSpellChecker
[] =
1006 "enable-multilingual-spellchecker";
1008 // Enables auto correction for misspelled words.
1009 const char kEnableSpellingAutoCorrect
[] = "enable-spelling-auto-correct";
1011 // Enables participation in the field trial for user feedback to spelling
1013 const char kEnableSpellingFeedbackFieldTrial
[] =
1014 "enable-spelling-feedback-field-trial";
1016 // Specifies the URL where spelling service feedback data will be sent instead
1017 // of the default URL. This switch is for temporary testing only.
1018 // TODO(rouslan): Remove this flag when feedback testing is complete. Revisit by
1020 const char kSpellingServiceFeedbackUrl
[] = "spelling-service-feedback-url";
1022 // Specifies the number of seconds between sending batches of feedback to
1023 // spelling service. The default is 30 minutes. The minimum is 5 seconds. This
1024 // switch is for temporary testing only.
1025 // TODO(rouslan): Remove this flag when feedback testing is complete. Revisit by
1027 const char kSpellingServiceFeedbackIntervalSeconds
[] =
1028 "spelling-service-feedback-interval-seconds";
1031 // Specifies the maximum SSL/TLS version ("tls1", "tls1.1", or "tls1.2").
1032 const char kSSLVersionMax
[] = "ssl-version-max";
1034 // Specifies the minimum SSL/TLS version ("tls1", "tls1.1", or "tls1.2").
1035 const char kSSLVersionMin
[] = "ssl-version-min";
1037 // Specifies the minimum SSL/TLS version ("tls1", "tls1.1", or "tls1.2") that
1038 // TLS fallback will accept.
1039 const char kSSLVersionFallbackMin
[] = "ssl-version-fallback-min";
1041 // These values aren't switches, but rather the values that kSSLVersionMax,
1042 // kSSLVersionMin and kSSLVersionFallbackMin can have.
1043 const char kSSLVersionTLSv1
[] = "tls1";
1044 const char kSSLVersionTLSv11
[] = "tls1.1";
1045 const char kSSLVersionTLSv12
[] = "tls1.2";
1047 // Starts the browser maximized, regardless of any previous settings.
1048 const char kStartMaximized
[] = "start-maximized";
1050 // Sets the supervised user ID for any loaded or newly created profile to the
1051 // given value. Pass an empty string to mark the profile as non-supervised.
1052 // Used for testing.
1053 const char kSupervisedUserId
[] = "managed-user-id";
1055 // Enables/disables SafeSites filtering for supervised users. Possible values
1056 // are "enabled", "disabled", "blacklist-only", and "online-check-only".
1057 const char kSupervisedUserSafeSites
[] = "supervised-user-safesites";
1059 // Used to authenticate requests to the Sync service for supervised users.
1060 // Setting this switch also causes Sync to be set up for a supervised user.
1061 const char kSupervisedUserSyncToken
[] = "managed-user-sync-token";
1063 // Frequency in Milliseconds for system log uploads. Should only be used for
1064 // testing purposes.
1065 const char kSystemLogUploadFrequency
[] = "system-log-upload-frequency";
1067 // Passes the name of the current running automated test to Chrome.
1068 const char kTestName
[] = "test-name";
1070 // Disables same-origin check on HTTP resources pushed via a SPDY proxy.
1071 // The value is the host:port of the trusted proxy.
1072 const char kTrustedSpdyProxy
[] = "trusted-spdy-proxy";
1074 // Experimental. Shows a dialog asking the user to try chrome. This flag is to
1075 // be used only by the upgrade process.
1076 const char kTryChromeAgain
[] = "try-chrome-again";
1078 // Overrides per-origin quota settings to unlimited storage for any
1079 // apps/origins. This should be used only for testing purpose.
1080 const char kUnlimitedStorage
[] = "unlimited-storage";
1082 // Treat given (insecure) origins as secure origins. Multiple origins can be
1083 // supplied. Has no effect unless --user-data-dir is also supplied.
1085 // --unsafely-treat-insecure-origin-as-secure=http://a.test,http://b.test
1086 // --user-data-dir=/test/only/profile/dir
1087 const char kUnsafelyTreatInsecureOriginAsSecure
[] =
1088 "unsafely-treat-insecure-origin-as-secure";
1090 // Uses Spdy for the transport protocol instead of HTTP. This is a temporary
1092 const char kUseSpdy
[] = "use-spdy";
1094 // A string used to override the default user agent with a custom one.
1095 const char kUserAgent
[] = "user-agent";
1097 // Specifies the user data directory, which is where the browser will look for
1098 // all of its state.
1099 const char kUserDataDir
[] = "user-data-dir";
1101 // Examines a .crx for validity and prints the result.
1102 const char kValidateCrx
[] = "validate-crx";
1104 // Uses experimental simple cache backend if possible.
1105 const char kUseSimpleCacheBackend
[] = "use-simple-cache-backend";
1107 // Enables using an in-process Mojo service for the v8 proxy resolver.
1108 const char kV8PacMojoInProcess
[] = "v8-pac-mojo-in-process";
1110 // Enables using an out-of-process Mojo service for the v8 proxy resolver.
1111 const char kV8PacMojoOutOfProcess
[] = "v8-pac-mojo-out-of-process";
1113 // Prints version information and quits.
1114 const char kVersion
[] = "version";
1116 // Specify the initial window position: --window-position=x,y
1117 const char kWindowPosition
[] = "window-position";
1119 // Specify the initial window size: --window-size=w,h
1120 const char kWindowSize
[] = "window-size";
1122 // Uses WinHTTP to fetch and evaluate PAC scripts. Otherwise the default is to
1123 // use Chromium's network stack to fetch, and V8 to evaluate.
1124 const char kWinHttpProxyResolver
[] = "winhttp-proxy-resolver";
1126 // Specifies which category option was clicked in the Windows Jumplist that
1127 // resulted in a browser startup.
1128 const char kWinJumplistAction
[] = "win-jumplist-action";
1130 #if defined(OS_ANDROID)
1131 // Android authentication account type for SPNEGO authentication
1132 const char kAuthAndroidNegotiateAccountType
[] = "auth-spnego-account-type";
1134 // Disables Contextual Search.
1135 const char kDisableContextualSearch
[] = "disable-contextual-search";
1137 // Enable the accessibility tab switcher.
1138 const char kEnableAccessibilityTabSwitcher
[] =
1139 "enable-accessibility-tab-switcher";
1141 // Enables Contextual Search.
1142 const char kEnableContextualSearch
[] = "enable-contextual-search";
1144 // Enables the DOM distiller animated button UI for Android.
1145 const char kEnableDomDistillerButtonAnimation
[] =
1146 "enable-dom-distiller-button-animation";
1148 // Enables chrome hosted mode for Android.
1149 const char kEnableHostedMode
[] = "enable-hosted-mode";
1151 // Enables context-sensitive reader mode button in the toolbar.
1152 const char kEnableReaderModeToolbarIcon
[] =
1153 "enable-reader-mode-toolbar-icon";
1155 // Specifies Android phone page loading progress bar animation.
1156 const char kProgressBarAnimation
[] = "progress-bar-animation";
1157 #endif // defined(OS_ANDROID)
1159 #if defined(USE_ASH)
1160 const char kOpenAsh
[] = "open-ash";
1163 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_CHROMEOS)
1164 // These flags show the man page on Linux. They are equivalent to each
1166 const char kHelp
[] = "help";
1167 const char kHelpShort
[] = "h";
1169 // Specifies which password store to use (detect, default, gnome, kwallet).
1170 const char kPasswordStore
[] = "password-store";
1173 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
1174 // Triggers migration of user data directory to another directory
1175 // specified as a parameter. The migration is done under singleton lock,
1176 // and sanity checks are made to avoid corrupting the profile.
1177 // The browser exits after migration is complete.
1178 const char kMigrateDataDirForSxS
[] = "migrate-data-dir-for-sxs";
1179 #endif // defined(OS_LINUX) && !defined(OS_CHROMEOS)
1181 #if defined(OS_MACOSX)
1182 // Prevents Chrome from quitting when Chrome Apps are open.
1183 const char kAppsKeepChromeAliveInTests
[] = "apps-keep-chrome-alive-in-tests";
1185 // Shows a notification when quitting Chrome with hosted apps running. Default
1186 // behavior is to also quit all hosted apps.
1187 const char kHostedAppQuitNotification
[] = "enable-hosted-app-quit-notification";
1189 // Disable the toolkit-views App Info dialog for Mac.
1190 const char kDisableAppInfoDialogMac
[] = "disable-app-info-dialog-mac";
1192 // Disables custom Cmd+` window cycling for platform apps and hosted apps.
1193 const char kDisableAppWindowCycling
[] = "disable-app-window-cycling";
1195 // Disables app shim creation for hosted apps on Mac.
1196 const char kDisableHostedAppShimCreation
[] = "disable-hosted-app-shim-creation";
1198 // Prevents hosted apps from being opened in windows on Mac.
1199 const char kDisableHostedAppsInWindows
[] = "disable-hosted-apps-in-windows";
1201 // Disables use of toolkit-views based native app windows.
1202 const char kDisableMacViewsNativeAppWindows
[] =
1203 "disable-mac-views-native-app-windows";
1205 // Disables Translate experimental new UX which replaces the infobar.
1206 const char kDisableTranslateNewUX
[] = "disable-translate-new-ux";
1208 // Enable the toolkit-views App Info dialog for Mac. This is accessible from
1209 // chrome://apps and chrome://extensions and is already enabled on non-mac.
1210 const char kEnableAppInfoDialogMac
[] = "enable-app-info-dialog-mac";
1212 // Enables custom Cmd+` window cycling for platform apps and hosted apps.
1213 const char kEnableAppWindowCycling
[] = "enable-app-window-cycling";
1215 // Allows hosted apps to be opened in windows on Mac.
1216 const char kEnableHostedAppsInWindows
[] = "enable-hosted-apps-in-windows";
1218 // Enables use of toolkit-views based native app windows.
1219 const char kEnableMacViewsNativeAppWindows
[] =
1220 "enable-mac-views-native-app-windows";
1222 // Causes Chrome to use an equivalent toolkit-views version of a browser dialog
1223 // when available, rather than a Cocoa one.
1224 const char kEnableMacViewsDialogs
[] = "enable-mac-views-dialogs";
1226 // Enables Translate experimental new UX which replaces the infobar.
1227 const char kEnableTranslateNewUX
[] = "enable-translate-new-ux";
1229 // This is how the metrics client ID is passed from the browser process to its
1230 // children. With Crashpad, the metrics client ID is distinct from the crash
1232 const char kMetricsClientID
[] = "metrics-client-id";
1234 // A process type (switches::kProcessType) that relaunches the browser. See
1235 // chrome/browser/mac/relauncher.h.
1236 const char kRelauncherProcess
[] = "relauncher";
1237 #endif // defined(OS_MACOSX)
1239 // Use bubbles for content permissions requests instead of infobars.
1240 const char kEnablePermissionsBubbles
[] = "enable-permissions-bubbles";
1243 // Fallback to XPS. By default connector uses CDD.
1244 const char kEnableCloudPrintXps
[] = "enable-cloud-print-xps";
1246 // Force-enables the profile shortcut manager. This is needed for tests since
1247 // they use a custom-user-data-dir which disables this.
1248 const char kEnableProfileShortcutManager
[] = "enable-profile-shortcut-manager";
1250 // For the DelegateExecute verb handler to launch Chrome in metro mode on
1251 // Windows 8 and higher. Used when relaunching metro Chrome.
1252 const char kForceImmersive
[] = "force-immersive";
1254 // Whether or not the browser should warn if the profile is on a network share.
1255 // This flag is only relevant for Windows currently.
1256 const char kNoNetworkProfileWarning
[] = "no-network-profile-warning";
1258 // For the DelegateExecute verb handler to launch Chrome in desktop mode on
1259 // Windows 8 and higher. Used when relaunching metro Chrome.
1260 const char kForceDesktop
[] = "force-desktop";
1262 // Makes Windows happy by allowing it to show "Enable access to this program"
1263 // checkbox in Add/Remove Programs->Set Program Access and Defaults. This only
1264 // shows an error box because the only way to hide Chrome is by uninstalling
1266 const char kHideIcons
[] = "hide-icons";
1268 // Relaunches metro Chrome on Windows 8 and higher using a given shortcut.
1269 const char kRelaunchShortcut
[] = "relaunch-shortcut";
1272 const char kShowIcons
[] = "show-icons";
1274 // Runs un-installation steps that were done by chrome first-run.
1275 const char kUninstall
[] = "uninstall";
1277 // Requests that Chrome launch the Metro viewer process via the given appid
1278 // (which is assumed to be registered as default browser) and synchronously
1280 const char kViewerLaunchViaAppId
[] = "viewer-launch-via-appid";
1282 // Waits for the given handle to be signaled before relaunching metro Chrome on
1283 // Windows 8 and higher.
1284 const char kWaitForMutex
[] = "wait-for-mutex";
1286 // Indicates that chrome was launched to service a search request in Windows 8.
1287 const char kWindows8Search
[] = "windows8-search";
1288 #endif // defined(OS_WIN)
1290 #if defined(OS_WIN) || defined(OS_MACOSX)
1291 // Enable tab discarding when system is under memory pressure.
1292 const char kEnableTabDiscarding
[] = "enable-tab-discarding";
1293 #endif // defined(OS_WIN) || defined(OS_MACOSX)
1295 #if defined(ENABLE_IPC_FUZZER)
1296 // Specifies the testcase used by the IPC fuzzer.
1297 const char kIpcFuzzerTestcase
[] = "ipc-fuzzer-testcase";
1300 #if defined(ENABLE_PRINT_PREVIEW) && !defined(OFFICIAL_BUILD)
1301 // Enables support to debug printing subsystem.
1302 const char kDebugPrint
[] = "debug-print";
1305 #if defined(ENABLE_TASK_MANAGER)
1306 // Disables the new implementation of the task manager.
1307 const char kDisableNewTaskManager
[] = "disable-new-task-manager";
1308 #endif // defined(ENABLE_TASK_MANAGER)
1310 bool AboutInSettingsEnabled() {
1311 return SettingsWindowEnabled() &&
1312 !base::CommandLine::ForCurrentProcess()->HasSwitch(
1313 ::switches::kDisableAboutInSettings
);
1316 bool MdSettingsEnabled() {
1317 return base::CommandLine::ForCurrentProcess()->HasSwitch(
1318 ::switches::kEnableMaterialDesignSettings
);
1321 bool MediaRouterEnabled() {
1322 return base::CommandLine::ForCurrentProcess()->HasSwitch(
1323 ::switches::kEnableMediaRouter
);
1326 bool PdfMaterialUIEnabled() {
1327 if (base::CommandLine::ForCurrentProcess()->HasSwitch(kEnablePdfMaterialUI
))
1330 if (base::CommandLine::ForCurrentProcess()->HasSwitch(kDisablePdfMaterialUI
))
1337 bool SettingsWindowEnabled() {
1338 #if defined(OS_CHROMEOS)
1339 return !base::CommandLine::ForCurrentProcess()->HasSwitch(
1340 ::switches::kDisableSettingsWindow
);
1342 return base::CommandLine::ForCurrentProcess()->HasSwitch(
1343 ::switches::kEnableSettingsWindow
);
1347 #if defined(OS_CHROMEOS)
1348 bool PowerOverlayEnabled() {
1349 return base::CommandLine::ForCurrentProcess()->HasSwitch(
1350 ::switches::kEnablePowerOverlay
);
1354 #if defined(ENABLE_TASK_MANAGER)
1355 bool NewTaskManagerEnabled() {
1356 return !base::CommandLine::ForCurrentProcess()->HasSwitch(
1357 kDisableNewTaskManager
);
1359 #endif // defined(ENABLE_TASK_MANAGER)
1361 // -----------------------------------------------------------------------------
1362 // DO NOT ADD YOUR CRAP TO THE BOTTOM OF THIS FILE.
1364 // You were going to just dump your switches here, weren't you? Instead, please
1365 // put them in alphabetical order above, or in order inside the appropriate
1366 // ifdef at the bottom. The order should match the header.
1367 // -----------------------------------------------------------------------------
1369 } // namespace switches