Revert "Fix broken channel icon in chrome://help on CrOS" and try again
[chromium-blink-merge.git] / chrome / common / chrome_switches.cc
blob700efc868173f8201b8ebfa0acf5932dfc3899e7
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 // Disables the Material Design version of chrome://downloads.
273 const char kDisableMaterialDesignDownloads[] = "disable-md-downloads";
275 // Disable the behavior that the second click on a launcher item (the click when
276 // the item is already active) minimizes the item.
277 const char kDisableMinimizeOnSecondLauncherItemClick[] =
278 "disable-minimize-on-second-launcher-item-click";
280 // Disables the new bookmark app system.
281 const char kDisableNewBookmarkApps[] = "disable-new-bookmark-apps";
283 // Disables showing popular sites on the NTP.
284 const char kDisableNTPPopularSites[] = "disable-ntp-popular-sites";
286 // Disable auto-reload of error pages if offline.
287 const char kDisableOfflineAutoReload[] = "disable-offline-auto-reload";
289 // Disable only auto-reloading error pages when the tab is visible.
290 const char kDisableOfflineAutoReloadVisibleOnly[] =
291 "disable-offline-auto-reload-visible-only";
293 // Disable out-of-process V8 proxy resolver.
294 const char kDisableOutOfProcessPac[] = "disable-out-of-process-pac";
296 // Disable the setting to prompt the user for their OS account password before
297 // revealing plaintext passwords in the password manager.
298 const char kDisablePasswordManagerReauthentication[] =
299 "disable-password-manager-reauthentication";
301 // Disable the new material UI - requires out of process PDF plugin.
302 const char kDisablePdfMaterialUI[] = "disable-pdf-material-ui";
304 // Don't use bubbles for content permissions requests instead of infobars.
305 const char kDisablePermissionsBubbles[] = "disable-permissions-bubbles";
307 // Disable pop-up blocking.
308 const char kDisablePopupBlocking[] = "disable-popup-blocking";
310 // Disable speculative TCP/IP preconnection.
311 const char kDisablePreconnect[] = "disable-preconnect";
313 // Disables print preview (For testing, and for users who don't like us. :[ )
314 const char kDisablePrintPreview[] = "disable-print-preview";
316 // Normally when the user attempts to navigate to a page that was the result of
317 // a post we prompt to make sure they want to. This switch may be used to
318 // disable that check. This switch is used during automated testing.
319 const char kDisablePromptOnRepost[] = "disable-prompt-on-repost";
321 // Disables support for the QUIC protocol.
322 const char kDisableQuic[] = "disable-quic";
324 // Disable use of Chromium's port selection for the ephemeral port via bind().
325 // This only has an effect if QUIC protocol is enabled.
326 const char kDisableQuicPortSelection[] = "disable-quic-port-selection";
328 // Prevents the save password bubble from being enabled.
329 const char kDisableSavePasswordBubble[] = "disable-save-password-bubble";
331 // Prevents SDCH persistence from being used.
332 const char kDisableSdchPersistence[] = "disable-sdch-persistence";
334 // Disables using bubbles for session restore request.
335 const char kDisableSessionCrashedBubble[] = "disable-session-crashed-bubble";
337 // Disables the Site Engagement service, which records interaction with sites
338 // and allocates certain resources accordingly.
339 const char kDisableSiteEngagementService[] = "disable-site-engagement-service";
341 // Disables the suggestions service.
342 const char kDisableSuggestionsService[] = "disable-suggestions-service";
344 // Disables syncing browser data to a Google Account.
345 const char kDisableSync[] = "disable-sync";
347 // Disables syncing one or more sync data types that are on by default.
348 // See sync/internal_api/public/base/model_type.h for possible types. Types
349 // should be comma separated, and follow the naming convention for string
350 // representation of model types, e.g.:
351 // --disable-synctypes='Typed URLs, Bookmarks, Autofill Profiles'
352 const char kDisableSyncTypes[] = "disable-sync-types";
354 // Disables the backend service for web resources.
355 const char kDisableWebResources[] = "disable-web-resources";
357 // Some tests seem to require the application to close when the last
358 // browser window is closed. Thus, we need a switch to force this behavior
359 // for ChromeOS Aura, disable "zero window mode".
360 // TODO(pkotwicz): Investigate if this bug can be removed.
361 // (http://crbug.com/119175)
362 const char kDisableZeroBrowsersOpenForTests[] =
363 "disable-zero-browsers-open-for-tests";
365 // Use a specific disk cache location, rather than one derived from the
366 // UserDatadir.
367 const char kDiskCacheDir[] = "disk-cache-dir";
369 // Forces the maximum disk space to be used by the disk cache, in bytes.
370 const char kDiskCacheSize[] = "disk-cache-size";
372 const char kDnsLogDetails[] = "dns-log-details";
374 // Disables prefetching of DNS information.
375 const char kDnsPrefetchDisable[] = "dns-prefetch-disable";
377 // Requests that a running browser process dump its collected histograms to a
378 // given file. The file is overwritten if it exists.
379 const char kDumpBrowserHistograms[] = "dump-browser-histograms";
381 // Overrides the path of Easy Unlock component app.
382 const char kEasyUnlockAppPath[] = "easy-unlock-app-path";
384 // Enables the display of a banner allowing the user to add a web
385 // app to their shelf (or platform-specific equivalent)
386 const char kEnableAddToShelf[] = "enable-add-to-shelf";
388 // Enable OS integration for Chrome app file associations.
389 const char kEnableAppsFileAssociations[] = "enable-apps-file-associations";
391 // Enables the benchmarking extensions.
392 const char kEnableBenchmarking[] = "enable-benchmarking";
394 // Enables the multi-level undo system for bookmarks.
395 const char kEnableBookmarkUndo[] = "enable-bookmark-undo";
397 // Enables detection of child accounts.
398 const char kEnableChildAccountDetection[] =
399 "enable-child-account-detection";
401 // If true, the clear browsing data dialog will show data volume counters,
402 // where available.
403 const char kEnableClearBrowsingDataCounters[] =
404 "enable-clear-browsing-data-counters";
406 // This applies only when the process type is "service". Enables the Cloud
407 // Print Proxy component within the service process.
408 const char kEnableCloudPrintProxy[] = "enable-cloud-print-proxy";
410 // If true devtools experimental settings are enabled.
411 const char kEnableDevToolsExperiments[] = "enable-devtools-experiments";
413 // Enable device discovery notifications.
414 const char kEnableDeviceDiscoveryNotifications[] =
415 "enable-device-discovery-notifications";
417 // Enables Domain Reliability Monitoring.
418 const char kEnableDomainReliability[] = "enable-domain-reliability";
420 // Download Notification. (value is "", "enabled" or "disabled")
421 const char kEnableDownloadNotification[] = "enable-download-notification";
423 // Enables experimentation with ephemeral apps to be launched from the webstore.
424 const char kEnableEphemeralAppsInWebstore[] =
425 "enable-ephemeral-apps-in-webstore";
427 // Enables experimental hotword features specific to always-on.
428 const char kEnableExperimentalHotwordHardware[] = "enable-hotword-hardware";
430 // Enables logging for extension activity.
431 const char kEnableExtensionActivityLogging[] =
432 "enable-extension-activity-logging";
434 const char kEnableExtensionActivityLogTesting[] =
435 "enable-extension-activity-log-testing";
437 // Enable the fast unload controller, which speeds up tab/window close by
438 // running a tab's onunload js handler independently of the GUI -
439 // crbug.com/142458 .
440 const char kEnableFastUnload[] = "enable-fast-unload";
442 // Enables support for the QUIC protocol for insecure schemes (http://).
443 // This is a temporary testing flag.
444 const char kEnableInsecureQuic[] = "enable-insecure-quic";
446 // Enables the Material Design version of chrome://downloads.
447 const char kEnableMaterialDesignDownloads[] = "enable-md-downloads";
449 // Enables the material design Settings feature.
450 const char kEnableMaterialDesignSettings[] = "enable-md-settings";
452 // Enables Media Router.
453 const char kEnableMediaRouter[] = "enable-media-router";
455 // Runs the Native Client inside the renderer process and enables GPU plugin
456 // (internally adds lEnableGpuPlugin to the command line).
457 const char kEnableNaCl[] = "enable-nacl";
459 // Enables tracing for each navigation. It will attempt to trace each navigation
460 // for 10s, until the buffer is full, or until the next navigation.
461 // It only works if a URL was provided by --trace-upload-url.
462 const char kEnableNavigationTracing[] = "enable-navigation-tracing";
464 // Enables the network-related benchmarking extensions.
465 const char kEnableNetBenchmarking[] = "enable-net-benchmarking";
467 // Enables the new bookmark app system.
468 const char kEnableNewBookmarkApps[] = "enable-new-bookmark-apps";
470 // Enables showing popular sites on the NTP.
471 const char kEnableNTPPopularSites[] = "enable-ntp-popular-sites";
473 // Enable auto-reload of error pages if offline.
474 const char kEnableOfflineAutoReload[] = "enable-offline-auto-reload";
476 // Only auto-reload error pages when the tab is visible.
477 const char kEnableOfflineAutoReloadVisibleOnly[] =
478 "enable-offline-auto-reload-visible-only";
480 // Enables panels (always on-top docked pop-up windows).
481 const char kEnablePanels[] = "enable-panels";
483 // Enable the new material UI - requires out of process PDF plugin.
484 const char kEnablePdfMaterialUI[] = "enable-pdf-material-ui";
486 // Enables a number of potentially annoying security features (strict mixed
487 // content mode, powerful feature restrictions, etc.)
488 const char kEnablePotentiallyAnnoyingSecurityFeatures[] =
489 "enable-potentially-annoying-security-features";
491 // Enables the Power overlay in Settings.
492 const char kEnablePowerOverlay[] = "enable-power-overlay";
494 // Enables showing unregistered printers in print preview
495 const char kEnablePrintPreviewRegisterPromos[] =
496 "enable-print-preview-register-promos";
498 // Enables tracking of tasks in profiler for viewing via about:profiler.
499 // To predominantly disable tracking (profiling), use the command line switch:
500 // --enable-profiling=0
501 // Some tracking will still take place at startup, but it will be turned off
502 // during chrome_browser_main.
503 const char kEnableProfiling[] = "enable-profiling";
505 // Enables support for the QUIC protocol. This is a temporary testing flag.
506 const char kEnableQuic[] = "enable-quic";
508 // Enable use of Chromium's port selection for the ephemeral port via bind().
509 // This only has an effect if QUIC protocol is enabled.
510 const char kEnableQuicPortSelection[] = "enable-quic-port-selection";
512 // Enables save password prompt bubble.
513 const char kEnableSavePasswordBubble[] = "enable-save-password-bubble";
515 // Enables SDCH persistence.
516 const char kEnableSdchPersistence[] = "enable-sdch-persistence";
518 // Enables using bubbles for session restore request instead of infobars.
519 const char kEnableSessionCrashedBubble[] = "enable-session-crashed-bubble";
521 // Enable or disable settings in a separate browser window per profile
522 // (see SettingsWindowEnabled() below).
523 const char kEnableSettingsWindow[] = "enable-settings-window";
524 const char kDisableSettingsWindow[] = "disable-settings-window";
526 // A new user experience for transitioning into fullscreen and mouse pointer
527 // lock states.
528 const char kEnableSimplifiedFullscreenUI[] = "enable-simplified-fullscreen-ui";
529 const char kDisableSimplifiedFullscreenUI[] =
530 "disable-simplified-fullscreen-ui";
532 // Enable the Site Engagement service, which records interaction with sites and
533 // allocates certain resources accordingly.
534 const char kEnableSiteEngagementService[] = "enable-site-engagement-service";
536 // Enables the suggestions service.
537 const char kEnableSuggestionsService[] = "enable-suggestions-service";
539 // Enables the supervised user managed bookmarks folder.
540 const char kEnableSupervisedUserManagedBookmarksFolder[] =
541 "enable-supervised-user-managed-bookmarks-folder";
543 // Enables user control over muting tab audio from the tab strip.
544 const char kEnableTabAudioMuting[] = "enable-tab-audio-muting";
546 // Enables fanciful thumbnail processing. Used with NTP for
547 // instant-extended-api, where thumbnails are generally smaller.
548 const char kEnableThumbnailRetargeting[] = "enable-thumbnail-retargeting";
550 // Enables Alternate-Protocol when the port is user controlled (> 1024).
551 const char kEnableUserAlternateProtocolPorts[] =
552 "enable-user-controlled-alternate-protocol-ports";
554 // Enables a new "web app" style frame for hosted apps (including bookmark
555 // apps).
556 extern const char kEnableWebAppFrame[] = "enable-web-app-frame";
558 // Enables synchronizing WiFi credentials across devices, using Chrome Sync.
559 const char kEnableWifiCredentialSync[] = "enable-wifi-credential-sync";
561 // Values for the kExtensionContentVerification flag.
562 // See ContentVerifierDelegate::Mode for more explanation.
563 const char kExtensionContentVerificationBootstrap[] = "bootstrap";
564 const char kExtensionContentVerificationEnforceStrict[] = "enforce_strict";
565 const char kExtensionContentVerificationEnforce[] = "enforce";
567 // Name of the command line flag to force content verification to be on in one
568 // of various modes.
569 const char kExtensionContentVerification[] = "extension-content-verification";
571 // Turns on extension install verification if it would not otherwise have been
572 // turned on.
573 const char kExtensionsInstallVerification[] = "extensions-install-verification";
575 // Specifies a comma-separated list of extension ids that should be forced to
576 // be treated as not from the webstore when doing install verification.
577 const char kExtensionsNotWebstore[] = "extensions-not-webstore";
579 // Frequency in seconds for Extensions auto-update.
580 const char kExtensionsUpdateFrequency[] = "extensions-update-frequency";
582 // Fakes the channel of the browser for purposes of Variations filtering. This
583 // is to be used for testing only. Possible values are "stable", "beta", "dev"
584 // and "canary". Note that this only applies if the browser's reported channel
585 // is UNKNOWN.
586 const char kFakeVariationsChannel[] = "fake-variations-channel";
588 // If this flag is present then this command line is being delegated to an
589 // already running chrome process via the fast path, ie: before chrome.dll is
590 // loaded. It is useful to tell the difference for tracking purposes.
591 const char kFastStart[] = "fast-start";
593 // These two flags are added around the switches about:flags adds to the
594 // command line. This is useful to see which switches were added by about:flags
595 // on about:version. They don't have any effect.
596 const char kFlagSwitchesBegin[] = "flag-switches-begin";
597 const char kFlagSwitchesEnd[] = "flag-switches-end";
599 // Forces application mode. This hides certain system UI elements and forces
600 // the app to be installed if it hasn't been already.
601 const char kForceAppMode[] = "force-app-mode";
603 // This option can be used to force parameters of field trials when testing
604 // changes locally. The argument is a list of key/value pairs prefixed by
605 // Trial/Group pair. The following shows setting parameters to 2 experiments
606 // where in the first, it forces "id" to be "foo" for the "Enabled" group of
607 // the "EnhancedBookmarks" trial:
608 // "EnhancedBookmarks.Enabled:id/foo,Experiment2.Group1:key1/value1"
609 // Trial names, groups names, parameter names, and value should all be URL
610 // escaped for all non-alphanumeric characters.
611 const char kForceFieldTrialParams[] = "force-fieldtrial-params";
613 // Displays the First Run experience when the browser is started, regardless of
614 // whether or not it's actually the First Run (this overrides kNoFirstRun).
615 const char kForceFirstRun[] = "force-first-run";
617 // Forces additional Chrome Variation Ids that will be sent in X-Client-Data
618 // header, specified as a 64-bit encoded list of numeric experiment ids. Ids
619 // prefixed with the character "t" will be treated as Trigger Variation Ids.
620 const char kForceVariationIds[] = "force-variation-ids";
622 // Forces Chrome to use localNTP instead of server (GWS) NTP.
623 const char kForceLocalNtp[] = "force-local-ntp";
625 // Enables grouping websites by domain and filtering them by period.
626 const char kHistoryEnableGroupByDomain[] = "enable-grouped-history";
628 // Specifies which page will be displayed in newly-opened tabs. We need this
629 // for testing purposes so that the UI tests don't depend on what comes up for
630 // http://google.com.
631 const char kHomePage[] = "homepage";
633 // Comma-separated list of rules that control how hostnames are mapped.
635 // For example:
636 // "MAP * 127.0.0.1" --> Forces all hostnames to be mapped to 127.0.0.1
637 // "MAP *.google.com proxy" --> Forces all google.com subdomains to be
638 // resolved to "proxy".
639 // "MAP test.com [::1]:77 --> Forces "test.com" to resolve to IPv6 loopback.
640 // Will also force the port of the resulting
641 // socket address to be 77.
642 // "MAP * baz, EXCLUDE www.google.com" --> Remaps everything to "baz",
643 // except for "www.google.com".
645 // These mappings apply to the endpoint host in a net::URLRequest (the TCP
646 // connect and host resolver in a direct connection, and the CONNECT in an http
647 // proxy connection, and the endpoint host in a SOCKS proxy connection).
648 const char kHostRules[] = "host-rules";
650 // The maximum number of retry attempts to resolve the host. Set this to zero
651 // to disable host resolver retry attempts.
652 const char kHostResolverRetryAttempts[] = "host-resolver-retry-attempts";
654 // Causes net::URLFetchers to ignore requests for SSL client certificates,
655 // causing them to attempt an unauthenticated SSL/TLS session. This is intended
656 // for use when testing various service URLs (eg: kPromoServerURL, kSbURLPrefix,
657 // kSyncServiceURL, etc)
658 const char kIgnoreUrlFetcherCertRequests[] =
659 "ignore-urlfetcher-cert-requests";
661 // Causes the browser to launch directly in incognito mode.
662 const char kIncognito[] = "incognito";
664 // Causes Chrome to initiate an installation flow for the given app.
665 const char kInstallChromeApp[] = "install-chrome-app";
667 // A list of whitelists to install for a supervised user, for testing.
668 // The list is of the following form: <id>[:<name>],[<id>[:<name>],...]
669 const char kInstallSupervisedUserWhitelists[] =
670 "install-supervised-user-whitelists";
672 // Marks a renderer as an Instant process.
673 const char kInstantProcess[] = "instant-process";
675 // Invalidation service should use GCM network channel even if experiment is not
676 // enabled.
677 const char kInvalidationUseGCMChannel[] = "invalidation-use-gcm-channel";
679 // Disable latest shipping ECMAScript 6 features.
680 const char kDisableJavaScriptHarmonyShipping[] =
681 "disable-javascript-harmony-shipping";
683 // Enables experimental Harmony (ECMAScript 6) features.
684 const char kJavaScriptHarmony[] = "javascript-harmony";
686 // Dumps IPC messages sent from renderer processes to the browser process to
687 // the given directory. Used primarily to gather samples for IPC fuzzing.
688 const char kIpcDumpDirectory[] = "ipc-dump-directory";
690 // Used for testing - keeps browser alive after last browser window closes.
691 const char kKeepAliveForTest[] = "keep-alive-for-test";
693 // Enable Kiosk mode.
694 const char kKioskMode[] = "kiosk";
696 // Print automatically in kiosk mode. |kKioskMode| must be set as well.
697 // See http://crbug.com/31395.
698 const char kKioskModePrinting[] = "kiosk-printing";
700 // Comma-separated list of directories with component extensions to load.
701 const char kLoadComponentExtension[] = "load-component-extension";
703 // Loads an extension from the specified directory.
704 const char kLoadExtension[] = "load-extension";
706 #if !defined(OFFICIAL_BUILD)
707 // Enables a live-reload for local NTP resources. This only works when Chrome
708 // is running from a Chrome source directory.
709 const char kLocalNtpReload[] = "local-ntp-reload";
710 #endif
712 // Makes Chrome default browser
713 const char kMakeDefaultBrowser[] = "make-default-browser";
715 // Use to opt-in to marking HTTP as non-secure.
716 const char kMarkNonSecureAs[] = "mark-non-secure-as";
717 const char kMarkNonSecureAsNeutral[] = "neutral";
718 const char kMarkNonSecureAsNonSecure[] = "non-secure";
720 // Forces the maximum disk space to be used by the media cache, in bytes.
721 const char kMediaCacheSize[] = "media-cache-size";
723 // Enables histograming of tasks served by MessageLoop. See
724 // about:histograms/Loop for results, which show frequency of messages on each
725 // thread, including APC count, object signalling count, etc.
726 const char kMessageLoopHistogrammer[] = "message-loop-histogrammer";
728 // Enables the recording of metrics reports but disables reporting. In contrast
729 // to kDisableMetrics, this executes all the code that a normal client would
730 // use for reporting, except the report is dropped rather than sent to the
731 // server. This is useful for finding issues in the metrics code during UI and
732 // performance tests.
733 const char kMetricsRecordingOnly[] = "metrics-recording-only";
735 // Allows setting a different destination ID for connection-monitoring GCM
736 // messages. Useful when running against a non-prod management server.
737 const char kMonitoringDestinationID[] = "monitoring-destination-id";
739 // Sets the granularity of events to capture in the network log. The mode can be
740 // set to one of the following values:
741 // "Default"
742 // "IncludeCookiesAndCredentials"
743 // "IncludeSocketBytes"
745 // See the functions of the corresponding name in net_log_capture_mode.h for a
746 // description of their meaning.
747 const char kNetLogCaptureMode[] = "net-log-capture-mode";
749 // Disables the default browser check. Useful for UI/browser tests where we
750 // want to avoid having the default browser info-bar displayed.
751 const char kNoDefaultBrowserCheck[] = "no-default-browser-check";
753 // By default, an https page can load images, fonts or frames from an http
754 // page. This switch overrides this to block this lesser mixed-content problem.
755 const char kNoDisplayingInsecureContent[] = "no-displaying-insecure-content";
757 // Disables all experiments set on about:flags. Does not disable about:flags
758 // itself. Useful if an experiment makes chrome crash at startup: One can start
759 // chrome with --no-experiments, disable the problematic lab at about:flags and
760 // then restart chrome without this switch again.
761 const char kNoExperiments[] = "no-experiments";
763 // Skip First Run tasks, whether or not it's actually the First Run. Overridden
764 // by kForceFirstRun. This does not drop the First Run sentinel and thus doesn't
765 // prevent first run from occuring the next time chrome is launched without this
766 // flag.
767 const char kNoFirstRun[] = "no-first-run";
769 // Don't send hyperlink auditing pings
770 const char kNoPings[] = "no-pings";
772 // Don't use a proxy server, always make direct connections. Overrides any
773 // other proxy server flags that are passed.
774 const char kNoProxyServer[] = "no-proxy-server";
776 // Disables the service process from adding itself as an autorun process. This
777 // does not delete existing autorun registrations, it just prevents the service
778 // from registering a new one.
779 const char kNoServiceAutorun[] = "no-service-autorun";
781 // Does not automatically open a browser window on startup (used when
782 // launching Chrome for the purpose of hosting background apps).
783 const char kNoStartupWindow[] = "no-startup-window";
785 // Disables checking whether we received an acknowledgment when registering
786 // a supervised user. Also disables the timeout during registration that waits
787 // for the ack. Useful when debugging against a server that does not
788 // support notifications.
789 const char kNoSupervisedUserAcknowledgmentCheck[] =
790 "no-managed-user-acknowledgment-check";
792 // Specifies the maximum number of threads to use for running the Proxy
793 // Autoconfig (PAC) script.
794 const char kNumPacThreads[] = "num-pac-threads";
796 // Launches URL in new browser window.
797 const char kOpenInNewWindow[] = "new-window";
799 // Force use of QUIC for requests to the specified origin.
800 const char kOriginToForceQuicOn[] = "origin-to-force-quic-on";
802 // The time that a new chrome process which is delegating to an already running
803 // chrome process started. (See ProcessSingleton for more details.)
804 const char kOriginalProcessStartTime[] = "original-process-start-time";
806 // Packages an extension to a .crx installable file from a given directory.
807 const char kPackExtension[] = "pack-extension";
809 // Optional PEM private key to use in signing packaged .crx.
810 const char kPackExtensionKey[] = "pack-extension-key";
812 // Specifies the path to the user data folder for the parent profile.
813 const char kParentProfile[] = "parent-profile";
815 // Development flag for permission request API. This flag is needed until
816 // the API is finalized.
817 // TODO(bauerb): Remove when this flag is not needed anymore.
818 const char kPermissionRequestApiScope[] = "permission-request-api-scope";
820 // Development flag for permission request API. This flag is needed until
821 // the API is finalized.
822 // TODO(bauerb): Remove when this flag is not needed anymore.
823 const char kPermissionRequestApiUrl[] = "permission-request-api-url";
825 // Use the PPAPI (Pepper) Flash found at the given path.
826 const char kPpapiFlashPath[] = "ppapi-flash-path";
828 // Report the given version for the PPAPI (Pepper) Flash. The version should be
829 // numbers separated by '.'s (e.g., "12.3.456.78"). If not specified, it
830 // defaults to "10.2.999.999".
831 const char kPpapiFlashVersion[] = "ppapi-flash-version";
833 // Triggers prerendering of pages from suggestions in the omnibox. Only has an
834 // effect when Instant is either disabled or restricted to search, and when
835 // prerender is enabled.
836 const char kPrerenderFromOmnibox[] = "prerender-from-omnibox";
837 // These are the values the kPrerenderFromOmnibox switch may have, as in
838 // "--prerender-from-omnibox=auto". auto: Allow field trial selection.
839 const char kPrerenderFromOmniboxSwitchValueAuto[] = "auto";
840 // disabled: No prerendering.
841 const char kPrerenderFromOmniboxSwitchValueDisabled[] = "disabled";
842 // enabled: Guaranteed prerendering.
843 const char kPrerenderFromOmniboxSwitchValueEnabled[] = "enabled";
844 // Controls speculative prerendering of pages, and content prefetching. Both
845 // are dispatched from <link rel=prefetch href=...> elements.
846 const char kPrerenderMode[] = "prerender";
847 // These are the values the kPrerenderMode switch may have, as in
848 // "--prerender=disabled".
849 // disabled: No prerendering.
850 const char kPrerenderModeSwitchValueDisabled[] = "disabled";
851 // enabled: Prerendering.
852 const char kPrerenderModeSwitchValueEnabled[] = "enabled";
854 // Use IPv6 only for privet HTTP.
855 const char kPrivetIPv6Only[] = "privet-ipv6-only";
857 // Outputs the product version information and quit. Used as an internal api to
858 // detect the installed version of Chrome on Linux.
859 const char kProductVersion[] = "product-version";
861 // Selects directory of profile to associate with the first browser launched.
862 const char kProfileDirectory[] = "profile-directory";
864 // Starts the sampling based profiler for the browser process at startup. This
865 // will only work if chrome has been built with the gyp variable profiling=1.
866 // The output will go to the value of kProfilingFile.
867 const char kProfilingAtStart[] = "profiling-at-start";
869 // Specifies a location for profiling output. This will only work if chrome has
870 // been built with the gyp variable profiling=1.
872 // {pid} if present will be replaced by the pid of the process.
873 // {count} if present will be incremented each time a profile is generated
874 // for this process.
875 // The default is chrome-profile-{pid}.
876 const char kProfilingFile[] = "profiling-file";
878 // Controls whether profile data is periodically flushed to a file. Normally
879 // the data gets written on exit but cases exist where chrome doesn't exit
880 // cleanly (especially when using single-process). A time in seconds can be
881 // specified.
882 const char kProfilingFlush[] = "profiling-flush";
884 // Forces proxy auto-detection.
885 const char kProxyAutoDetect[] = "proxy-auto-detect";
887 // Specifies a list of hosts for whom we bypass proxy settings and use direct
888 // connections. Ignored if --proxy-auto-detect or --no-proxy-server are also
889 // specified. This is a comma-separated list of bypass rules. See:
890 // "net/proxy/proxy_bypass_rules.h" for the format of these rules.
891 const char kProxyBypassList[] = "proxy-bypass-list";
893 // Uses the pac script at the given URL
894 const char kProxyPacUrl[] = "proxy-pac-url";
896 // Uses a specified proxy server, overrides system settings. This switch only
897 // affects HTTP and HTTPS requests.
898 const char kProxyServer[] = "proxy-server";
900 // Specifies a comma separated list of QUIC connection options to send to
901 // the server.
902 const char kQuicConnectionOptions[] = "quic-connection-options";
904 // Specifies the maximum length for a QUIC packet.
905 const char kQuicMaxPacketLength[] = "quic-max-packet-length";
907 // Specifies the version of QUIC to use.
908 const char kQuicVersion[] = "quic-version";
910 // Porvides a list of addresses to discover DevTools remote debugging targets.
911 // The format is <host>:<port>,...,<host>:port.
912 const char kRemoteDebuggingTargets[] = "remote-debugging-targets";
914 // Indicates the last session should be restored on startup. This overrides the
915 // preferences value and is primarily intended for testing. The value of this
916 // switch is the number of tabs to wait until loaded before 'load completed' is
917 // sent to the ui_test.
918 const char kRestoreLastSession[] = "restore-last-session";
920 // Causes all iframes to be denied all permissions by default. Allowing
921 // particular permissions for an iframe may involve listing the names of
922 // these permissions as values of new iframe attributes.
923 const char kRestrictIFramePermissions[] = "restrict-iframe-permissions";
925 // Disable saving pages as HTML-only, disable saving pages as HTML Complete
926 // (with a directory of sub-resources). Enable only saving pages as MHTML.
927 // See http://crbug.com/120416 for how to remove this switch.
928 const char kSavePageAsMHTML[] = "save-page-as-mhtml";
930 // If present, safebrowsing only performs update when
931 // SafeBrowsingProtocolManager::ForceScheduleNextUpdate() is explicitly called.
932 // This is used for testing only.
933 const char kSbDisableAutoUpdate[] = "safebrowsing-disable-auto-update";
935 // TODO(lzheng): Remove this flag once the feature works fine
936 // (http://crbug.com/74848).
938 // Disables safebrowsing feature that checks download url and downloads
939 // content's hash to make sure the content are not malicious.
940 const char kSbDisableDownloadProtection[] =
941 "safebrowsing-disable-download-protection";
943 // Disables safebrowsing feature that checks for blacklisted extensions.
944 const char kSbDisableExtensionBlacklist[] =
945 "safebrowsing-disable-extension-blacklist";
947 // Causes the process to run as a service process.
948 const char kServiceProcess[] = "service";
950 // If true the app list will be shown.
951 const char kShowAppList[] = "show-app-list";
953 // Command line flag offering a "Show saved copy" option to the user if offline.
954 // The various modes are disabled, primary, or secondary. Primary/secondary
955 // refers to button placement (for experiment).
956 const char kShowSavedCopy[] = "show-saved-copy";
958 // Values for the kShowSavedCopy flag.
959 const char kEnableShowSavedCopyPrimary[] = "primary";
960 const char kEnableShowSavedCopySecondary[] = "secondary";
961 const char kDisableShowSavedCopy[] = "disable";
963 // Does not show an infobar when an extension attaches to a page using
964 // chrome.debugger page. Required to attach to extension background pages.
965 const char kSilentDebuggerExtensionAPI[] = "silent-debugger-extension-api";
967 // Causes Chrome to launch without opening any windows by default. Useful if
968 // one wishes to use Chrome as an ash server.
969 const char kSilentLaunch[] = "silent-launch";
971 // Simulates that elevation is needed to recover upgrade channel.
972 const char kSimulateElevatedRecovery[] = "simulate-elevated-recovery";
974 // Simulates a critical update being available.
975 const char kSimulateCriticalUpdate[] = "simulate-critical-update";
977 // Simulates that current version is outdated.
978 const char kSimulateOutdated[] = "simulate-outdated";
980 // Simulates that current version is outdated and auto-update is off.
981 const char kSimulateOutdatedNoAU[] = "simulate-outdated-no-au";
983 // Simulates an update being available.
984 const char kSimulateUpgrade[] = "simulate-upgrade";
986 // Speculative resource prefetching.
987 const char kSpeculativeResourcePrefetching[] =
988 "speculative-resource-prefetching";
990 // Speculative resource prefetching is disabled.
991 const char kSpeculativeResourcePrefetchingDisabled[] = "disabled";
993 // Speculative resource prefetching will only learn about resources that need to
994 // be prefetched but will not prefetch them.
995 const char kSpeculativeResourcePrefetchingLearning[] = "learning";
997 // Speculative resource prefetching is enabled.
998 const char kSpeculativeResourcePrefetchingEnabled[] = "enabled";
1000 #if defined(ENABLE_SPELLCHECK)
1001 #if defined(OS_ANDROID)
1002 // Enables use of the Android spellchecker.
1003 const char kEnableAndroidSpellChecker[] = "enable-android-spellchecker";
1004 #endif
1006 // Enables the multilingual spellchecker.
1007 const char kEnableMultilingualSpellChecker[] =
1008 "enable-multilingual-spellchecker";
1010 // Enables auto correction for misspelled words.
1011 const char kEnableSpellingAutoCorrect[] = "enable-spelling-auto-correct";
1013 // Enables participation in the field trial for user feedback to spelling
1014 // service.
1015 const char kEnableSpellingFeedbackFieldTrial[] =
1016 "enable-spelling-feedback-field-trial";
1018 // Specifies the URL where spelling service feedback data will be sent instead
1019 // of the default URL. This switch is for temporary testing only.
1020 // TODO(rouslan): Remove this flag when feedback testing is complete. Revisit by
1021 // August 2013.
1022 const char kSpellingServiceFeedbackUrl[] = "spelling-service-feedback-url";
1024 // Specifies the number of seconds between sending batches of feedback to
1025 // spelling service. The default is 30 minutes. The minimum is 5 seconds. This
1026 // switch is for temporary testing only.
1027 // TODO(rouslan): Remove this flag when feedback testing is complete. Revisit by
1028 // August 2013.
1029 const char kSpellingServiceFeedbackIntervalSeconds[] =
1030 "spelling-service-feedback-interval-seconds";
1031 #endif
1033 // Specifies the maximum SSL/TLS version ("tls1", "tls1.1", or "tls1.2").
1034 const char kSSLVersionMax[] = "ssl-version-max";
1036 // Specifies the minimum SSL/TLS version ("tls1", "tls1.1", or "tls1.2").
1037 const char kSSLVersionMin[] = "ssl-version-min";
1039 // Specifies the minimum SSL/TLS version ("tls1", "tls1.1", or "tls1.2") that
1040 // TLS fallback will accept.
1041 const char kSSLVersionFallbackMin[] = "ssl-version-fallback-min";
1043 // These values aren't switches, but rather the values that kSSLVersionMax,
1044 // kSSLVersionMin and kSSLVersionFallbackMin can have.
1045 const char kSSLVersionTLSv1[] = "tls1";
1046 const char kSSLVersionTLSv11[] = "tls1.1";
1047 const char kSSLVersionTLSv12[] = "tls1.2";
1049 // Starts the browser maximized, regardless of any previous settings.
1050 const char kStartMaximized[] = "start-maximized";
1052 // Sets the supervised user ID for any loaded or newly created profile to the
1053 // given value. Pass an empty string to mark the profile as non-supervised.
1054 // Used for testing.
1055 const char kSupervisedUserId[] = "managed-user-id";
1057 // Enables/disables SafeSites filtering for supervised users. Possible values
1058 // are "enabled", "disabled", "blacklist-only", and "online-check-only".
1059 const char kSupervisedUserSafeSites[] = "supervised-user-safesites";
1061 // Used to authenticate requests to the Sync service for supervised users.
1062 // Setting this switch also causes Sync to be set up for a supervised user.
1063 const char kSupervisedUserSyncToken[] = "managed-user-sync-token";
1065 // This flag causes sync to retry very quickly (see polling_constants.h) the
1066 // when it encounters an error, as the first step towards exponential backoff.
1067 const char kSyncShortInitialRetryOverride[] =
1068 "sync-short-initial-retry-override";
1070 // Overrides the default server used for profile sync.
1071 const char kSyncServiceURL[] = "sync-url";
1073 // Enables deferring sync backend initialization until user initiated changes
1074 // occur.
1075 const char kSyncDisableDeferredStartup[] = "sync-disable-deferred-startup";
1077 // Allows overriding the deferred init fallback timeout.
1078 const char kSyncDeferredStartupTimeoutSeconds[] =
1079 "sync-deferred-startup-timeout-seconds";
1081 // Enables feature to avoid unnecessary GetUpdate requests.
1082 const char kSyncEnableGetUpdateAvoidance[] =
1083 "sync-enable-get-update-avoidance";
1085 // Enables clearing of sync data when a user enables passphrase encryption.
1086 const char kSyncEnableClearDataOnPassphraseEncryption[] =
1087 "enable-clear-sync-data-on-passphrase-encryption";
1089 // Disable data backup when user's not signed in.
1090 const char kSyncDisableBackup[] = "disable-sync-backup";
1092 // Disable sync rollback.
1093 const char kSyncDisableRollback[] = "disable-sync-rollback";
1095 // Frequency in Milliseconds for system log uploads. Should only be used for
1096 // testing purposes.
1097 const char kSystemLogUploadFrequency[] = "system-log-upload-frequency";
1099 // Passes the name of the current running automated test to Chrome.
1100 const char kTestName[] = "test-name";
1102 // Disables same-origin check on HTTP resources pushed via a SPDY proxy.
1103 // The value is the host:port of the trusted proxy.
1104 const char kTrustedSpdyProxy[] = "trusted-spdy-proxy";
1106 // Experimental. Shows a dialog asking the user to try chrome. This flag is to
1107 // be used only by the upgrade process.
1108 const char kTryChromeAgain[] = "try-chrome-again";
1110 // Overrides per-origin quota settings to unlimited storage for any
1111 // apps/origins. This should be used only for testing purpose.
1112 const char kUnlimitedStorage[] = "unlimited-storage";
1114 // Treat given (insecure) origins as secure origins. Multiple origins can be
1115 // supplied. Has no effect unless --user-data-dir is also supplied.
1116 // Example:
1117 // --unsafely-treat-insecure-origin-as-secure=http://a.test,http://b.test
1118 // --user-data-dir=/test/only/profile/dir
1119 const char kUnsafelyTreatInsecureOriginAsSecure[] =
1120 "unsafely-treat-insecure-origin-as-secure";
1122 // Uses Spdy for the transport protocol instead of HTTP. This is a temporary
1123 // testing flag.
1124 const char kUseSpdy[] = "use-spdy";
1126 // A string used to override the default user agent with a custom one.
1127 const char kUserAgent[] = "user-agent";
1129 // Specifies the user data directory, which is where the browser will look for
1130 // all of its state.
1131 const char kUserDataDir[] = "user-data-dir";
1133 // Examines a .crx for validity and prints the result.
1134 const char kValidateCrx[] = "validate-crx";
1136 // Uses experimental simple cache backend if possible.
1137 const char kUseSimpleCacheBackend[] = "use-simple-cache-backend";
1139 // Enables using an in-process Mojo service for the v8 proxy resolver.
1140 const char kV8PacMojoInProcess[] = "v8-pac-mojo-in-process";
1142 // Enables using an out-of-process Mojo service for the v8 proxy resolver.
1143 const char kV8PacMojoOutOfProcess[] = "v8-pac-mojo-out-of-process";
1145 // Specifies a custom URL for the server which reports variation data to the
1146 // client. Specifying this switch enables the Variations service on
1147 // unofficial builds. See variations_service.cc.
1148 const char kVariationsServerURL[] = "variations-server-url";
1150 // Prints version information and quits.
1151 const char kVersion[] = "version";
1153 // Specify the initial window position: --window-position=x,y
1154 const char kWindowPosition[] = "window-position";
1156 // Specify the initial window size: --window-size=w,h
1157 const char kWindowSize[] = "window-size";
1159 // Uses WinHTTP to fetch and evaluate PAC scripts. Otherwise the default is to
1160 // use Chromium's network stack to fetch, and V8 to evaluate.
1161 const char kWinHttpProxyResolver[] = "winhttp-proxy-resolver";
1163 // Specifies which category option was clicked in the Windows Jumplist that
1164 // resulted in a browser startup.
1165 const char kWinJumplistAction[] = "win-jumplist-action";
1167 #if defined(OS_ANDROID)
1168 // Android authentication account type for SPNEGO authentication
1169 const char kAuthAndroidNegotiateAccountType[] = "auth-spnego-account-type";
1171 // Disables Contextual Search.
1172 const char kDisableContextualSearch[] = "disable-contextual-search";
1174 // Disables zero suggest experiment on Dev channel.
1175 const char kDisableZeroSuggest[] = "disable-zero-suggest";
1177 // Enable the accessibility tab switcher.
1178 const char kEnableAccessibilityTabSwitcher[] =
1179 "enable-accessibility-tab-switcher";
1181 // Enables Contextual Search.
1182 const char kEnableContextualSearch[] = "enable-contextual-search";
1184 // Enables the DOM distiller animated button UI for Android.
1185 const char kEnableDomDistillerButtonAnimation[] =
1186 "enable-dom-distiller-button-animation";
1188 // Enables chrome hosted mode for Android.
1189 const char kEnableHostedMode[] = "enable-hosted-mode";
1191 // Enables context-sensitive reader mode button in the toolbar.
1192 const char kEnableReaderModeToolbarIcon[] =
1193 "enable-reader-mode-toolbar-icon";
1195 // Enables zero suggest functionality on Dev channel, showing most visited
1196 // sites as default suggestions.
1197 const char kEnableZeroSuggestMostVisited[] =
1198 "enable-zero-suggest-most-visited";
1200 // Enable zero suggest functionality on Dev channel, showing most visited
1201 // sites on non-search-result pages as default suggestions.
1202 const char kEnableZeroSuggestMostVisitedWithoutSerp[] =
1203 "enable-zero-suggest-most-visited-without-serp";
1205 // Specifies Android phone page loading progress bar animation.
1206 const char kProgressBarAnimation[] = "progress-bar-animation";
1207 #endif // defined(OS_ANDROID)
1209 #if defined(USE_ASH)
1210 const char kOpenAsh[] = "open-ash";
1211 #endif
1213 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_CHROMEOS)
1214 // These flags show the man page on Linux. They are equivalent to each
1215 // other.
1216 const char kHelp[] = "help";
1217 const char kHelpShort[] = "h";
1219 // Specifies which password store to use (detect, default, gnome, kwallet).
1220 const char kPasswordStore[] = "password-store";
1221 #endif
1223 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
1224 // Triggers migration of user data directory to another directory
1225 // specified as a parameter. The migration is done under singleton lock,
1226 // and sanity checks are made to avoid corrupting the profile.
1227 // The browser exits after migration is complete.
1228 const char kMigrateDataDirForSxS[] = "migrate-data-dir-for-sxs";
1229 #endif // defined(OS_LINUX) && !defined(OS_CHROMEOS)
1231 #if defined(OS_MACOSX)
1232 // Prevents Chrome from quitting when Chrome Apps are open.
1233 const char kAppsKeepChromeAliveInTests[] = "apps-keep-chrome-alive-in-tests";
1235 // Shows a notification when quitting Chrome with hosted apps running. Default
1236 // behavior is to also quit all hosted apps.
1237 const char kHostedAppQuitNotification[] = "enable-hosted-app-quit-notification";
1239 // Disable the toolkit-views App Info dialog for Mac.
1240 const char kDisableAppInfoDialogMac[] = "disable-app-info-dialog-mac";
1242 // Disables custom Cmd+` window cycling for platform apps and hosted apps.
1243 const char kDisableAppWindowCycling[] = "disable-app-window-cycling";
1245 // Disables app shim creation for hosted apps on Mac.
1246 const char kDisableHostedAppShimCreation[] = "disable-hosted-app-shim-creation";
1248 // Prevents hosted apps from being opened in windows on Mac.
1249 const char kDisableHostedAppsInWindows[] = "disable-hosted-apps-in-windows";
1251 // Disables use of toolkit-views based native app windows.
1252 const char kDisableMacViewsNativeAppWindows[] =
1253 "disable-mac-views-native-app-windows";
1255 // Disables Translate experimental new UX which replaces the infobar.
1256 const char kDisableTranslateNewUX[] = "disable-translate-new-ux";
1258 // Enable the toolkit-views App Info dialog for Mac. This is accessible from
1259 // chrome://apps and chrome://extensions and is already enabled on non-mac.
1260 const char kEnableAppInfoDialogMac[] = "enable-app-info-dialog-mac";
1262 // Enables custom Cmd+` window cycling for platform apps and hosted apps.
1263 const char kEnableAppWindowCycling[] = "enable-app-window-cycling";
1265 // Allows hosted apps to be opened in windows on Mac.
1266 const char kEnableHostedAppsInWindows[] = "enable-hosted-apps-in-windows";
1268 // Enables use of toolkit-views based native app windows.
1269 const char kEnableMacViewsNativeAppWindows[] =
1270 "enable-mac-views-native-app-windows";
1272 // Causes Chrome to use an equivalent toolkit-views version of a browser dialog
1273 // when available, rather than a Cocoa one.
1274 const char kEnableMacViewsDialogs[] = "enable-mac-views-dialogs";
1276 // Enables Translate experimental new UX which replaces the infobar.
1277 const char kEnableTranslateNewUX[] = "enable-translate-new-ux";
1279 // This is how the metrics client ID is passed from the browser process to its
1280 // children. With Crashpad, the metrics client ID is distinct from the crash
1281 // client ID.
1282 const char kMetricsClientID[] = "metrics-client-id";
1284 // A process type (switches::kProcessType) that relaunches the browser. See
1285 // chrome/browser/mac/relauncher.h.
1286 const char kRelauncherProcess[] = "relauncher";
1287 #endif // defined(OS_MACOSX)
1289 // Use bubbles for content permissions requests instead of infobars.
1290 const char kEnablePermissionsBubbles[] = "enable-permissions-bubbles";
1292 #if defined(OS_WIN)
1293 // Fallback to XPS. By default connector uses CDD.
1294 const char kEnableCloudPrintXps[] = "enable-cloud-print-xps";
1296 // Force-enables the profile shortcut manager. This is needed for tests since
1297 // they use a custom-user-data-dir which disables this.
1298 const char kEnableProfileShortcutManager[] = "enable-profile-shortcut-manager";
1300 // For the DelegateExecute verb handler to launch Chrome in metro mode on
1301 // Windows 8 and higher. Used when relaunching metro Chrome.
1302 const char kForceImmersive[] = "force-immersive";
1304 // Whether or not the browser should warn if the profile is on a network share.
1305 // This flag is only relevant for Windows currently.
1306 const char kNoNetworkProfileWarning[] = "no-network-profile-warning";
1308 // For the DelegateExecute verb handler to launch Chrome in desktop mode on
1309 // Windows 8 and higher. Used when relaunching metro Chrome.
1310 const char kForceDesktop[] = "force-desktop";
1312 // Makes Windows happy by allowing it to show "Enable access to this program"
1313 // checkbox in Add/Remove Programs->Set Program Access and Defaults. This only
1314 // shows an error box because the only way to hide Chrome is by uninstalling
1315 // it.
1316 const char kHideIcons[] = "hide-icons";
1318 // Relaunches metro Chrome on Windows 8 and higher using a given shortcut.
1319 const char kRelaunchShortcut[] = "relaunch-shortcut";
1321 // See kHideIcons.
1322 const char kShowIcons[] = "show-icons";
1324 // Runs un-installation steps that were done by chrome first-run.
1325 const char kUninstall[] = "uninstall";
1327 // Requests that Chrome launch the Metro viewer process via the given appid
1328 // (which is assumed to be registered as default browser) and synchronously
1329 // connect to it.
1330 const char kViewerLaunchViaAppId[] = "viewer-launch-via-appid";
1332 // Waits for the given handle to be signaled before relaunching metro Chrome on
1333 // Windows 8 and higher.
1334 const char kWaitForMutex[] = "wait-for-mutex";
1336 // Indicates that chrome was launched to service a search request in Windows 8.
1337 const char kWindows8Search[] = "windows8-search";
1338 #endif // defined(OS_WIN)
1340 #if defined(OS_WIN) || defined(OS_MACOSX)
1341 // Enable tab discarding when system is under memory pressure.
1342 const char kEnableTabDiscarding[] = "enable-tab-discarding";
1343 #endif // defined(OS_WIN) || defined(OS_MACOSX)
1345 #if defined(ENABLE_IPC_FUZZER)
1346 // Specifies the testcase used by the IPC fuzzer.
1347 const char kIpcFuzzerTestcase[] = "ipc-fuzzer-testcase";
1348 #endif
1350 #if defined(ENABLE_PRINT_PREVIEW) && !defined(OFFICIAL_BUILD)
1351 // Enables support to debug printing subsystem.
1352 const char kDebugPrint[] = "debug-print";
1353 #endif
1355 #if defined(ENABLE_TASK_MANAGER)
1356 // Disables the new implementation of the task manager.
1357 const char kDisableNewTaskManager[] = "disable-new-task-manager";
1358 #endif // defined(ENABLE_TASK_MANAGER)
1360 bool AboutInSettingsEnabled() {
1361 return SettingsWindowEnabled() &&
1362 !base::CommandLine::ForCurrentProcess()->HasSwitch(
1363 ::switches::kDisableAboutInSettings);
1366 bool MdSettingsEnabled() {
1367 return base::CommandLine::ForCurrentProcess()->HasSwitch(
1368 ::switches::kEnableMaterialDesignSettings);
1371 bool MediaRouterEnabled() {
1372 return base::CommandLine::ForCurrentProcess()->HasSwitch(
1373 ::switches::kEnableMediaRouter);
1376 bool PdfMaterialUIEnabled() {
1377 if (base::CommandLine::ForCurrentProcess()->HasSwitch(kEnablePdfMaterialUI))
1378 return true;
1380 if (base::CommandLine::ForCurrentProcess()->HasSwitch(kDisablePdfMaterialUI))
1381 return false;
1383 // Default.
1384 return true;
1387 bool SettingsWindowEnabled() {
1388 #if defined(OS_CHROMEOS)
1389 return !base::CommandLine::ForCurrentProcess()->HasSwitch(
1390 ::switches::kDisableSettingsWindow);
1391 #else
1392 return base::CommandLine::ForCurrentProcess()->HasSwitch(
1393 ::switches::kEnableSettingsWindow);
1394 #endif
1397 #if defined(OS_CHROMEOS)
1398 bool PowerOverlayEnabled() {
1399 return base::CommandLine::ForCurrentProcess()->HasSwitch(
1400 ::switches::kEnablePowerOverlay);
1402 #endif
1404 #if defined(ENABLE_TASK_MANAGER)
1405 bool NewTaskManagerEnabled() {
1406 return !base::CommandLine::ForCurrentProcess()->HasSwitch(
1407 kDisableNewTaskManager);
1409 #endif // defined(ENABLE_TASK_MANAGER)
1411 // -----------------------------------------------------------------------------
1412 // DO NOT ADD YOUR CRAP TO THE BOTTOM OF THIS FILE.
1414 // You were going to just dump your switches here, weren't you? Instead, please
1415 // put them in alphabetical order above, or in order inside the appropriate
1416 // ifdef at the bottom. The order should match the header.
1417 // -----------------------------------------------------------------------------
1419 } // namespace switches