Revert "Reland c91b178b07b0d - Delete dead signin code (SigninGlobalError)"
[chromium-blink-merge.git] / chrome / common / chrome_switches.cc
blobd2f73c2e88aca4d549ebd1853edd81d7eb15fd3b
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/common/chrome_switches.h"
7 #include "base/base_switches.h"
8 #include "base/command_line.h"
10 namespace switches {
12 // -----------------------------------------------------------------------------
13 // Can't find the switch you are looking for? Try looking in:
14 // ash/ash_switches.cc
15 // base/base_switches.cc
16 // chromeos/chromeos_switches.cc
17 // etc.
19 // When commenting your switch, please use the same voice as surrounding
20 // comments. Imagine "This switch..." at the beginning of the phrase, and it'll
21 // all work out.
22 // -----------------------------------------------------------------------------
24 // Allows third-party content included on a page to prompt for a HTTP basic
25 // auth username/password pair.
26 const char kAllowCrossOriginAuthPrompt[] = "allow-cross-origin-auth-prompt";
28 // On ChromeOS, file:// access is disabled except for certain whitelisted
29 // directories. This switch re-enables file:// for testing.
30 const char kAllowFileAccess[] = "allow-file-access";
32 // Allow non-secure origins to use the screen capture API and the desktopCapture
33 // extension API.
34 const char kAllowHttpScreenCapture[] = "allow-http-screen-capture";
36 // Enables TLS/SSL errors on localhost to be ignored (no interstitial,
37 // no blocking of requests).
38 const char kAllowInsecureLocalhost[] = "allow-insecure-localhost";
40 #if defined(ENABLE_PLUGINS)
41 // Specifies comma-separated list of extension ids or hosts to grant
42 // access to CRX file system APIs.
43 const char kAllowNaClCrxFsAPI[] = "allow-nacl-crxfs-api";
45 // Specifies comma-separated list of extension ids or hosts to grant
46 // access to file handle APIs.
47 const char kAllowNaClFileHandleAPI[] = "allow-nacl-file-handle-api";
49 // Specifies comma-separated list of extension ids or hosts to grant
50 // access to TCP/UDP socket APIs.
51 const char kAllowNaClSocketAPI[] = "allow-nacl-socket-api";
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";
58 #endif
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"
82 // mode.
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,...
128 // where
129 // log_description is a textual description of the log.
130 // log_key is a Base64'd DER-encoded SubjectPublicKeyInfo of the log's
131 // public key.
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
140 // purposes.
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
147 // for printing.
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
152 // unspecified.
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.
170 // For example:
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
189 // apps.
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
214 // measurements.
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
231 // preferences.
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 // Disable the behavior that the second click on a launcher item (the click when
273 // the item is already active) minimizes the item.
274 const char kDisableMinimizeOnSecondLauncherItemClick[] =
275 "disable-minimize-on-second-launcher-item-click";
277 // Disables the new bookmark app system.
278 const char kDisableNewBookmarkApps[] = "disable-new-bookmark-apps";
280 // Disables showing popular sites on the NTP.
281 const char kDisableNTPPopularSites[] = "disable-ntp-popular-sites";
283 // Disable auto-reload of error pages if offline.
284 const char kDisableOfflineAutoReload[] = "disable-offline-auto-reload";
286 // Disable only auto-reloading error pages when the tab is visible.
287 const char kDisableOfflineAutoReloadVisibleOnly[] =
288 "disable-offline-auto-reload-visible-only";
290 // Disable out-of-process V8 proxy resolver.
291 const char kDisableOutOfProcessPac[] = "disable-out-of-process-pac";
293 // Disable the setting to prompt the user for their OS account password before
294 // revealing plaintext passwords in the password manager.
295 const char kDisablePasswordManagerReauthentication[] =
296 "disable-password-manager-reauthentication";
298 // Disable the new material UI - requires out of process PDF plugin.
299 const char kDisablePdfMaterialUI[] = "disable-pdf-material-ui";
301 // Don't use bubbles for content permissions requests instead of infobars.
302 const char kDisablePermissionsBubbles[] = "disable-permissions-bubbles";
304 // Disable pop-up blocking.
305 const char kDisablePopupBlocking[] = "disable-popup-blocking";
307 // Disable speculative TCP/IP preconnection.
308 const char kDisablePreconnect[] = "disable-preconnect";
310 // Disables print preview (For testing, and for users who don't like us. :[ )
311 const char kDisablePrintPreview[] = "disable-print-preview";
313 // Normally when the user attempts to navigate to a page that was the result of
314 // a post we prompt to make sure they want to. This switch may be used to
315 // disable that check. This switch is used during automated testing.
316 const char kDisablePromptOnRepost[] = "disable-prompt-on-repost";
318 // Disables support for the QUIC protocol.
319 const char kDisableQuic[] = "disable-quic";
321 // Disable use of Chromium's port selection for the ephemeral port via bind().
322 // This only has an effect if QUIC protocol is enabled.
323 const char kDisableQuicPortSelection[] = "disable-quic-port-selection";
325 // Prevents the save password bubble from being enabled.
326 const char kDisableSavePasswordBubble[] = "disable-save-password-bubble";
328 // Prevents SDCH persistence from being used.
329 const char kDisableSdchPersistence[] = "disable-sdch-persistence";
331 // Disables using bubbles for session restore request.
332 const char kDisableSessionCrashedBubble[] = "disable-session-crashed-bubble";
334 // Disables the Site Engagement service, which records interaction with sites
335 // and allocates certain resources accordingly.
336 const char kDisableSiteEngagementService[] = "disable-site-engagement-service";
338 // Disables the suggestions service.
339 const char kDisableSuggestionsService[] = "disable-suggestions-service";
341 // Disables syncing browser data to a Google Account.
342 const char kDisableSync[] = "disable-sync";
344 // Disables syncing one or more sync data types that are on by default.
345 // See sync/internal_api/public/base/model_type.h for possible types. Types
346 // should be comma separated, and follow the naming convention for string
347 // representation of model types, e.g.:
348 // --disable-synctypes='Typed URLs, Bookmarks, Autofill Profiles'
349 const char kDisableSyncTypes[] = "disable-sync-types";
351 // Disables the backend service for web resources.
352 const char kDisableWebResources[] = "disable-web-resources";
354 // Some tests seem to require the application to close when the last
355 // browser window is closed. Thus, we need a switch to force this behavior
356 // for ChromeOS Aura, disable "zero window mode".
357 // TODO(pkotwicz): Investigate if this bug can be removed.
358 // (http://crbug.com/119175)
359 const char kDisableZeroBrowsersOpenForTests[] =
360 "disable-zero-browsers-open-for-tests";
362 // Use a specific disk cache location, rather than one derived from the
363 // UserDatadir.
364 const char kDiskCacheDir[] = "disk-cache-dir";
366 // Forces the maximum disk space to be used by the disk cache, in bytes.
367 const char kDiskCacheSize[] = "disk-cache-size";
369 const char kDnsLogDetails[] = "dns-log-details";
371 // Disables prefetching of DNS information.
372 const char kDnsPrefetchDisable[] = "dns-prefetch-disable";
374 // Requests that a running browser process dump its collected histograms to a
375 // given file. The file is overwritten if it exists.
376 const char kDumpBrowserHistograms[] = "dump-browser-histograms";
378 // Overrides the path of Easy Unlock component app.
379 const char kEasyUnlockAppPath[] = "easy-unlock-app-path";
381 // Enables the display of a banner allowing the user to add a web
382 // app to their shelf (or platform-specific equivalent)
383 const char kEnableAddToShelf[] = "enable-add-to-shelf";
385 // Enable OS integration for Chrome app file associations.
386 const char kEnableAppsFileAssociations[] = "enable-apps-file-associations";
388 // Enables the benchmarking extensions.
389 const char kEnableBenchmarking[] = "enable-benchmarking";
391 // Enables the multi-level undo system for bookmarks.
392 const char kEnableBookmarkUndo[] = "enable-bookmark-undo";
394 // Enables detection of child accounts.
395 const char kEnableChildAccountDetection[] =
396 "enable-child-account-detection";
398 // If true, the clear browsing data dialog will show data volume counters,
399 // where available.
400 const char kEnableClearBrowsingDataCounters[] =
401 "enable-clear-browsing-data-counters";
403 // This applies only when the process type is "service". Enables the Cloud
404 // Print Proxy component within the service process.
405 const char kEnableCloudPrintProxy[] = "enable-cloud-print-proxy";
407 // If true devtools experimental settings are enabled.
408 const char kEnableDevToolsExperiments[] = "enable-devtools-experiments";
410 // Enable device discovery notifications.
411 const char kEnableDeviceDiscoveryNotifications[] =
412 "enable-device-discovery-notifications";
414 // Enables Domain Reliability Monitoring.
415 const char kEnableDomainReliability[] = "enable-domain-reliability";
417 // Download Notification. (value is "", "enabled" or "disabled")
418 const char kEnableDownloadNotification[] = "enable-download-notification";
420 // Enables experimentation with ephemeral apps to be launched from the webstore.
421 const char kEnableEphemeralAppsInWebstore[] =
422 "enable-ephemeral-apps-in-webstore";
424 // Enables experimental hotword features specific to always-on.
425 const char kEnableExperimentalHotwordHardware[] = "enable-hotword-hardware";
427 // Enables logging for extension activity.
428 const char kEnableExtensionActivityLogging[] =
429 "enable-extension-activity-logging";
431 const char kEnableExtensionActivityLogTesting[] =
432 "enable-extension-activity-log-testing";
434 // Enable the fast unload controller, which speeds up tab/window close by
435 // running a tab's onunload js handler independently of the GUI -
436 // crbug.com/142458 .
437 const char kEnableFastUnload[] = "enable-fast-unload";
439 // Enables support for the QUIC protocol for insecure schemes (http://).
440 // This is a temporary testing flag.
441 const char kEnableInsecureQuic[] = "enable-insecure-quic";
443 // Enables an experimental Material Design version of chrome://downloads.
444 const char kEnableMaterialDesignDownloads[] = "enable-md-downloads";
446 // Enables the material design Settings feature.
447 const char kEnableMaterialDesignSettings[] = "enable-md-settings";
449 // Enables Media Router.
450 const char kEnableMediaRouter[] = "enable-media-router";
452 // Runs the Native Client inside the renderer process and enables GPU plugin
453 // (internally adds lEnableGpuPlugin to the command line).
454 const char kEnableNaCl[] = "enable-nacl";
456 // Enables tracing for each navigation. It will attempt to trace each navigation
457 // for 10s, until the buffer is full, or until the next navigation.
458 // It only works if a URL was provided by --trace-upload-url.
459 const char kEnableNavigationTracing[] = "enable-navigation-tracing";
461 // Enables the network-related benchmarking extensions.
462 const char kEnableNetBenchmarking[] = "enable-net-benchmarking";
464 // Enables the new bookmark app system.
465 const char kEnableNewBookmarkApps[] = "enable-new-bookmark-apps";
467 // Enables showing popular sites on the NTP.
468 const char kEnableNTPPopularSites[] = "enable-ntp-popular-sites";
470 // Enable auto-reload of error pages if offline.
471 const char kEnableOfflineAutoReload[] = "enable-offline-auto-reload";
473 // Only auto-reload error pages when the tab is visible.
474 const char kEnableOfflineAutoReloadVisibleOnly[] =
475 "enable-offline-auto-reload-visible-only";
477 // Enables panels (always on-top docked pop-up windows).
478 const char kEnablePanels[] = "enable-panels";
480 // Enable the new material UI - requires out of process PDF plugin.
481 const char kEnablePdfMaterialUI[] = "enable-pdf-material-ui";
483 // Enables presenting plugin placeholder content as shadow DOM.
484 const char kEnablePluginPlaceholderShadowDom[] =
485 "enable-plugin-placeholder-shadow-dom";
487 // Enables a number of potentially annoying security features (strict mixed
488 // content mode, powerful feature restrictions, etc.)
489 const char kEnablePotentiallyAnnoyingSecurityFeatures[] =
490 "enable-potentially-annoying-security-features";
492 // Enables the Power overlay in Settings.
493 const char kEnablePowerOverlay[] = "enable-power-overlay";
495 // Enables showing unregistered printers in print preview
496 const char kEnablePrintPreviewRegisterPromos[] =
497 "enable-print-preview-register-promos";
499 // Enables tracking of tasks in profiler for viewing via about:profiler.
500 // To predominantly disable tracking (profiling), use the command line switch:
501 // --enable-profiling=0
502 // Some tracking will still take place at startup, but it will be turned off
503 // during chrome_browser_main.
504 const char kEnableProfiling[] = "enable-profiling";
506 // Enables support for the QUIC protocol. This is a temporary testing flag.
507 const char kEnableQuic[] = "enable-quic";
509 // Enable use of Chromium's port selection for the ephemeral port via bind().
510 // This only has an effect if QUIC protocol is enabled.
511 const char kEnableQuicPortSelection[] = "enable-quic-port-selection";
513 // Enables save password prompt bubble.
514 const char kEnableSavePasswordBubble[] = "enable-save-password-bubble";
516 // Enables SDCH persistence.
517 const char kEnableSdchPersistence[] = "enable-sdch-persistence";
519 // Enables using bubbles for session restore request instead of infobars.
520 const char kEnableSessionCrashedBubble[] = "enable-session-crashed-bubble";
522 // Enable or disable settings in a separate browser window per profile
523 // (see SettingsWindowEnabled() below).
524 const char kEnableSettingsWindow[] = "enable-settings-window";
525 const char kDisableSettingsWindow[] = "disable-settings-window";
527 // A new user experience for transitioning into fullscreen and mouse pointer
528 // lock states.
529 const char kEnableSimplifiedFullscreenUI[] = "enable-simplified-fullscreen-ui";
530 const char kDisableSimplifiedFullscreenUI[] =
531 "disable-simplified-fullscreen-ui";
533 // Enable the Site Engagement service, which records interaction with sites and
534 // allocates certain resources accordingly.
535 const char kEnableSiteEngagementService[] = "enable-site-engagement-service";
537 // Enables the suggestions service.
538 const char kEnableSuggestionsService[] = "enable-suggestions-service";
540 // Enables the supervised user managed bookmarks folder.
541 const char kEnableSupervisedUserManagedBookmarksFolder[] =
542 "enable-supervised-user-managed-bookmarks-folder";
544 // Enables user control over muting tab audio from the tab strip.
545 const char kEnableTabAudioMuting[] = "enable-tab-audio-muting";
547 // Enables fanciful thumbnail processing. Used with NTP for
548 // instant-extended-api, where thumbnails are generally smaller.
549 const char kEnableThumbnailRetargeting[] = "enable-thumbnail-retargeting";
551 // Enables Alternate-Protocol when the port is user controlled (> 1024).
552 const char kEnableUserAlternateProtocolPorts[] =
553 "enable-user-controlled-alternate-protocol-ports";
555 // Enables a new "web app" style frame for hosted apps (including bookmark
556 // apps).
557 extern const char kEnableWebAppFrame[] = "enable-web-app-frame";
559 // Enables synchronizing WiFi credentials across devices, using Chrome Sync.
560 const char kEnableWifiCredentialSync[] = "enable-wifi-credential-sync";
562 // Values for the kExtensionContentVerification flag.
563 // See ContentVerifierDelegate::Mode for more explanation.
564 const char kExtensionContentVerificationBootstrap[] = "bootstrap";
565 const char kExtensionContentVerificationEnforceStrict[] = "enforce_strict";
566 const char kExtensionContentVerificationEnforce[] = "enforce";
568 // Name of the command line flag to force content verification to be on in one
569 // of various modes.
570 const char kExtensionContentVerification[] = "extension-content-verification";
572 // Turns on extension install verification if it would not otherwise have been
573 // turned on.
574 const char kExtensionsInstallVerification[] = "extensions-install-verification";
576 // Specifies a comma-separated list of extension ids that should be forced to
577 // be treated as not from the webstore when doing install verification.
578 const char kExtensionsNotWebstore[] = "extensions-not-webstore";
580 // Frequency in seconds for Extensions auto-update.
581 const char kExtensionsUpdateFrequency[] = "extensions-update-frequency";
583 // Fakes the channel of the browser for purposes of Variations filtering. This
584 // is to be used for testing only. Possible values are "stable", "beta", "dev"
585 // and "canary". Note that this only applies if the browser's reported channel
586 // is UNKNOWN.
587 const char kFakeVariationsChannel[] = "fake-variations-channel";
589 // If this flag is present then this command line is being delegated to an
590 // already running chrome process via the fast path, ie: before chrome.dll is
591 // loaded. It is useful to tell the difference for tracking purposes.
592 const char kFastStart[] = "fast-start";
594 // These two flags are added around the switches about:flags adds to the
595 // command line. This is useful to see which switches were added by about:flags
596 // on about:version. They don't have any effect.
597 const char kFlagSwitchesBegin[] = "flag-switches-begin";
598 const char kFlagSwitchesEnd[] = "flag-switches-end";
600 // Forces application mode. This hides certain system UI elements and forces
601 // the app to be installed if it hasn't been already.
602 const char kForceAppMode[] = "force-app-mode";
604 // This option can be used to force parameters of field trials when testing
605 // changes locally. The argument is a list of key/value pairs prefixed by
606 // Trial/Group pair. The following shows setting parameters to 2 experiments
607 // where in the first, it forces "id" to be "foo" for the "Enabled" group of
608 // the "EnhancedBookmarks" trial:
609 // "EnhancedBookmarks.Enabled:id/foo,Experiment2.Group1:key1/value1"
610 // Trial names, groups names, parameter names, and value should all be URL
611 // escaped for all non-alphanumeric characters.
612 const char kForceFieldTrialParams[] = "force-fieldtrial-params";
614 // Displays the First Run experience when the browser is started, regardless of
615 // whether or not it's actually the First Run (this overrides kNoFirstRun).
616 const char kForceFirstRun[] = "force-first-run";
618 // Forces additional Chrome Variation Ids that will be sent in X-Client-Data
619 // header, specified as a 64-bit encoded list of numeric experiment ids. Ids
620 // prefixed with the character "t" will be treated as Trigger Variation Ids.
621 const char kForceVariationIds[] = "force-variation-ids";
623 // Forces Chrome to use localNTP instead of server (GWS) NTP.
624 const char kForceLocalNtp[] = "force-local-ntp";
626 // Enables grouping websites by domain and filtering them by period.
627 const char kHistoryEnableGroupByDomain[] = "enable-grouped-history";
629 // Specifies which page will be displayed in newly-opened tabs. We need this
630 // for testing purposes so that the UI tests don't depend on what comes up for
631 // http://google.com.
632 const char kHomePage[] = "homepage";
634 // Comma-separated list of rules that control how hostnames are mapped.
636 // For example:
637 // "MAP * 127.0.0.1" --> Forces all hostnames to be mapped to 127.0.0.1
638 // "MAP *.google.com proxy" --> Forces all google.com subdomains to be
639 // resolved to "proxy".
640 // "MAP test.com [::1]:77 --> Forces "test.com" to resolve to IPv6 loopback.
641 // Will also force the port of the resulting
642 // socket address to be 77.
643 // "MAP * baz, EXCLUDE www.google.com" --> Remaps everything to "baz",
644 // except for "www.google.com".
646 // These mappings apply to the endpoint host in a net::URLRequest (the TCP
647 // connect and host resolver in a direct connection, and the CONNECT in an http
648 // proxy connection, and the endpoint host in a SOCKS proxy connection).
649 const char kHostRules[] = "host-rules";
651 // The maximum number of retry attempts to resolve the host. Set this to zero
652 // to disable host resolver retry attempts.
653 const char kHostResolverRetryAttempts[] = "host-resolver-retry-attempts";
655 // Causes net::URLFetchers to ignore requests for SSL client certificates,
656 // causing them to attempt an unauthenticated SSL/TLS session. This is intended
657 // for use when testing various service URLs (eg: kPromoServerURL, kSbURLPrefix,
658 // kSyncServiceURL, etc)
659 const char kIgnoreUrlFetcherCertRequests[] =
660 "ignore-urlfetcher-cert-requests";
662 // Causes the browser to launch directly in incognito mode.
663 const char kIncognito[] = "incognito";
665 // Causes Chrome to initiate an installation flow for the given app.
666 const char kInstallChromeApp[] = "install-chrome-app";
668 // A list of whitelists to install for a supervised user, for testing.
669 // The list is of the following form: <id>[:<name>],[<id>[:<name>],...]
670 const char kInstallSupervisedUserWhitelists[] =
671 "install-supervised-user-whitelists";
673 // Marks a renderer as an Instant process.
674 const char kInstantProcess[] = "instant-process";
676 // Invalidation service should use GCM network channel even if experiment is not
677 // enabled.
678 const char kInvalidationUseGCMChannel[] = "invalidation-use-gcm-channel";
680 // Disable latest shipping ECMAScript 6 features.
681 const char kDisableJavaScriptHarmonyShipping[] =
682 "disable-javascript-harmony-shipping";
684 // Enables experimental Harmony (ECMAScript 6) features.
685 const char kJavaScriptHarmony[] = "javascript-harmony";
687 // Dumps IPC messages sent from renderer processes to the browser process to
688 // the given directory. Used primarily to gather samples for IPC fuzzing.
689 const char kIpcDumpDirectory[] = "ipc-dump-directory";
691 // Used for testing - keeps browser alive after last browser window closes.
692 const char kKeepAliveForTest[] = "keep-alive-for-test";
694 // Enable Kiosk mode.
695 const char kKioskMode[] = "kiosk";
697 // Print automatically in kiosk mode. |kKioskMode| must be set as well.
698 // See http://crbug.com/31395.
699 const char kKioskModePrinting[] = "kiosk-printing";
701 // Comma-separated list of directories with component extensions to load.
702 const char kLoadComponentExtension[] = "load-component-extension";
704 // Loads an extension from the specified directory.
705 const char kLoadExtension[] = "load-extension";
707 #if !defined(OFFICIAL_BUILD)
708 // Enables a live-reload for local NTP resources. This only works when Chrome
709 // is running from a Chrome source directory.
710 const char kLocalNtpReload[] = "local-ntp-reload";
711 #endif
713 // Makes Chrome default browser
714 const char kMakeDefaultBrowser[] = "make-default-browser";
716 // Use to opt-in to marking HTTP as non-secure.
717 const char kMarkNonSecureAs[] = "mark-non-secure-as";
718 const char kMarkNonSecureAsNeutral[] = "neutral";
719 const char kMarkNonSecureAsNonSecure[] = "non-secure";
721 // Forces the maximum disk space to be used by the media cache, in bytes.
722 const char kMediaCacheSize[] = "media-cache-size";
724 // Enables histograming of tasks served by MessageLoop. See
725 // about:histograms/Loop for results, which show frequency of messages on each
726 // thread, including APC count, object signalling count, etc.
727 const char kMessageLoopHistogrammer[] = "message-loop-histogrammer";
729 // Enables the recording of metrics reports but disables reporting. In contrast
730 // to kDisableMetrics, this executes all the code that a normal client would
731 // use for reporting, except the report is dropped rather than sent to the
732 // server. This is useful for finding issues in the metrics code during UI and
733 // performance tests.
734 const char kMetricsRecordingOnly[] = "metrics-recording-only";
736 // Allows setting a different destination ID for connection-monitoring GCM
737 // messages. Useful when running against a non-prod management server.
738 const char kMonitoringDestinationID[] = "monitoring-destination-id";
740 // Sets the granularity of events to capture in the network log. The mode can be
741 // set to one of the following values:
742 // "Default"
743 // "IncludeCookiesAndCredentials"
744 // "IncludeSocketBytes"
746 // See the functions of the corresponding name in net_log_capture_mode.h for a
747 // description of their meaning.
748 const char kNetLogCaptureMode[] = "net-log-capture-mode";
750 // Disables the default browser check. Useful for UI/browser tests where we
751 // want to avoid having the default browser info-bar displayed.
752 const char kNoDefaultBrowserCheck[] = "no-default-browser-check";
754 // By default, an https page can load images, fonts or frames from an http
755 // page. This switch overrides this to block this lesser mixed-content problem.
756 const char kNoDisplayingInsecureContent[] = "no-displaying-insecure-content";
758 // Disables all experiments set on about:flags. Does not disable about:flags
759 // itself. Useful if an experiment makes chrome crash at startup: One can start
760 // chrome with --no-experiments, disable the problematic lab at about:flags and
761 // then restart chrome without this switch again.
762 const char kNoExperiments[] = "no-experiments";
764 // Skip First Run tasks, whether or not it's actually the First Run. Overridden
765 // by kForceFirstRun. This does not drop the First Run sentinel and thus doesn't
766 // prevent first run from occuring the next time chrome is launched without this
767 // flag.
768 const char kNoFirstRun[] = "no-first-run";
770 // Don't send hyperlink auditing pings
771 const char kNoPings[] = "no-pings";
773 // Don't use a proxy server, always make direct connections. Overrides any
774 // other proxy server flags that are passed.
775 const char kNoProxyServer[] = "no-proxy-server";
777 // Disables the service process from adding itself as an autorun process. This
778 // does not delete existing autorun registrations, it just prevents the service
779 // from registering a new one.
780 const char kNoServiceAutorun[] = "no-service-autorun";
782 // Does not automatically open a browser window on startup (used when
783 // launching Chrome for the purpose of hosting background apps).
784 const char kNoStartupWindow[] = "no-startup-window";
786 // Disables checking whether we received an acknowledgment when registering
787 // a supervised user. Also disables the timeout during registration that waits
788 // for the ack. Useful when debugging against a server that does not
789 // support notifications.
790 const char kNoSupervisedUserAcknowledgmentCheck[] =
791 "no-managed-user-acknowledgment-check";
793 // Specifies the maximum number of threads to use for running the Proxy
794 // Autoconfig (PAC) script.
795 const char kNumPacThreads[] = "num-pac-threads";
797 // Launches URL in new browser window.
798 const char kOpenInNewWindow[] = "new-window";
800 // Force use of QUIC for requests to the specified origin.
801 const char kOriginToForceQuicOn[] = "origin-to-force-quic-on";
803 // The time that a new chrome process which is delegating to an already running
804 // chrome process started. (See ProcessSingleton for more details.)
805 const char kOriginalProcessStartTime[] = "original-process-start-time";
807 // Packages an extension to a .crx installable file from a given directory.
808 const char kPackExtension[] = "pack-extension";
810 // Optional PEM private key to use in signing packaged .crx.
811 const char kPackExtensionKey[] = "pack-extension-key";
813 // Specifies the path to the user data folder for the parent profile.
814 const char kParentProfile[] = "parent-profile";
816 // Development flag for permission request API. This flag is needed until
817 // the API is finalized.
818 // TODO(bauerb): Remove when this flag is not needed anymore.
819 const char kPermissionRequestApiScope[] = "permission-request-api-scope";
821 // Development flag for permission request API. This flag is needed until
822 // the API is finalized.
823 // TODO(bauerb): Remove when this flag is not needed anymore.
824 const char kPermissionRequestApiUrl[] = "permission-request-api-url";
826 // Use the PPAPI (Pepper) Flash found at the given path.
827 const char kPpapiFlashPath[] = "ppapi-flash-path";
829 // Report the given version for the PPAPI (Pepper) Flash. The version should be
830 // numbers separated by '.'s (e.g., "12.3.456.78"). If not specified, it
831 // defaults to "10.2.999.999".
832 const char kPpapiFlashVersion[] = "ppapi-flash-version";
834 // Triggers prerendering of pages from suggestions in the omnibox. Only has an
835 // effect when Instant is either disabled or restricted to search, and when
836 // prerender is enabled.
837 const char kPrerenderFromOmnibox[] = "prerender-from-omnibox";
838 // These are the values the kPrerenderFromOmnibox switch may have, as in
839 // "--prerender-from-omnibox=auto". auto: Allow field trial selection.
840 const char kPrerenderFromOmniboxSwitchValueAuto[] = "auto";
841 // disabled: No prerendering.
842 const char kPrerenderFromOmniboxSwitchValueDisabled[] = "disabled";
843 // enabled: Guaranteed prerendering.
844 const char kPrerenderFromOmniboxSwitchValueEnabled[] = "enabled";
845 // Controls speculative prerendering of pages, and content prefetching. Both
846 // are dispatched from <link rel=prefetch href=...> elements.
847 const char kPrerenderMode[] = "prerender";
848 // These are the values the kPrerenderMode switch may have, as in
849 // "--prerender=disabled".
850 // disabled: No prerendering.
851 const char kPrerenderModeSwitchValueDisabled[] = "disabled";
852 // enabled: Prerendering.
853 const char kPrerenderModeSwitchValueEnabled[] = "enabled";
855 // Use IPv6 only for privet HTTP.
856 const char kPrivetIPv6Only[] = "privet-ipv6-only";
858 // Outputs the product version information and quit. Used as an internal api to
859 // detect the installed version of Chrome on Linux.
860 const char kProductVersion[] = "product-version";
862 // Selects directory of profile to associate with the first browser launched.
863 const char kProfileDirectory[] = "profile-directory";
865 // Starts the sampling based profiler for the browser process at startup. This
866 // will only work if chrome has been built with the gyp variable profiling=1.
867 // The output will go to the value of kProfilingFile.
868 const char kProfilingAtStart[] = "profiling-at-start";
870 // Specifies a location for profiling output. This will only work if chrome has
871 // been built with the gyp variable profiling=1.
873 // {pid} if present will be replaced by the pid of the process.
874 // {count} if present will be incremented each time a profile is generated
875 // for this process.
876 // The default is chrome-profile-{pid}.
877 const char kProfilingFile[] = "profiling-file";
879 // Controls whether profile data is periodically flushed to a file. Normally
880 // the data gets written on exit but cases exist where chrome doesn't exit
881 // cleanly (especially when using single-process). A time in seconds can be
882 // specified.
883 const char kProfilingFlush[] = "profiling-flush";
885 // Forces proxy auto-detection.
886 const char kProxyAutoDetect[] = "proxy-auto-detect";
888 // Specifies a list of hosts for whom we bypass proxy settings and use direct
889 // connections. Ignored if --proxy-auto-detect or --no-proxy-server are also
890 // specified. This is a comma-separated list of bypass rules. See:
891 // "net/proxy/proxy_bypass_rules.h" for the format of these rules.
892 const char kProxyBypassList[] = "proxy-bypass-list";
894 // Uses the pac script at the given URL
895 const char kProxyPacUrl[] = "proxy-pac-url";
897 // Uses a specified proxy server, overrides system settings. This switch only
898 // affects HTTP and HTTPS requests.
899 const char kProxyServer[] = "proxy-server";
901 // Specifies a comma separated list of QUIC connection options to send to
902 // the server.
903 const char kQuicConnectionOptions[] = "quic-connection-options";
905 // Specifies the maximum length for a QUIC packet.
906 const char kQuicMaxPacketLength[] = "quic-max-packet-length";
908 // Specifies the version of QUIC to use.
909 const char kQuicVersion[] = "quic-version";
911 // Porvides a list of addresses to discover DevTools remote debugging targets.
912 // The format is <host>:<port>,...,<host>:port.
913 const char kRemoteDebuggingTargets[] = "remote-debugging-targets";
915 // Indicates the last session should be restored on startup. This overrides the
916 // preferences value and is primarily intended for testing. The value of this
917 // switch is the number of tabs to wait until loaded before 'load completed' is
918 // sent to the ui_test.
919 const char kRestoreLastSession[] = "restore-last-session";
921 // Causes all iframes to be denied all permissions by default. Allowing
922 // particular permissions for an iframe may involve listing the names of
923 // these permissions as values of new iframe attributes.
924 const char kRestrictIFramePermissions[] = "restrict-iframe-permissions";
926 // Disable saving pages as HTML-only, disable saving pages as HTML Complete
927 // (with a directory of sub-resources). Enable only saving pages as MHTML.
928 // See http://crbug.com/120416 for how to remove this switch.
929 const char kSavePageAsMHTML[] = "save-page-as-mhtml";
931 // If present, safebrowsing only performs update when
932 // SafeBrowsingProtocolManager::ForceScheduleNextUpdate() is explicitly called.
933 // This is used for testing only.
934 const char kSbDisableAutoUpdate[] = "safebrowsing-disable-auto-update";
936 // TODO(lzheng): Remove this flag once the feature works fine
937 // (http://crbug.com/74848).
939 // Disables safebrowsing feature that checks download url and downloads
940 // content's hash to make sure the content are not malicious.
941 const char kSbDisableDownloadProtection[] =
942 "safebrowsing-disable-download-protection";
944 // Disables safebrowsing feature that checks for blacklisted extensions.
945 const char kSbDisableExtensionBlacklist[] =
946 "safebrowsing-disable-extension-blacklist";
948 // Causes the process to run as a service process.
949 const char kServiceProcess[] = "service";
951 // If true the app list will be shown.
952 const char kShowAppList[] = "show-app-list";
954 // Command line flag offering a "Show saved copy" option to the user if offline.
955 // The various modes are disabled, primary, or secondary. Primary/secondary
956 // refers to button placement (for experiment).
957 const char kShowSavedCopy[] = "show-saved-copy";
959 // Values for the kShowSavedCopy flag.
960 const char kEnableShowSavedCopyPrimary[] = "primary";
961 const char kEnableShowSavedCopySecondary[] = "secondary";
962 const char kDisableShowSavedCopy[] = "disable";
964 // Does not show an infobar when an extension attaches to a page using
965 // chrome.debugger page. Required to attach to extension background pages.
966 const char kSilentDebuggerExtensionAPI[] = "silent-debugger-extension-api";
968 // Causes Chrome to launch without opening any windows by default. Useful if
969 // one wishes to use Chrome as an ash server.
970 const char kSilentLaunch[] = "silent-launch";
972 // Simulates that elevation is needed to recover upgrade channel.
973 const char kSimulateElevatedRecovery[] = "simulate-elevated-recovery";
975 // Simulates a critical update being available.
976 const char kSimulateCriticalUpdate[] = "simulate-critical-update";
978 // Simulates that current version is outdated.
979 const char kSimulateOutdated[] = "simulate-outdated";
981 // Simulates that current version is outdated and auto-update is off.
982 const char kSimulateOutdatedNoAU[] = "simulate-outdated-no-au";
984 // Simulates an update being available.
985 const char kSimulateUpgrade[] = "simulate-upgrade";
987 // Speculative resource prefetching.
988 const char kSpeculativeResourcePrefetching[] =
989 "speculative-resource-prefetching";
991 // Speculative resource prefetching is disabled.
992 const char kSpeculativeResourcePrefetchingDisabled[] = "disabled";
994 // Speculative resource prefetching will only learn about resources that need to
995 // be prefetched but will not prefetch them.
996 const char kSpeculativeResourcePrefetchingLearning[] = "learning";
998 // Speculative resource prefetching is enabled.
999 const char kSpeculativeResourcePrefetchingEnabled[] = "enabled";
1001 #if defined(ENABLE_SPELLCHECK)
1002 #if defined(OS_ANDROID)
1003 // Enables use of the Android spellchecker.
1004 const char kEnableAndroidSpellChecker[] = "enable-android-spellchecker";
1005 #endif
1007 // Enables the multilingual spellchecker.
1008 const char kEnableMultilingualSpellChecker[] =
1009 "enable-multilingual-spellchecker";
1011 // Enables auto correction for misspelled words.
1012 const char kEnableSpellingAutoCorrect[] = "enable-spelling-auto-correct";
1014 // Enables participation in the field trial for user feedback to spelling
1015 // service.
1016 const char kEnableSpellingFeedbackFieldTrial[] =
1017 "enable-spelling-feedback-field-trial";
1019 // Specifies the URL where spelling service feedback data will be sent instead
1020 // of the default URL. This switch is for temporary testing only.
1021 // TODO(rouslan): Remove this flag when feedback testing is complete. Revisit by
1022 // August 2013.
1023 const char kSpellingServiceFeedbackUrl[] = "spelling-service-feedback-url";
1025 // Specifies the number of seconds between sending batches of feedback to
1026 // spelling service. The default is 30 minutes. The minimum is 5 seconds. This
1027 // switch is for temporary testing only.
1028 // TODO(rouslan): Remove this flag when feedback testing is complete. Revisit by
1029 // August 2013.
1030 const char kSpellingServiceFeedbackIntervalSeconds[] =
1031 "spelling-service-feedback-interval-seconds";
1032 #endif
1034 // Specifies the maximum SSL/TLS version ("tls1", "tls1.1", or "tls1.2").
1035 const char kSSLVersionMax[] = "ssl-version-max";
1037 // Specifies the minimum SSL/TLS version ("tls1", "tls1.1", or "tls1.2").
1038 const char kSSLVersionMin[] = "ssl-version-min";
1040 // Specifies the minimum SSL/TLS version ("tls1", "tls1.1", or "tls1.2") that
1041 // TLS fallback will accept.
1042 const char kSSLVersionFallbackMin[] = "ssl-version-fallback-min";
1044 // These values aren't switches, but rather the values that kSSLVersionMax,
1045 // kSSLVersionMin and kSSLVersionFallbackMin can have.
1046 const char kSSLVersionTLSv1[] = "tls1";
1047 const char kSSLVersionTLSv11[] = "tls1.1";
1048 const char kSSLVersionTLSv12[] = "tls1.2";
1050 // Starts the browser maximized, regardless of any previous settings.
1051 const char kStartMaximized[] = "start-maximized";
1053 // Sets the supervised user ID for any loaded or newly created profile to the
1054 // given value. Pass an empty string to mark the profile as non-supervised.
1055 // Used for testing.
1056 const char kSupervisedUserId[] = "managed-user-id";
1058 // Enables/disables SafeSites filtering for supervised users. Possible values
1059 // are "enabled", "disabled", "blacklist-only", and "online-check-only".
1060 const char kSupervisedUserSafeSites[] = "supervised-user-safesites";
1062 // Used to authenticate requests to the Sync service for supervised users.
1063 // Setting this switch also causes Sync to be set up for a supervised user.
1064 const char kSupervisedUserSyncToken[] = "managed-user-sync-token";
1066 // This flag causes sync to retry very quickly (see polling_constants.h) the
1067 // when it encounters an error, as the first step towards exponential backoff.
1068 const char kSyncShortInitialRetryOverride[] =
1069 "sync-short-initial-retry-override";
1071 // Overrides the default server used for profile sync.
1072 const char kSyncServiceURL[] = "sync-url";
1074 // Enables deferring sync backend initialization until user initiated changes
1075 // occur.
1076 const char kSyncDisableDeferredStartup[] = "sync-disable-deferred-startup";
1078 // Allows overriding the deferred init fallback timeout.
1079 const char kSyncDeferredStartupTimeoutSeconds[] =
1080 "sync-deferred-startup-timeout-seconds";
1082 // Enables feature to avoid unnecessary GetUpdate requests.
1083 const char kSyncEnableGetUpdateAvoidance[] =
1084 "sync-enable-get-update-avoidance";
1086 // Enables clearing of sync data when a user enables passphrase encryption.
1087 const char kSyncEnableClearDataOnPassphraseEncryption[] =
1088 "enable-clear-sync-data-on-passphrase-encryption";
1090 // Disable data backup when user's not signed in.
1091 const char kSyncDisableBackup[] = "disable-sync-backup";
1093 // Disable sync rollback.
1094 const char kSyncDisableRollback[] = "disable-sync-rollback";
1096 // Frequency in Milliseconds for system log uploads. Should only be used for
1097 // testing purposes.
1098 const char kSystemLogUploadFrequency[] = "system-log-upload-frequency";
1100 // Passes the name of the current running automated test to Chrome.
1101 const char kTestName[] = "test-name";
1103 // Disables same-origin check on HTTP resources pushed via a SPDY proxy.
1104 // The value is the host:port of the trusted proxy.
1105 const char kTrustedSpdyProxy[] = "trusted-spdy-proxy";
1107 // Experimental. Shows a dialog asking the user to try chrome. This flag is to
1108 // be used only by the upgrade process.
1109 const char kTryChromeAgain[] = "try-chrome-again";
1111 // Overrides per-origin quota settings to unlimited storage for any
1112 // apps/origins. This should be used only for testing purpose.
1113 const char kUnlimitedStorage[] = "unlimited-storage";
1115 // Treat given (insecure) origins as secure origins. Multiple origins can be
1116 // supplied. Has no effect unless --user-data-dir is also supplied.
1117 // Example:
1118 // --unsafely-treat-insecure-origin-as-secure=http://a.test,http://b.test
1119 // --user-data-dir=/test/only/profile/dir
1120 const char kUnsafelyTreatInsecureOriginAsSecure[] =
1121 "unsafely-treat-insecure-origin-as-secure";
1123 // Uses Spdy for the transport protocol instead of HTTP. This is a temporary
1124 // testing flag.
1125 const char kUseSpdy[] = "use-spdy";
1127 // A string used to override the default user agent with a custom one.
1128 const char kUserAgent[] = "user-agent";
1130 // Specifies the user data directory, which is where the browser will look for
1131 // all of its state.
1132 const char kUserDataDir[] = "user-data-dir";
1134 // Examines a .crx for validity and prints the result.
1135 const char kValidateCrx[] = "validate-crx";
1137 // Uses experimental simple cache backend if possible.
1138 const char kUseSimpleCacheBackend[] = "use-simple-cache-backend";
1140 // Enables using an in-process Mojo service for the v8 proxy resolver.
1141 const char kV8PacMojoInProcess[] = "v8-pac-mojo-in-process";
1143 // Enables using an out-of-process Mojo service for the v8 proxy resolver.
1144 const char kV8PacMojoOutOfProcess[] = "v8-pac-mojo-out-of-process";
1146 // Specifies a custom URL for the server which reports variation data to the
1147 // client. Specifying this switch enables the Variations service on
1148 // unofficial builds. See variations_service.cc.
1149 const char kVariationsServerURL[] = "variations-server-url";
1151 // Prints version information and quits.
1152 const char kVersion[] = "version";
1154 // Specify the initial window position: --window-position=x,y
1155 const char kWindowPosition[] = "window-position";
1157 // Specify the initial window size: --window-size=w,h
1158 const char kWindowSize[] = "window-size";
1160 // Uses WinHTTP to fetch and evaluate PAC scripts. Otherwise the default is to
1161 // use Chromium's network stack to fetch, and V8 to evaluate.
1162 const char kWinHttpProxyResolver[] = "winhttp-proxy-resolver";
1164 // Specifies which category option was clicked in the Windows Jumplist that
1165 // resulted in a browser startup.
1166 const char kWinJumplistAction[] = "win-jumplist-action";
1168 #if defined(OS_ANDROID)
1169 // Android authentication account type for SPNEGO authentication
1170 const char kAuthAndroidNegotiateAccountType[] = "auth-spnego-account-type";
1172 // Disables support for playing videos on Chromecast devices.
1173 const char kDisableCast[] = "disable-cast";
1175 // Disables Contextual Search.
1176 const char kDisableContextualSearch[] = "disable-contextual-search";
1178 // Disables zero suggest experiment on Dev channel.
1179 const char kDisableZeroSuggest[] = "disable-zero-suggest";
1181 // Enable the accessibility tab switcher.
1182 const char kEnableAccessibilityTabSwitcher[] =
1183 "enable-accessibility-tab-switcher";
1185 // Enables Contextual Search.
1186 const char kEnableContextualSearch[] = "enable-contextual-search";
1188 // Enables the DOM distiller animated button UI for Android.
1189 const char kEnableDomDistillerButtonAnimation[] =
1190 "enable-dom-distiller-button-animation";
1192 // Enables chrome hosted mode for Android.
1193 const char kEnableHostedMode[] = "enable-hosted-mode";
1195 // Enables context-sensitive reader mode button in the toolbar.
1196 const char kEnableReaderModeToolbarIcon[] =
1197 "enable-reader-mode-toolbar-icon";
1199 // Enables zero suggest functionality on Dev channel, showing most visited
1200 // sites as default suggestions.
1201 const char kEnableZeroSuggestMostVisited[] =
1202 "enable-zero-suggest-most-visited";
1204 // Enable zero suggest functionality on Dev channel, showing most visited
1205 // sites on non-search-result pages as default suggestions.
1206 const char kEnableZeroSuggestMostVisitedWithoutSerp[] =
1207 "enable-zero-suggest-most-visited-without-serp";
1209 // Specifies Android phone page loading progress bar animation.
1210 const char kProgressBarAnimation[] = "progress-bar-animation";
1211 #endif // defined(OS_ANDROID)
1213 #if defined(USE_ASH)
1214 const char kOpenAsh[] = "open-ash";
1215 #endif
1217 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_CHROMEOS)
1218 // These flags show the man page on Linux. They are equivalent to each
1219 // other.
1220 const char kHelp[] = "help";
1221 const char kHelpShort[] = "h";
1223 // Specifies which password store to use (detect, default, gnome, kwallet).
1224 const char kPasswordStore[] = "password-store";
1225 #endif
1227 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
1228 // Triggers migration of user data directory to another directory
1229 // specified as a parameter. The migration is done under singleton lock,
1230 // and sanity checks are made to avoid corrupting the profile.
1231 // The browser exits after migration is complete.
1232 const char kMigrateDataDirForSxS[] = "migrate-data-dir-for-sxs";
1233 #endif // defined(OS_LINUX) && !defined(OS_CHROMEOS)
1235 #if defined(OS_MACOSX)
1236 // Prevents Chrome from quitting when Chrome Apps are open.
1237 const char kAppsKeepChromeAliveInTests[] = "apps-keep-chrome-alive-in-tests";
1239 // Shows a notification when quitting Chrome with hosted apps running. Default
1240 // behavior is to also quit all hosted apps.
1241 const char kHostedAppQuitNotification[] = "enable-hosted-app-quit-notification";
1243 // Disable the toolkit-views App Info dialog for Mac.
1244 const char kDisableAppInfoDialogMac[] = "disable-app-info-dialog-mac";
1246 // Disables custom Cmd+` window cycling for platform apps and hosted apps.
1247 const char kDisableAppWindowCycling[] = "disable-app-window-cycling";
1249 // Disables app shim creation for hosted apps on Mac.
1250 const char kDisableHostedAppShimCreation[] = "disable-hosted-app-shim-creation";
1252 // Prevents hosted apps from being opened in windows on Mac.
1253 const char kDisableHostedAppsInWindows[] = "disable-hosted-apps-in-windows";
1255 // Disables use of toolkit-views based native app windows.
1256 const char kDisableMacViewsNativeAppWindows[] =
1257 "disable-mac-views-native-app-windows";
1259 // Disables Translate experimental new UX which replaces the infobar.
1260 const char kDisableTranslateNewUX[] = "disable-translate-new-ux";
1262 // Enable the toolkit-views App Info dialog for Mac. This is accessible from
1263 // chrome://apps and chrome://extensions and is already enabled on non-mac.
1264 const char kEnableAppInfoDialogMac[] = "enable-app-info-dialog-mac";
1266 // Enables custom Cmd+` window cycling for platform apps and hosted apps.
1267 const char kEnableAppWindowCycling[] = "enable-app-window-cycling";
1269 // Allows hosted apps to be opened in windows on Mac.
1270 const char kEnableHostedAppsInWindows[] = "enable-hosted-apps-in-windows";
1272 // Enables use of toolkit-views based native app windows.
1273 const char kEnableMacViewsNativeAppWindows[] =
1274 "enable-mac-views-native-app-windows";
1276 // Causes Chrome to use an equivalent toolkit-views version of a browser dialog
1277 // when available, rather than a Cocoa one.
1278 const char kEnableMacViewsDialogs[] = "enable-mac-views-dialogs";
1280 // Enables Translate experimental new UX which replaces the infobar.
1281 const char kEnableTranslateNewUX[] = "enable-translate-new-ux";
1283 // This is how the metrics client ID is passed from the browser process to its
1284 // children. With Crashpad, the metrics client ID is distinct from the crash
1285 // client ID.
1286 const char kMetricsClientID[] = "metrics-client-id";
1288 // A process type (switches::kProcessType) that relaunches the browser. See
1289 // chrome/browser/mac/relauncher.h.
1290 const char kRelauncherProcess[] = "relauncher";
1291 #endif // defined(OS_MACOSX)
1293 // Use bubbles for content permissions requests instead of infobars.
1294 const char kEnablePermissionsBubbles[] = "enable-permissions-bubbles";
1296 #if defined(OS_WIN)
1297 // Fallback to XPS. By default connector uses CDD.
1298 const char kEnableCloudPrintXps[] = "enable-cloud-print-xps";
1300 // Force-enables the profile shortcut manager. This is needed for tests since
1301 // they use a custom-user-data-dir which disables this.
1302 const char kEnableProfileShortcutManager[] = "enable-profile-shortcut-manager";
1304 // For the DelegateExecute verb handler to launch Chrome in metro mode on
1305 // Windows 8 and higher. Used when relaunching metro Chrome.
1306 const char kForceImmersive[] = "force-immersive";
1308 // Whether or not the browser should warn if the profile is on a network share.
1309 // This flag is only relevant for Windows currently.
1310 const char kNoNetworkProfileWarning[] = "no-network-profile-warning";
1312 // For the DelegateExecute verb handler to launch Chrome in desktop mode on
1313 // Windows 8 and higher. Used when relaunching metro Chrome.
1314 const char kForceDesktop[] = "force-desktop";
1316 // Makes Windows happy by allowing it to show "Enable access to this program"
1317 // checkbox in Add/Remove Programs->Set Program Access and Defaults. This only
1318 // shows an error box because the only way to hide Chrome is by uninstalling
1319 // it.
1320 const char kHideIcons[] = "hide-icons";
1322 // Relaunches metro Chrome on Windows 8 and higher using a given shortcut.
1323 const char kRelaunchShortcut[] = "relaunch-shortcut";
1325 // See kHideIcons.
1326 const char kShowIcons[] = "show-icons";
1328 // Runs un-installation steps that were done by chrome first-run.
1329 const char kUninstall[] = "uninstall";
1331 // Requests that Chrome launch the Metro viewer process via the given appid
1332 // (which is assumed to be registered as default browser) and synchronously
1333 // connect to it.
1334 const char kViewerLaunchViaAppId[] = "viewer-launch-via-appid";
1336 // Waits for the given handle to be signaled before relaunching metro Chrome on
1337 // Windows 8 and higher.
1338 const char kWaitForMutex[] = "wait-for-mutex";
1340 // Indicates that chrome was launched to service a search request in Windows 8.
1341 const char kWindows8Search[] = "windows8-search";
1342 #endif // defined(OS_WIN)
1344 #if defined(OS_WIN) || defined(OS_MACOSX)
1345 // Enable tab discarding when system is under memory pressure.
1346 const char kEnableTabDiscarding[] = "enable-tab-discarding";
1347 #endif // defined(OS_WIN) || defined(OS_MACOSX)
1349 #if defined(ENABLE_IPC_FUZZER)
1350 // Specifies the testcase used by the IPC fuzzer.
1351 const char kIpcFuzzerTestcase[] = "ipc-fuzzer-testcase";
1352 #endif
1354 #if defined(ENABLE_PRINT_PREVIEW) && !defined(OFFICIAL_BUILD)
1355 // Enables support to debug printing subsystem.
1356 const char kDebugPrint[] = "debug-print";
1357 #endif
1359 #if defined(ENABLE_TASK_MANAGER)
1360 // Disables the new implementation of the task manager.
1361 const char kDisableNewTaskManager[] = "disable-new-task-manager";
1362 #endif // defined(ENABLE_TASK_MANAGER)
1364 bool AboutInSettingsEnabled() {
1365 return SettingsWindowEnabled() &&
1366 !base::CommandLine::ForCurrentProcess()->HasSwitch(
1367 ::switches::kDisableAboutInSettings);
1370 bool MdDownloadsEnabled() {
1371 return base::CommandLine::ForCurrentProcess()->HasSwitch(
1372 ::switches::kEnableMaterialDesignDownloads);
1375 bool MdSettingsEnabled() {
1376 return base::CommandLine::ForCurrentProcess()->HasSwitch(
1377 ::switches::kEnableMaterialDesignSettings);
1380 bool MediaRouterEnabled() {
1381 return base::CommandLine::ForCurrentProcess()->HasSwitch(
1382 ::switches::kEnableMediaRouter);
1385 bool PdfMaterialUIEnabled() {
1386 if (base::CommandLine::ForCurrentProcess()->HasSwitch(kEnablePdfMaterialUI))
1387 return true;
1389 if (base::CommandLine::ForCurrentProcess()->HasSwitch(kDisablePdfMaterialUI))
1390 return false;
1392 // Default.
1393 return false;
1396 bool SettingsWindowEnabled() {
1397 #if defined(OS_CHROMEOS)
1398 return !base::CommandLine::ForCurrentProcess()->HasSwitch(
1399 ::switches::kDisableSettingsWindow);
1400 #else
1401 return base::CommandLine::ForCurrentProcess()->HasSwitch(
1402 ::switches::kEnableSettingsWindow);
1403 #endif
1406 #if defined(OS_CHROMEOS)
1407 bool PowerOverlayEnabled() {
1408 return base::CommandLine::ForCurrentProcess()->HasSwitch(
1409 ::switches::kEnablePowerOverlay);
1411 #endif
1413 #if defined(ENABLE_TASK_MANAGER)
1414 bool NewTaskManagerEnabled() {
1415 return !base::CommandLine::ForCurrentProcess()->HasSwitch(
1416 kDisableNewTaskManager);
1418 #endif // defined(ENABLE_TASK_MANAGER)
1420 // -----------------------------------------------------------------------------
1421 // DO NOT ADD YOUR CRAP TO THE BOTTOM OF THIS FILE.
1423 // You were going to just dump your switches here, weren't you? Instead, please
1424 // put them in alphabetical order above, or in order inside the appropriate
1425 // ifdef at the bottom. The order should match the header.
1426 // -----------------------------------------------------------------------------
1428 } // namespace switches