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