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.
4 
5 #include "chrome/common/chrome_switches.h"
6 
7 #include "build/build_config.h"
8 #include "ppapi/buildflags/buildflags.h"
9 #include "printing/buildflags/buildflags.h"
10 
11 namespace switches {
12 
13 // -----------------------------------------------------------------------------
14 // Can't find the switch you are looking for? Try looking in:
15 // ash/public/cpp/ash_switches.cc
16 // base/base_switches.cc
17 // chromeos/constants/chromeos_switches.cc
18 // etc.
19 //
20 // When commenting your switch, please use the same voice as surrounding
21 // comments. Imagine "This switch..." at the beginning of the phrase, and it'll
22 // all work out.
23 // -----------------------------------------------------------------------------
24 
25 // Allows third-party content included on a page to prompt for a HTTP basic
26 // auth username/password pair.
27 const char kAllowCrossOriginAuthPrompt[]    = "allow-cross-origin-auth-prompt";
28 
29 // Allow non-secure origins to use the screen capture API and the desktopCapture
30 // extension API.
31 const char kAllowHttpScreenCapture[] = "allow-http-screen-capture";
32 
33 // Don't block outdated plugins.
34 const char kAllowOutdatedPlugins[]          = "allow-outdated-plugins";
35 
36 // Allows profiles to be created outside of the user data dir.
37 // TODO(https://crbug.com/1060366): Various places in Chrome assume that all
38 // profiles are within the user data dir. Some tests need to violate that
39 // assumption. The switch should be removed after this workaround is no longer
40 // needed.
41 const char kAllowProfilesOutsideUserDir[] = "allow-profiles-outside-user-dir";
42 
43 // By default, an https page cannot run JavaScript, CSS or plugins from http
44 // URLs. This provides an override to get the old insecure behavior.
45 const char kAllowRunningInsecureContent[]   = "allow-running-insecure-content";
46 
47 // Allows Web Push notifications that do not show a notification.
48 const char kAllowSilentPush[] = "allow-silent-push";
49 
50 // Specifies that the associated value should be launched in "application"
51 // mode.
52 const char kApp[]                           = "app";
53 
54 // Specifies that the extension-app with the specified id should be launched
55 // according to its configuration.
56 const char kAppId[]                         = "app-id";
57 
58 // Value of GAIA auth code for --force-app-mode.
59 const char kAppModeAuthCode[]               = "app-mode-auth-code";
60 
61 // Value of OAuth2 refresh token for --force-app-mode.
62 const char kAppModeOAuth2Token[]            = "app-mode-oauth-token";
63 
64 // The URL that the webstore APIs download extensions from.
65 // Note: the URL must contain one '%s' for the extension ID.
66 const char kAppsGalleryDownloadURL[]        = "apps-gallery-download-url";
67 
68 // The update url used by gallery/webstore extensions.
69 const char kAppsGalleryUpdateURL[]          = "apps-gallery-update-url";
70 
71 // The URL to use for the gallery link in the app launcher.
72 const char kAppsGalleryURL[]                = "apps-gallery-url";
73 
74 // Whitelist for Negotiate Auth servers
75 const char kAuthServerWhitelist[]           = "auth-server-whitelist";
76 
77 // This flag makes Chrome auto-open DevTools window for each tab. It is
78 // intended to be used by developers and automation to not require user
79 // interaction for opening DevTools.
80 const char kAutoOpenDevToolsForTabs[]       = "auto-open-devtools-for-tabs";
81 
82 // This flag makes Chrome auto-select the provided choice when an extension asks
83 // permission to start desktop capture. Should only be used for tests. For
84 // instance, --auto-select-desktop-capture-source="Entire screen" will
85 // automatically select sharing the entire screen in English locales. The switch
86 // value only needs to be substring of the capture source name, i.e. "display"
87 // would match "Built-in display" and "External display", whichever comes first.
88 const char kAutoSelectDesktopCaptureSource[] =
89     "auto-select-desktop-capture-source";
90 
91 // This flag causes the user engagement checks for showing app banners to be
92 // bypassed. It is intended to be used by developers who wish to test that their
93 // sites otherwise meet the criteria needed to show app banners.
94 const char kBypassAppBannerEngagementChecks[] =
95     "bypass-app-banner-engagement-checks";
96 
97 // How often (in seconds) to check for updates. Should only be used for testing
98 // purposes.
99 const char kCheckForUpdateIntervalSec[]     = "check-for-update-interval";
100 
101 // Comma-separated list of SSL cipher suites to disable.
102 const char kCipherSuiteBlacklist[]          = "cipher-suite-blacklist";
103 
104 // Tells chrome to display the cloud print dialog and upload the specified file
105 // for printing.
106 const char kCloudPrintFile[]                = "cloud-print-file";
107 
108 // Specifies the mime type to be used when uploading data from the file
109 // referenced by cloud-print-file. Defaults to "application/pdf" if
110 // unspecified.
111 const char kCloudPrintFileType[]            = "cloud-print-file-type";
112 
113 // Used with kCloudPrintFile to specify a title for the resulting print job.
114 const char kCloudPrintJobTitle[]            = "cloud-print-job-title";
115 
116 // Used with kCloudPrintFile to specify a JSON print ticket for the resulting
117 // print job. Defaults to null if unspecified.
118 const char kCloudPrintPrintTicket[]         = "cloud-print-print-ticket";
119 
120 // The process type value which causes a process to run as a cloud print service
121 // process.
122 //
123 // DO NOT CHANGE THIS VALUE. Cloud printing relies on an external binary
124 // launching Chrome with this process type.
125 const char kCloudPrintServiceProcess[]      = "service";
126 
127 // Setup cloud print proxy for provided printers. This does not start
128 // service or register proxy for autostart.
129 const char kCloudPrintSetupProxy[]          = "cloud-print-setup-proxy";
130 
131 // Comma-separated list of BrowserThreads that cause browser process to crash if
132 // the given browser thread is not responsive. UI/IO are the BrowserThreads that
133 // are supported.
134 //
135 // For example:
136 //    --crash-on-hang-threads=UI:18,IO:18 --> Crash the browser if UI or IO is
137 //    not responsive for 18 seconds while the other browser thread is
138 //    responsive.
139 const char kCrashOnHangThreads[]            = "crash-on-hang-threads";
140 
141 // Some platforms like ChromeOS default to empty desktop.
142 // Browser tests may need to add this switch so that at least one browser
143 // instance is created on startup.
144 // TODO(nkostylev): Investigate if this switch could be removed.
145 // (http://crbug.com/148675)
146 const char kCreateBrowserOnStartupForTests[] =
147     "create-browser-on-startup-for-tests";
148 
149 // Specifies the http:// endpoint which will be used to serve
150 // devtools://devtools/custom/<path>
151 // Or a file:// URL to specify a custom file path to load from for
152 // devtools://devtools/bundled/<path>
153 const char kCustomDevtoolsFrontend[] = "custom-devtools-frontend";
154 
155 // Enables a frame context menu item that toggles the frame in and out of glass
156 // mode (Windows Vista and up only).
157 const char kDebugEnableFrameToggle[]        = "debug-enable-frame-toggle";
158 
159 // Adds debugging entries such as Inspect Element to context menus of packed
160 // apps.
161 const char kDebugPackedApps[]               = "debug-packed-apps";
162 
163 // Passes command line parameters to the DevTools front-end.
164 const char kDevToolsFlags[]                 = "devtools-flags";
165 
166 // Triggers a plethora of diagnostic modes.
167 const char kDiagnostics[]                   = "diagnostics";
168 
169 // Sets the output format for diagnostic modes enabled by diagnostics flag.
170 const char kDiagnosticsFormat[]             = "diagnostics-format";
171 
172 // Tells the diagnostics mode to do the requested recovery step(s).
173 const char kDiagnosticsRecovery[]           = "diagnostics-recovery";
174 
175 // Disable auto-reload of error pages.
176 const char kDisableAutoReload[] = "disable-auto-reload";
177 
178 // Disable several subsystems which run network requests in the background.
179 // This is for use when doing network performance testing to avoid noise in the
180 // measurements.
181 const char kDisableBackgroundNetworking[]   = "disable-background-networking";
182 
183 // Disables the bundled PPAPI version of Flash.
184 const char kDisableBundledPpapiFlash[]      = "disable-bundled-ppapi-flash";
185 
186 // Disables the client-side phishing detection feature. Note that even if
187 // client-side phishing detection is enabled, it will only be active if the
188 // user has opted in to UMA stats and SafeBrowsing is enabled in the
189 // preferences.
190 const char kDisableClientSidePhishingDetection[] =
191     "disable-client-side-phishing-detection";
192 
193 // Disable default component extensions with background pages - useful for
194 // performance tests where these pages may interfere with perf results.
195 const char kDisableComponentExtensionsWithBackgroundPages[] =
196     "disable-component-extensions-with-background-pages";
197 
198 const char kDisableComponentUpdate[]        = "disable-component-update";
199 
200 // Disables installation of default apps on first run. This is used during
201 // automated testing.
202 const char kDisableDefaultApps[]            = "disable-default-apps";
203 
204 // Disables device discovery notifications.
205 const char kDisableDeviceDiscoveryNotifications[] =
206     "disable-device-discovery-notifications";
207 
208 // Disables Domain Reliability Monitoring.
209 const char kDisableDomainReliability[]      = "disable-domain-reliability";
210 
211 // Disable extensions.
212 const char kDisableExtensions[]             = "disable-extensions";
213 
214 // Disable extensions except those specified in a comma-separated list.
215 const char kDisableExtensionsExcept[] = "disable-extensions-except";
216 
217 // Disable checking for user opt-in for extensions that want to inject script
218 // into file URLs (ie, always allow it). This is used during automated testing.
219 const char kDisableExtensionsFileAccessCheck[] =
220     "disable-extensions-file-access-check";
221 
222 // Disables print preview (For testing, and for users who don't like us. :[ )
223 const char kDisablePrintPreview[]           = "disable-print-preview";
224 
225 // Normally when the user attempts to navigate to a page that was the result of
226 // a post we prompt to make sure they want to. This switch may be used to
227 // disable that check. This switch is used during automated testing.
228 const char kDisablePromptOnRepost[]         = "disable-prompt-on-repost";
229 
230 // Disables showing the search geolocation disclosure UI. Used for perf testing.
231 const char kDisableSearchGeolocationDisclosure[] =
232     "disable-search-geolocation-disclosure";
233 
234 // Disables prompting the user for consent before fulfilling WebXR's
235 // requestSession(). Use only when absolutely necessary, such as for perf tests.
236 const char kDisableXrDeviceConsentPromptForTesting[] =
237     "disable-xr-device-consent-prompt-for-testing";
238 
239 // Some tests seem to require the application to close when the last
240 // browser window is closed. Thus, we need a switch to force this behavior
241 // for ChromeOS Aura, disable "zero window mode".
242 // TODO(pkotwicz): Investigate if this bug can be removed.
243 // (http://crbug.com/119175)
244 const char kDisableZeroBrowsersOpenForTests[] =
245     "disable-zero-browsers-open-for-tests";
246 
247 // Use a specific disk cache location, rather than one derived from the
248 // UserDatadir.
249 const char kDiskCacheDir[]                  = "disk-cache-dir";
250 
251 // Forces the maximum disk space to be used by the disk cache, in bytes.
252 const char kDiskCacheSize[]                 = "disk-cache-size";
253 
254 const char kDnsLogDetails[]                 = "dns-log-details";
255 
256 // Requests that a running browser process dump its collected histograms to a
257 // given file. The file is overwritten if it exists.
258 const char kDumpBrowserHistograms[]         = "dump-browser-histograms";
259 
260 // Overrides the path of Easy Unlock component app.
261 const char kEasyUnlockAppPath[]             = "easy-unlock-app-path";
262 
263 // Enable auto-reload of error pages.
264 const char kEnableAutoReload[] = "enable-auto-reload";
265 
266 // If the WebRTC logging private API is active, enables audio debug recordings.
267 const char kEnableAudioDebugRecordingsFromExtension[] =
268     "enable-audio-debug-recordings-from-extension";
269 
270 // Enables the multi-level undo system for bookmarks.
271 const char kEnableBookmarkUndo[]            = "enable-bookmark-undo";
272 
273 // This applies only when the process type is "service". Enables the Cloud Print
274 // Proxy component within the service process.
275 const char kEnableCloudPrintProxy[]         = "enable-cloud-print-proxy";
276 
277 // Enable device discovery notifications.
278 const char kEnableDeviceDiscoveryNotifications[] =
279     "enable-device-discovery-notifications";
280 
281 // Enables Domain Reliability Monitoring.
282 const char kEnableDomainReliability[] = "enable-domain-reliability";
283 
284 // Enables logging for extension activity.
285 const char kEnableExtensionActivityLogging[] =
286     "enable-extension-activity-logging";
287 
288 const char kEnableExtensionActivityLogTesting[] =
289     "enable-extension-activity-log-testing";
290 
291 // Runs the Native Client inside the renderer process and enables GPU plugin
292 // (internally adds lEnableGpuPlugin to the command line).
293 const char kEnableNaCl[]                    = "enable-nacl";
294 
295 // Enables tracing for each navigation. It will attempt to trace each navigation
296 // for 10s, until the buffer is full, or until the next navigation.
297 // It only works if a URL was provided by --trace-upload-url.
298 const char kEnableNavigationTracing[] = "enable-navigation-tracing";
299 
300 // Enables the network-related benchmarking extensions.
301 const char kEnableNetBenchmarking[]         = "enable-net-benchmarking";
302 
303 // Enables a number of potentially annoying security features (strict mixed
304 // content mode, powerful feature restrictions, etc.)
305 const char kEnablePotentiallyAnnoyingSecurityFeatures[] =
306     "enable-potentially-annoying-security-features";
307 
308 // Name of the command line flag to force content verification to be on in one
309 // of various modes.
310 const char kExtensionContentVerification[] = "extension-content-verification";
311 
312 // Values for the kExtensionContentVerification flag.
313 // See ContentVerifierDelegate::Mode for more explanation.
314 const char kExtensionContentVerificationBootstrap[] = "bootstrap";
315 const char kExtensionContentVerificationEnforce[] = "enforce";
316 const char kExtensionContentVerificationEnforceStrict[] = "enforce_strict";
317 
318 // Turns on extension install verification if it would not otherwise have been
319 // turned on.
320 const char kExtensionsInstallVerification[] = "extensions-install-verification";
321 
322 // Specifies a comma-separated list of extension ids that should be forced to
323 // be treated as not from the webstore when doing install verification.
324 const char kExtensionsNotWebstore[] = "extensions-not-webstore";
325 
326 // Forces application mode. This hides certain system UI elements and forces
327 // the app to be installed if it hasn't been already.
328 const char kForceAppMode[]                  = "force-app-mode";
329 
330 // Displays the First Run experience when the browser is started, regardless of
331 // whether or not it's actually the First Run (this overrides kNoFirstRun).
332 const char kForceFirstRun[]                 = "force-first-run";
333 
334 // Forces Chrome to use a stacked tab strip layout.
335 const char kForceStackedTabStripLayout[]    = "force-stacked-tab-strip-layout";
336 
337 
338 // Specifies which page will be displayed in newly-opened tabs. We need this
339 // for testing purposes so that the UI tests don't depend on what comes up for
340 // http://google.com.
341 const char kHomePage[]                      = "homepage";
342 
343 // Causes the browser to launch directly in incognito mode.
344 const char kIncognito[]                     = "incognito";
345 
346 // Installs an autogenerated theme based on the given RGB value.
347 // The format is "r,g,b", where r, g, b are a numeric values from 0 to 255.
348 const char kInstallAutogeneratedTheme[] = "install-autogenerated-theme";
349 
350 // Causes Chrome to initiate an installation flow for the given app.
351 const char kInstallChromeApp[]              = "install-chrome-app";
352 
353 // A list of whitelists to install for a supervised user, for testing.
354 // The list is of the following form: <id>[:<name>],[<id>[:<name>],...]
355 const char kInstallSupervisedUserWhitelists[] =
356     "install-supervised-user-whitelists";
357 
358 // Marks a renderer as an Instant process.
359 const char kInstantProcess[]                = "instant-process";
360 
361 // Used for testing - keeps browser alive after last browser window closes.
362 const char kKeepAliveForTest[]              = "keep-alive-for-test";
363 
364 // Enable kiosk mode. Please note this is not Chrome OS kiosk mode.
365 const char kKioskMode[]                     = "kiosk";
366 
367 // Enable automatically pressing the print button in print preview.
368 const char kKioskModePrinting[]             = "kiosk-printing";
369 
370 // Loads the Media Router component extension on startup.
371 const char kLoadMediaRouterComponentExtension[] =
372     "load-media-router-component-extension";
373 
374 // Makes Chrome default browser
375 const char kMakeDefaultBrowser[]            = "make-default-browser";
376 
377 // Allows setting a different destination ID for connection-monitoring GCM
378 // messages. Useful when running against a non-prod management server.
379 const char kMonitoringDestinationID[]       = "monitoring-destination-id";
380 
381 // Requests a native messaging connection be established between the native
382 // messaging host named by this switch and the extension with ID specified by
383 // kNativeMessagingConnectExtension.
384 const char kNativeMessagingConnectHost[] = "native-messaging-connect-host";
385 
386 // Requests a native messaging connection be established between the extension
387 // with ID specified by this switch and the native messaging host named by the
388 // kNativeMessagingConnectHost switch.
389 const char kNativeMessagingConnectExtension[] =
390     "native-messaging-connect-extension";
391 
392 // If set when kNativeMessagingConnectHost and kNativeMessagingConnectExtension
393 // are specified, is reflected to the native messaging host as a command line
394 // parameter.
395 const char kNativeMessagingConnectId[] = "native-messaging-connect-id";
396 
397 // Disables the default browser check. Useful for UI/browser tests where we
398 // want to avoid having the default browser info-bar displayed.
399 const char kNoDefaultBrowserCheck[]         = "no-default-browser-check";
400 
401 // Disables all experiments set on about:flags. Does not disable about:flags
402 // itself. Useful if an experiment makes chrome crash at startup: One can start
403 // chrome with --no-experiments, disable the problematic lab at about:flags and
404 // then restart chrome without this switch again.
405 const char kNoExperiments[]                 = "no-experiments";
406 
407 // Skip First Run tasks, whether or not it's actually the First Run. Overridden
408 // by kForceFirstRun. This does not drop the First Run sentinel and thus doesn't
409 // prevent first run from occuring the next time chrome is launched without this
410 // flag.
411 const char kNoFirstRun[]                    = "no-first-run";
412 
413 // Don't send hyperlink auditing pings
414 const char kNoPings[]                       = "no-pings";
415 
416 // Don't use a proxy server, always make direct connections. Overrides any
417 // other proxy server flags that are passed.
418 const char kNoProxyServer[]                 = "no-proxy-server";
419 
420 // Disables the service process from adding itself as an autorun process. This
421 // does not delete existing autorun registrations, it just prevents the service
422 // from registering a new one.
423 const char kNoServiceAutorun[]              = "no-service-autorun";
424 
425 // Does not automatically open a browser window on startup (used when
426 // launching Chrome for the purpose of hosting background apps).
427 const char kNoStartupWindow[]               = "no-startup-window";
428 
429 // Disables checking whether we received an acknowledgment when registering
430 // a supervised user. Also disables the timeout during registration that waits
431 // for the ack. Useful when debugging against a server that does not
432 // support notifications.
433 const char kNoSupervisedUserAcknowledgmentCheck[]  =
434     "no-managed-user-acknowledgment-check";
435 
436 // Calculate the hash of an MHTML file as it is being saved.
437 // The browser process will write the serialized MHTML contents to a file and
438 // calculate its hash as it is streamed back from the renderer via a Mojo data
439 // pipe.
440 const char kOnTheFlyMhtmlHashComputation[] =
441     "on-the-fly-mhtml-hash-computation";
442 
443 // Launches URL in new browser window.
444 const char kOpenInNewWindow[]               = "new-window";
445 
446 // Contains a list of feature names for which origin trial experiments should
447 // be disabled. Names should be separated by "|" characters.
448 const char kOriginTrialDisabledFeatures[] = "origin-trial-disabled-features";
449 
450 // Contains a list of token signatures for which origin trial experiments should
451 // be disabled. Tokens should be separated by "|" characters.
452 const char kOriginTrialDisabledTokens[] = "origin-trial-disabled-tokens";
453 
454 // Comma-separated list of keys which will override the default public keys for
455 // checking origin trial tokens.
456 const char kOriginTrialPublicKey[] = "origin-trial-public-key";
457 
458 // Packages an extension to a .crx installable file from a given directory.
459 const char kPackExtension[]                 = "pack-extension";
460 
461 // Optional PEM private key to use in signing packaged .crx.
462 const char kPackExtensionKey[]              = "pack-extension-key";
463 
464 // Development flag for permission request API. This flag is needed until
465 // the API is finalized.
466 // TODO(bauerb): Remove when this flag is not needed anymore.
467 const char kPermissionRequestApiScope[]     = "permission-request-api-scope";
468 
469 // Development flag for permission request API. This flag is needed until
470 // the API is finalized.
471 // TODO(bauerb): Remove when this flag is not needed anymore.
472 const char kPermissionRequestApiUrl[]       = "permission-request-api-url";
473 
474 // Use the PPAPI (Pepper) Flash found at the given path.
475 const char kPpapiFlashPath[]                = "ppapi-flash-path";
476 
477 // Report the given version for the PPAPI (Pepper) Flash. The version should be
478 // numbers separated by '.'s (e.g., "12.3.456.78"). If not specified, it
479 // defaults to "10.2.999.999".
480 const char kPpapiFlashVersion[]             = "ppapi-flash-version";
481 
482 // Use IPv6 only for privet HTTP.
483 const char kPrivetIPv6Only[]                   = "privet-ipv6-only";
484 
485 // Outputs the product version information and quit. Used as an internal api to
486 // detect the installed version of Chrome on Linux.
487 const char kProductVersion[]                = "product-version";
488 
489 // Selects directory of profile to associate with the first browser launched.
490 const char kProfileDirectory[]              = "profile-directory";
491 
492 // Forces proxy auto-detection.
493 const char kProxyAutoDetect[]               = "proxy-auto-detect";
494 
495 // Specifies a list of hosts for whom we bypass proxy settings and use direct
496 // connections. Ignored if --proxy-auto-detect or --no-proxy-server are also
497 // specified. This is a comma-separated list of bypass rules. See:
498 // "net/proxy_resolution/proxy_bypass_rules.h" for the format of these rules.
499 const char kProxyBypassList[]               = "proxy-bypass-list";
500 
501 // Uses the pac script at the given URL
502 const char kProxyPacUrl[]                   = "proxy-pac-url";
503 
504 // Porvides a list of addresses to discover DevTools remote debugging targets.
505 // The format is <host>:<port>,...,<host>:port.
506 const char kRemoteDebuggingTargets[] = "remote-debugging-targets";
507 
508 // Indicates the last session should be restored on startup. This overrides the
509 // preferences value. Note that this does not force automatic session restore
510 // following a crash, so as to prevent a crash loop. This switch is used to
511 // implement support for OS-specific "continue where you left off" functionality
512 // on OS X and Windows.
513 const char kRestoreLastSession[]            = "restore-last-session";
514 
515 // Disable saving pages as HTML-only, disable saving pages as HTML Complete
516 // (with a directory of sub-resources). Enable only saving pages as MHTML.
517 // See http://crbug.com/120416 for how to remove this switch.
518 const char kSavePageAsMHTML[]               = "save-page-as-mhtml";
519 
520 // Sets the Reporting API delay to under a second to allow much quicker reports.
521 const char kShortReportingDelay[] = "short-reporting-delay";
522 
523 // If true the app list will be shown.
524 const char kShowAppList[]                   = "show-app-list";
525 
526 // Does not show an infobar when an extension attaches to a page using
527 // chrome.debugger page. Required to attach to extension background pages.
528 const char kSilentDebuggerExtensionAPI[]    = "silent-debugger-extension-api";
529 
530 // Causes Chrome to launch without opening any windows by default. Useful if
531 // one wishes to use Chrome as an ash server.
532 const char kSilentLaunch[]                  = "silent-launch";
533 
534 // Simulates a critical update being available.
535 const char kSimulateCriticalUpdate[]        = "simulate-critical-update";
536 
537 // Simulates that elevation is needed to recover upgrade channel.
538 const char kSimulateElevatedRecovery[]      = "simulate-elevated-recovery";
539 
540 // Simulates that current version is outdated.
541 const char kSimulateOutdated[]              = "simulate-outdated";
542 
543 // Simulates that current version is outdated and auto-update is off.
544 const char kSimulateOutdatedNoAU[]          = "simulate-outdated-no-au";
545 
546 // Simulates an update being available.
547 const char kSimulateUpgrade[]               = "simulate-upgrade";
548 
549 // Specifies the maximum SSL/TLS version ("tls1.2" or "tls1.3").
550 const char kSSLVersionMax[] = "ssl-version-max";
551 
552 // Specifies the minimum SSL/TLS version ("tls1", "tls1.1", "tls1.2", or
553 // "tls1.3").
554 const char kSSLVersionMin[] = "ssl-version-min";
555 
556 // TLS 1.0 mode for the |kSSLVersionMin| switch.
557 const char kSSLVersionTLSv1[] = "tls1";
558 
559 // TLS 1.1 mode for the |kSSLVersionMin| switch.
560 const char kSSLVersionTLSv11[] = "tls1.1";
561 
562 // TLS 1.2 mode for |kSSLVersionMax| and |kSSLVersionMin| switches.
563 const char kSSLVersionTLSv12[] = "tls1.2";
564 
565 // TLS 1.3 mode for |kSSLVersionMax| and |kSSLVersionMin| switches.
566 const char kSSLVersionTLSv13[] = "tls1.3";
567 
568 // Starts the browser maximized, regardless of any previous settings.
569 const char kStartMaximized[]                = "start-maximized";
570 
571 // Starts the stack sampling profiler in the child process.
572 const char kStartStackProfiler[]            = "start-stack-profiler";
573 
574 // Browser test mode for the |kStartStackProfiler| switch. Limits the profile
575 // durations to be significantly less than the test timeout.
576 const char kStartStackProfilerBrowserTest[] = "browser-test";
577 
578 // Interval, in minutes, used for storage pressure notification throttling.
579 // Useful for developers testing applications that might use non-trivial
580 // amounts of disk space.
581 const char kStoragePressureNotificationInterval[] =
582     "storage-pressure-notification-interval";
583 
584 // Sets the supervised user ID for any loaded or newly created profile to the
585 // given value. Pass an empty string to mark the profile as non-supervised.
586 // Used for testing.
587 const char kSupervisedUserId[]              = "managed-user-id";
588 
589 // Frequency in Milliseconds for system log uploads. Should only be used for
590 // testing purposes.
591 const char kSystemLogUploadFrequency[] = "system-log-upload-frequency";
592 
593 // Sets the task manager to track extra renderer processes that might not
594 // normally be displayed in the task manager.
595 const char kTaskManagerShowExtraRenderers[] =
596     "task-manager-show-extra-renderers";
597 
598 // Passes the name of the current running automated test to Chrome.
599 const char kTestName[]                      = "test-name";
600 
601 // Identifies a list of download sources as trusted, but only if proper group
602 // policy is set.
603 const char kTrustedDownloadSources[] = "trusted-download-sources";
604 
605 // Experimental. Shows a dialog asking the user to try chrome. This flag is to
606 // be used only by the upgrade process.
607 const char kTryChromeAgain[]                = "try-chrome-again";
608 
609 // Overrides per-origin quota settings to unlimited storage for any
610 // apps/origins.  This should be used only for testing purpose.
611 const char kUnlimitedStorage[]              = "unlimited-storage";
612 
613 // A string used to override the default user agent with a custom one.
614 const char kUserAgent[]                     = "user-agent";
615 
616 // Specifies the user data directory, which is where the browser will look for
617 // all of its state.
618 const char kUserDataDir[]                   = "user-data-dir";
619 
620 // Examines a .crx for validity and prints the result.
621 const char kValidateCrx[]                   = "validate-crx";
622 
623 // Prints version information and quits.
624 const char kVersion[]                       = "version";
625 
626 // Sets the delay (in seconds) between proactive prunings of remote-bound
627 // WebRTC event logs which are pending upload.
628 // All positive values are legal.
629 // All negative values are illegal, and ignored.
630 // If set to 0, the meaning is "no proactive pruning".
631 const char kWebRtcRemoteEventLogProactivePruningDelta[] =
632     "webrtc-event-log-proactive-pruning-delta";
633 
634 // WebRTC event logs will only be uploaded if the conditions hold for this
635 // many milliseconds.
636 const char kWebRtcRemoteEventLogUploadDelayMs[] =
637     "webrtc-event-log-upload-delay-ms";
638 
639 // Normally, remote-bound WebRTC event logs are uploaded only when no
640 // peer connections are active. With this flag, the upload is never suppressed.
641 const char kWebRtcRemoteEventLogUploadNoSuppression[] =
642     "webrtc-event-log-upload-no-suppression";
643 
644 // Specify the initial window position: --window-position=x,y
645 const char kWindowPosition[]                = "window-position";
646 
647 // Specify the initial window size: --window-size=w,h
648 const char kWindowSize[]                    = "window-size";
649 
650 // Specify the initial window workspace: --window-workspace=id
651 const char kWindowWorkspace[]               = "window-workspace";
652 
653 // Uses WinHTTP to fetch and evaluate PAC scripts. Otherwise the default is to
654 // use Chromium's network stack to fetch, and V8 to evaluate.
655 const char kWinHttpProxyResolver[]          = "winhttp-proxy-resolver";
656 
657 // Specifies which category option was clicked in the Windows Jumplist that
658 // resulted in a browser startup.
659 const char kWinJumplistAction[]             = "win-jumplist-action";
660 
661 #if defined(OS_ANDROID)
662 // Android authentication account type for SPNEGO authentication
663 const char kAuthAndroidNegotiateAccountType[] = "auth-spnego-account-type";
664 
665 // Enable the accessibility tab switcher.
666 const char kEnableAccessibilityTabSwitcher[] =
667     "enable-accessibility-tab-switcher";
668 
669 // Enables a hung renderer InfoBar allowing the user to close or wait on
670 // unresponsive web content.
671 const char kEnableHungRendererInfoBar[] = "enable-hung-renderer-infobar";
672 
673 // Forces the night mode to be enabled.
674 const char kForceEnableNightMode[] = "force-enable-night-mode";
675 
676 // Forces the update menu badge to show.
677 const char kForceShowUpdateMenuBadge[] = "force-show-update-menu-badge";
678 
679 // Forces the update menu type to a specific type.
680 const char kForceUpdateMenuType[] = "force-update-menu-type";
681 
682 // Forces a custom summary to be displayed below the update menu item.
683 const char kForceShowUpdateMenuItemCustomSummary[] = "custom_summary";
684 
685 // Sets the market URL for Chrome for use in testing.
686 const char kMarketUrlForTesting[] = "market-url-for-testing";
687 
688 // Specifies Android phone page loading progress bar animation.
689 const char kProgressBarAnimation[]          = "progress-bar-animation";
690 
691 // Specifies a base URL for the trusted CDN for tests.
692 const char kTrustedCDNBaseURLForTests[] = "trusted-cdn-base-url-for-tests";
693 
694 // Custom WebAPK server URL for the sake of testing.
695 const char kWebApkServerUrl[] = "webapk-server-url";
696 #endif  // defined(OS_ANDROID)
697 
698 #if defined(OS_CHROMEOS)
699 // Custom crosh command.
700 const char kCroshCommand[] = "crosh-command";
701 
702 // Disables logging redirect for testing.
703 const char kDisableLoggingRedirect[] = "disable-logging-redirect";
704 
705 // Disables apps on the login screen. By default, they are allowed and can be
706 // installed through policy.
707 const char kDisableLoginScreenApps[] = "disable-login-screen-apps";
708 
709 // Use a short (1 second) timeout for merge session loader throttle testing.
710 const char kShortMergeSessionTimeoutForTest[] =
711     "short-merge-session-timeout-for-test";
712 
713 // Selects the scheduler configuration specified in the parameter.
714 const char kSchedulerConfiguration[] = "scheduler-configuration";
715 const char kSchedulerConfigurationConservative[] = "conservative";
716 const char kSchedulerConfigurationPerformance[] = "performance";
717 
718 // Specifies what the default scheduler configuration value is if the user does
719 // not set one.
720 const char kSchedulerConfigurationDefault[] = "scheduler-configuration-default";
721 #endif  // defined(OS_CHROMEOS)
722 
723 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_CHROMEOS)
724 // These flags show the man page on Linux. They are equivalent to each
725 // other.
726 const char kHelp[]                          = "help";
727 const char kHelpShort[]                     = "h";
728 
729 // Specifies which encryption storage backend to use. Possible values are
730 // kwallet, kwallet5, gnome, gnome-keyring, gnome-libsecret, basic. Any other
731 // value will lead to Chrome detecting the best backend automatically.
732 // TODO(crbug.com/571003): Once PasswordStore no longer uses the Keyring or
733 // KWallet for storing passwords, rename this flag to stop referencing
734 // passwords. Do not rename it sooner, though; developers and testers might
735 // rely on it keeping large amounts of testing passwords out of their Keyrings
736 // or KWallets.
737 const char kPasswordStore[]                 = "password-store";
738 
739 // Enables the feature of allowing the user to disable the backend via a
740 // setting.
741 const char kEnableEncryptionSelection[] = "enable-encryption-selection";
742 
743 // The same as the --class argument in X applications.  Overrides the WM_CLASS
744 // window property with the given value.
745 const char kWmClass[]                       = "class";
746 #endif
747 
748 #if defined(OS_MACOSX)
749 // Prevents Chrome from quitting when Chrome Apps are open.
750 const char kAppsKeepChromeAliveInTests[]    = "apps-keep-chrome-alive-in-tests";
751 
752 // Disables app shim creation for hosted apps on Mac.
753 const char kDisableHostedAppShimCreation[] = "disable-hosted-app-shim-creation";
754 
755 // Enable user metrics from within the installer.
756 const char kEnableUserMetrics[] = "enable-user-metrics";
757 
758 // Shows a notification when quitting Chrome with hosted apps running. Default
759 // behavior is to also quit all hosted apps.
760 const char kHostedAppQuitNotification[] = "enable-hosted-app-quit-notification";
761 
762 // This is how the metrics client ID is passed from the browser process to its
763 // children. With Crashpad, the metrics client ID is distinct from the crash
764 // client ID.
765 const char kMetricsClientID[]               = "metrics-client-id";
766 
767 // A process type (switches::kProcessType) that relaunches the browser. See
768 // chrome/browser/mac/relauncher.h.
769 const char kRelauncherProcess[]             = "relauncher";
770 
771 // When switches::kProcessType is switches::kRelauncherProcess, if this switch
772 // is also present, the relauncher process will unmount and eject a mounted disk
773 // image and move its disk image file to the trash.  The argument's value must
774 // be a BSD device name of the form "diskN" or "diskNsM".
775 const char kRelauncherProcessDMGDevice[]    = "dmg-device";
776 
777 // Indicates whether Chrome should be set as the default browser during
778 // installation.
779 const char kMakeChromeDefault[] = "make-chrome-default";
780 #endif  // defined(OS_MACOSX)
781 
782 #if defined(OS_WIN)
783 // Disables custom-drawing the window titlebar on Windows 10.
784 const char kDisableWindows10CustomTitlebar[] =
785     "disable-windows10-custom-titlebar";
786 
787 // Fallback to XPS. By default connector uses CDD.
788 const char kEnableCloudPrintXps[]           = "enable-cloud-print-xps";
789 
790 // Force-enables the profile shortcut manager. This is needed for tests since
791 // they use a custom-user-data-dir which disables this.
792 const char kEnableProfileShortcutManager[]  = "enable-profile-shortcut-manager";
793 
794 // Makes Windows happy by allowing it to show "Enable access to this program"
795 // checkbox in Add/Remove Programs->Set Program Access and Defaults. This only
796 // shows an error box because the only way to hide Chrome is by uninstalling
797 // it.
798 const char kHideIcons[]                     = "hide-icons";
799 
800 // Whether or not the browser should warn if the profile is on a network share.
801 // This flag is only relevant for Windows currently.
802 const char kNoNetworkProfileWarning[]       = "no-network-profile-warning";
803 
804 // Used in combination with kNotificationLaunchId to specify the inline reply
805 // entered in the toast in the Windows Action Center.
806 const char kNotificationInlineReply[] = "notification-inline-reply";
807 
808 // Used for launching Chrome when a toast displayed in the Windows Action Center
809 // has been activated. Should contain the launch ID encoded by Chrome.
810 const char kNotificationLaunchId[] = "notification-launch-id";
811 
812 // /prefetch:# arguments for the browser process launched in background mode and
813 // for the watcher process. Use profiles 5, 6 and 7 as documented on
814 // kPrefetchArgument* in content_switches.cc.
815 const char kPrefetchArgumentBrowserBackground[] = "/prefetch:5";
816 const char kPrefetchArgumentWatcher[] = "/prefetch:6";
817 // /prefetch:7 is used by crashpad, which can't depend on constants defined
818 // here. See crashpad_win.cc for more details.
819 
820 // See kHideIcons.
821 const char kShowIcons[]                     = "show-icons";
822 
823 // Runs un-installation steps that were done by chrome first-run.
824 const char kUninstall[]                     = "uninstall";
825 
826 // Specifies the version of the Progressive-Web-App launcher that launched
827 // Chrome, used to determine whether to update all launchers.
828 // NOTE: changing this switch requires adding legacy handling for the previous
829 // method, as older PWA launchers still using this switch will rely on Chrome to
830 // update them to use the new method.
831 const char kPwaLauncherVersion[] = "pwa-launcher-version";
832 #endif  // defined(OS_WIN)
833 
834 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) && !defined(OFFICIAL_BUILD)
835 // Enables support to debug printing subsystem.
836 const char kDebugPrint[] = "debug-print";
837 #endif
838 
839 #if BUILDFLAG(ENABLE_PLUGINS)
840 // Specifies comma-separated list of extension ids or hosts to grant
841 // access to CRX file system APIs.
842 const char kAllowNaClCrxFsAPI[]             = "allow-nacl-crxfs-api";
843 
844 // Specifies comma-separated list of extension ids or hosts to grant
845 // access to file handle APIs.
846 const char kAllowNaClFileHandleAPI[]        = "allow-nacl-file-handle-api";
847 
848 // Specifies comma-separated list of extension ids or hosts to grant
849 // access to TCP/UDP socket APIs.
850 const char kAllowNaClSocketAPI[]            = "allow-nacl-socket-api";
851 #endif
852 
853 #if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD)
854 const char kEnableNewAppMenuIcon[] = "enable-new-app-menu-icon";
855 
856 // Causes the browser to launch directly in guest mode.
857 const char kGuest[] = "guest";
858 #endif
859 
860 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
861 // Enables Machine level user cloud policy on Chromium build. This policy is
862 // always enabled on the branded builds.
863 const char kEnableChromeBrowserCloudManagement[] =
864     "enable-chrome-browser-cloud-management";
865 
866 // Uses the system default printer as the initially selected destination in
867 // print preview, instead of the most recently used destination.
868 const char kUseSystemDefaultPrinter[] = "use-system-default-printer";
869 #endif
870 
871 #if BUILDFLAG(ENABLE_DOWNGRADE_PROCESSING)
872 // Indicates that this process is the product of a relaunch following migration
873 // of User Data.
874 const char kUserDataMigrated[] = "user-data-migrated";
875 #endif
876 
877 // -----------------------------------------------------------------------------
878 // DO NOT ADD YOUR VERY NICE FLAGS TO THE BOTTOM OF THIS FILE.
879 //
880 // You were going to just dump your switches here, weren't you? Instead, please
881 // put them in alphabetical order above, or in order inside the appropriate
882 // ifdef at the bottom. The order should match the header.
883 // -----------------------------------------------------------------------------
884 
885 }  // namespace switches
886