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