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