Home | History | Annotate | Download | only in common
      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 "base/base_switches.h"
      8 #include "base/command_line.h"
      9 
     10 namespace switches {
     11 
     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.
     18 //
     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 // -----------------------------------------------------------------------------
     23 
     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";
     27 
     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";
     31 
     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";
     35 
     36 // Specifies comma-separated list of extension ids or hosts to grant
     37 // access to CRX file system APIs.
     38 const char kAllowNaClCrxFsAPI[]             = "allow-nacl-crxfs-api";
     39 
     40 // Specifies comma-separated list of extension ids or hosts to grant
     41 // access to file handle APIs.
     42 const char kAllowNaClFileHandleAPI[]        = "allow-nacl-file-handle-api";
     43 
     44 // Specifies comma-separated list of extension ids or hosts to grant
     45 // access to TCP/UDP socket APIs.
     46 const char kAllowNaClSocketAPI[]            = "allow-nacl-socket-api";
     47 
     48 // Don't block outdated plugins.
     49 const char kAllowOutdatedPlugins[]          = "allow-outdated-plugins";
     50 
     51 // By default, an https page cannot run JavaScript, CSS or plug-ins from http
     52 // URLs. This provides an override to get the old insecure behavior.
     53 const char kAllowRunningInsecureContent[]   = "allow-running-insecure-content";
     54 
     55 // Prevents Chrome from requiring authorization to run certain widely installed
     56 // but less commonly used plug-ins.
     57 const char kAlwaysAuthorizePlugins[]        = "always-authorize-plugins";
     58 
     59 // Specifies that the extension-app with the specified id should be launched
     60 // according to its configuration.
     61 const char kAppId[]                         = "app-id";
     62 
     63 // Specifies that the associated value should be launched in "application"
     64 // mode.
     65 const char kApp[]                           = "app";
     66 
     67 // Specifies an URL to use for app list start page.
     68 const char kAppListStartPageURL[]           = "app-list-start-page-url";
     69 
     70 // Overrides the apps checkout URL, which is used to determine when to expose
     71 // some private APIs.
     72 const char kAppsCheckoutURL[]               = "apps-checkout-url";
     73 
     74 // The URL that the webstore APIs download extensions from.
     75 // Note: the URL must contain one '%s' for the extension ID.
     76 const char kAppsGalleryDownloadURL[]        = "apps-gallery-download-url";
     77 
     78 // A setting to cause extension/app installs from the webstore skip the normal
     79 // confirmation dialog. A value of 'accept' means to always act as if the dialog
     80 // was accepted, and 'cancel' means to always act as if the dialog was
     81 // cancelled.
     82 //
     83 // TODO (rdevlin.cronin): Remove this.
     84 // This is not a good use of a command-line flag, as it would be equally
     85 // effective as a global boolean. Additionally, this opens up a dangerous way
     86 // for attackers to append a commandline flag and circumvent all user action for
     87 // installing an extension.
     88 const char kAppsGalleryInstallAutoConfirmForTests[] =
     89     "apps-gallery-install-auto-confirm-for-tests";
     90 
     91 // The URL to use for the gallery link in the app launcher.
     92 const char kAppsGalleryURL[]                = "apps-gallery-url";
     93 
     94 // The update url used by gallery/webstore extensions.
     95 const char kAppsGalleryUpdateURL[]          = "apps-gallery-update-url";
     96 
     97 // Value of GAIA auth code for --force-app-mode.
     98 const char kAppModeAuthCode[]               = "app-mode-auth-code";
     99 
    100 // Value of OAuth2 refresh token for --force-app-mode.
    101 const char kAppModeOAuth2Token[]            = "app-mode-oauth-token";
    102 
    103 // Enables overriding the path for the default authentication extension.
    104 const char kAuthExtensionPath[]             = "auth-ext-path";
    105 
    106 // Whitelist of servers that Negotiate will generate delegated Kerberos tickets
    107 // for.
    108 const char kAuthNegotiateDelegateWhitelist[] =
    109     "auth-negotiate-delegate-whitelist";
    110 
    111 // HTTP authentication schemes to enable. This is a comma-separated list of
    112 // authentication schemes (basic, digest, ntlm, and negotiate). By default all
    113 // schemes are enabled. The primary use of this command line flag is to help
    114 // triage authentication-related issues reported by end-users.
    115 const char kAuthSchemes[]                   = "auth-schemes";
    116 
    117 // Whitelist of servers which NTLM and Negotiate can automatically authenticate
    118 // with using the default credentials of the currently logged in user.
    119 const char kAuthServerWhitelist[]           = "auth-server-whitelist";
    120 
    121 // A flag that is used to tell Chrome that it was launched automatically at
    122 // computer startup and not by some user action.
    123 const char kAutoLaunchAtStartup[]           = "auto-launch-at-startup";
    124 
    125 // Certificate Transparency: Uses the provided log(s) for checking Signed
    126 // Certificate Timestamps provided with certificates.
    127 // The switch's value is:
    128 //   log_description:log_key,log_description:log_key,...
    129 // where
    130 //   log_description is a textual description of the log.
    131 //   log_key is a Base64'd DER-encoded SubjectPublicKeyInfo of the log's
    132 //   public key.
    133 // Multiple logs can be specified by repeating description:key pairs,
    134 // separated by a comma.
    135 const char kCertificateTransparencyLog[] =
    136     "certificate-transparency-log";
    137 
    138 // How often (in seconds) to check for updates. Should only be used for testing
    139 // purposes.
    140 const char kCheckForUpdateIntervalSec[]     = "check-for-update-interval";
    141 
    142 // Checks the cloud print connector policy, informing the service process if
    143 // the policy is set to disallow the connector, then quits.
    144 const char kCheckCloudPrintConnectorPolicy[] =
    145     "check-cloud-print-connector-policy";
    146 
    147 // Comma-separated list of SSL cipher suites to disable.
    148 const char kCipherSuiteBlacklist[]          = "cipher-suite-blacklist";
    149 
    150 // Tells chrome to display the cloud print dialog and upload the specified file
    151 // for printing.
    152 const char kCloudPrintFile[]                = "cloud-print-file";
    153 
    154 // Specifies the mime type to be used when uploading data from the file
    155 // referenced by cloud-print-file. Defaults to "application/pdf" if
    156 // unspecified.
    157 const char kCloudPrintFileType[]            = "cloud-print-file-type";
    158 
    159 // Used with kCloudPrintFile to specify a JSON print ticket for the resulting
    160 // print job. Defaults to null if unspecified.
    161 const char kCloudPrintPrintTicket[]         = "cloud-print-print-ticket";
    162 
    163 // Used with kCloudPrintFile to specify a title for the resulting print job.
    164 const char kCloudPrintJobTitle[]            = "cloud-print-job-title";
    165 
    166 // Setup cloud print proxy for provided printers. This does not start
    167 // service or register proxy for autostart.
    168 const char kCloudPrintSetupProxy[]          = "cloud-print-setup-proxy";
    169 
    170 // Comma-separated options to troubleshoot the component updater. Only valid
    171 // for the browser process.
    172 const char kComponentUpdater[]              = "component-updater";
    173 
    174 // Comma-separated list of BrowserThreads that cause browser process to crash
    175 // if the given browser thread is not responsive. UI,IO,DB,FILE,CACHE are the
    176 // list of BrowserThreads that are supported.
    177 //
    178 // For example:
    179 //    --crash-on-hang-threads=UI:3:18,IO:3:18 --> Crash the browser if UI or IO
    180 //      is not responsive for 18 seconds and the number of browser threads that
    181 //      are responding is less than or equal to 3.
    182 const char kCrashOnHangThreads[]            = "crash-on-hang-threads";
    183 
    184 // Some platforms like ChromeOS default to empty desktop.
    185 // Browser tests may need to add this switch so that at least one browser
    186 // instance is created on startup.
    187 // TODO(nkostylev): Investigate if this switch could be removed.
    188 // (http://crbug.com/148675)
    189 const char kCreateBrowserOnStartupForTests[] =
    190     "create-browser-on-startup-for-tests";
    191 
    192 // Enables a frame context menu item that toggles the frame in and out of glass
    193 // mode (Windows Vista and up only).
    194 const char kDebugEnableFrameToggle[]        = "debug-enable-frame-toggle";
    195 
    196 // Adds debugging entries such as Inspect Element to context menus of packed
    197 // apps.
    198 const char kDebugPackedApps[]               = "debug-packed-apps";
    199 
    200 // Triggers a plethora of diagnostic modes.
    201 const char kDiagnostics[]                   = "diagnostics";
    202 
    203 // Sets the output format for diagnostic modes enabled by diagnostics flag.
    204 const char kDiagnosticsFormat[]             = "diagnostics-format";
    205 
    206 // Tells the diagnostics mode to do the requested recovery step(s).
    207 const char kDiagnosticsRecovery[]           = "diagnostics-recovery";
    208 
    209 // Disables the experimental Answers in Suggest feature.
    210 const char kDisableAnswersInSuggest[]       = "disable-answers-in-suggest";
    211 
    212 // Disables the experimental asynchronous DNS client.
    213 const char kDisableAsyncDns[]               = "disable-async-dns";
    214 
    215 // Disables CNAME lookup of the host when generating the Kerberos SPN for a
    216 // Negotiate challenge. See HttpAuthHandlerNegotiate::CreateSPN for more
    217 // background.
    218 const char kDisableAuthNegotiateCnameLookup[] =
    219     "disable-auth-negotiate-cname-lookup";
    220 
    221 // Disable several subsystems which run network requests in the background.
    222 // This is for use when doing network performance testing to avoid noise in the
    223 // measurements.
    224 const char kDisableBackgroundNetworking[]   = "disable-background-networking";
    225 
    226 // Disables the bundled PPAPI version of Flash.
    227 const char kDisableBundledPpapiFlash[]      = "disable-bundled-ppapi-flash";
    228 
    229 // Disables the client-side phishing detection feature. Note that even if
    230 // client-side phishing detection is enabled, it will only be active if the
    231 // user has opted in to UMA stats and SafeBrowsing is enabled in the
    232 // preferences.
    233 const char kDisableClientSidePhishingDetection[] =
    234     "disable-client-side-phishing-detection";
    235 
    236 // Disable default component extensions with background pages - useful for
    237 // performance tests where these pages may interfere with perf results.
    238 const char kDisableComponentExtensionsWithBackgroundPages[] =
    239     "disable-component-extensions-with-background-pages";
    240 
    241 const char kDisableComponentUpdate[]        = "disable-component-update";
    242 
    243 // Disables establishing certificate revocation information by downloading a
    244 // set of CRLs rather than performing on-line checks.
    245 const char kDisableCRLSets[]                = "disable-crl-sets";
    246 
    247 // Disables installation of default apps on first run. This is used during
    248 // automated testing.
    249 const char kDisableDefaultApps[]            = "disable-default-apps";
    250 
    251 // Disables device discovery.
    252 const char kDisableDeviceDiscovery[]        = "disable-device-discovery";
    253 
    254 // Disables device discovery notifications.
    255 const char kDisableDeviceDiscoveryNotifications[] =
    256     "disable-device-discovery-notifications";
    257 
    258 // Disables Domain Reliability Monitoring.
    259 const char kDisableDomainReliability[]      = "disable-domain-reliability";
    260 
    261 // Disable extensions.
    262 const char kDisableExtensions[]             = "disable-extensions";
    263 
    264 // Disable checking for user opt-in for extensions that want to inject script
    265 // into file URLs (ie, always allow it). This is used during automated testing.
    266 const char kDisableExtensionsFileAccessCheck[] =
    267     "disable-extensions-file-access-check";
    268 
    269 // Disable the net::URLRequestThrottlerManager functionality for
    270 // requests originating from extensions.
    271 const char kDisableExtensionsHttpThrottling[] =
    272     "disable-extensions-http-throttling";
    273 
    274 // Disables embedding of Flash fullscreen widgets within the browser window.
    275 // This restores the old code paths where Flash fullscreen would display in its
    276 // own separate, always-on-top window.  In addition, this disables the new logic
    277 // which would prevent fullscreening the browser window during screen-capture of
    278 // a tab.  http://crbug.com/256870 and http://crbug.com/290403
    279 const char kDisableFullscreenWithinTab[] = "disable-fullscreen-within-tab";
    280 
    281 // Don't resolve hostnames to IPv6 addresses. This can be used when debugging
    282 // issues relating to IPv6, but shouldn't otherwise be needed. Be sure to file
    283 // bugs if something isn't working properly in the presence of IPv6. This flag
    284 // can be overidden by the "enable-ipv6" flag.
    285 const char kDisableIPv6[]                   = "disable-ipv6";
    286 
    287 // Disable the behavior that the second click on a launcher item (the click when
    288 // the item is already active) minimizes the item.
    289 const char kDisableMinimizeOnSecondLauncherItemClick[] =
    290     "disable-minimize-on-second-launcher-item-click";
    291 
    292 // Disables the menu on the NTP for accessing sessions from other devices.
    293 const char kDisableNTPOtherSessionsMenu[]   = "disable-ntp-other-sessions-menu";
    294 
    295 // Disable auto-reload of error pages if offline.
    296 const char kDisableOfflineAutoReload[]       = "disable-offline-auto-reload";
    297 
    298 // Disable only auto-reloading error pages when the tab is visible.
    299 const char kDisableOfflineAutoReloadVisibleOnly[] =
    300     "disable-offline-auto-reload-visible-only";
    301 
    302 // Disable the origin chip.
    303 const char kDisableOriginChip[]             = "disable-origin-chip";
    304 
    305 // Disable the setting to prompt the user for their OS account password before
    306 // revealing plaintext passwords in the password manager.
    307 const char kDisablePasswordManagerReauthentication[] =
    308     "disable-password-manager-reauthentication";
    309 
    310 // Enables searching for people from the apps list search box.
    311 const char kDisablePeopleSearch[]           = "disable-people-search";
    312 
    313 // Don't use bubbles for content permissions requests instead of infobars.
    314 const char kDisablePermissionsBubbles[]      = "disable-permissions-bubbles";
    315 
    316 // Disable pop-up blocking.
    317 const char kDisablePopupBlocking[]          = "disable-popup-blocking";
    318 
    319 // Disables the usage of Portable Native Client.
    320 const char kDisablePnacl[]                  = "disable-pnacl";
    321 
    322 // Disable speculative TCP/IP preconnection.
    323 const char kDisablePreconnect[]             = "disable-preconnect";
    324 
    325 // Disable prerendering based on local browsing history.
    326 const char kDisablePrerenderLocalPredictor[] =
    327     "disable-prerender-local-predictor";
    328 
    329 // Disables print preview (For testing, and for users who don't like us. :[ )
    330 const char kDisablePrintPreview[]           = "disable-print-preview";
    331 
    332 // Normally when the user attempts to navigate to a page that was the result of
    333 // a post we prompt to make sure they want to. This switch may be used to
    334 // disable that check. This switch is used during automated testing.
    335 const char kDisablePromptOnRepost[]         = "disable-prompt-on-repost";
    336 
    337 // Disables support for the QUIC protocol.
    338 const char kDisableQuic[]                   = "disable-quic";
    339 
    340 // Disables support for the HTTPS over QUIC protocol.  This is a temporary
    341 // testing flag.  This only has an effect if QUIC protocol is enabled.
    342 const char kDisableQuicHttps[]              = "disable-quic-https";
    343 
    344 // Disable use of pacing of QUIC packets.
    345 // This only has an effect if QUIC protocol is enabled.
    346 const char kDisableQuicPacing[]             = "disable-quic-pacing";
    347 
    348 // Disable use of Chromium's port selection for the ephemeral port via bind().
    349 // This only has an effect if QUIC protocol is enabled.
    350 const char kDisableQuicPortSelection[]      = "disable-quic-port-selection";
    351 
    352 // Disable use of time-base loss detection for QUIC connections.
    353 // This only has an effect if QUIC protocol is enabled.
    354 const char kDisableQuicTimeBasedLossDetection[] =
    355     "disable-quic-time-based-loss-detection";
    356 
    357 // Prevents the save password bubble from being enabled.
    358 const char kDisableSavePasswordBubble[] = "disable-save-password-bubble";
    359 
    360 // Disables throttling prints initiated by scripts.
    361 const char kDisableScriptedPrintThrottling[] =
    362     "disable-scripted-print-throttling";
    363 
    364 // Disables the "search button in omnibox" experiment.
    365 const char kDisableSearchButtonInOmnibox[]  =
    366     "disable-search-button-in-omnibox";
    367 
    368 // Disables using bubbles for session restore request.
    369 const char kDisableSessionCrashedBubble[] = "disable-session-crashed-bubble";
    370 
    371 // Disable SPDY/3.1. This is a temporary testing flag.
    372 const char kDisableSpdy31[]                 = "disable-spdy31";
    373 
    374 // Disables the suggestions service.
    375 const char kDisableSuggestionsService[]     = "disable-suggestions-service";
    376 
    377 // Disables syncing browser data to a Google Account.
    378 const char kDisableSync[]                   = "disable-sync";
    379 
    380 // Disable synced notifications.
    381 const char kDisableSyncSyncedNotifications[] =
    382     "disable-sync-synced-notifications";
    383 
    384 // Disables syncing one or more sync data types that are on by default.
    385 // See sync/internal_api/public/base/model_type.h for possible types. Types
    386 // should be comma separated, and follow the naming convention for string
    387 // representation of model types, e.g.:
    388 // --disable-synctypes='Typed URLs, Bookmarks, Autofill Profiles'
    389 const char kDisableSyncTypes[]              = "disable-sync-types";
    390 
    391 // Disables the backend service for web resources.
    392 const char kDisableWebResources[]           = "disable-web-resources";
    393 
    394 // Some tests seem to require the application to close when the last
    395 // browser window is closed. Thus, we need a switch to force this behavior
    396 // for ChromeOS Aura, disable "zero window mode".
    397 // TODO(pkotwicz): Investigate if this bug can be removed.
    398 // (http://crbug.com/119175)
    399 const char kDisableZeroBrowsersOpenForTests[] =
    400     "disable-zero-browsers-open-for-tests";
    401 
    402 // Use a specific disk cache location, rather than one derived from the
    403 // UserDatadir.
    404 const char kDiskCacheDir[]                  = "disk-cache-dir";
    405 
    406 // Forces the maximum disk space to be used by the disk cache, in bytes.
    407 const char kDiskCacheSize[]                 = "disk-cache-size";
    408 
    409 const char kDnsLogDetails[]                 = "dns-log-details";
    410 
    411 // Disables prefetching of DNS information.
    412 const char kDnsPrefetchDisable[]            = "dns-prefetch-disable";
    413 
    414 // Requests that a running browser process dump its collected histograms to a
    415 // given file. The file is overwritten if it exists.
    416 const char kDumpBrowserHistograms[]         = "dump-browser-histograms";
    417 
    418 // Overrides the path of Easy Unlock component app.
    419 extern const char kEasyUnlockAppPath[]      = "easy-unlock-app-path";
    420 
    421 // Enables the notifications for the custodian of a supervised user when the
    422 // supervised user sends an access request.
    423 extern const char kEnableAccessRequestNotifications[] =
    424     "enable-access-request-notifications";
    425 
    426 // Enables the experimental Answers in Suggest feature.
    427 const char kEnableAnswersInSuggest[]        = "enable-answers-in-suggest";
    428 
    429 // If set, the app list will be enabled as if enabled from CWS.
    430 const char kEnableAppList[]                 = "enable-app-list";
    431 
    432 // Enables the <window-controls> tag in platform apps.
    433 const char kEnableAppWindowControls[]       = "enable-app-window-controls";
    434 
    435 // Enable OS integration for Chrome app file associations.
    436 const char kEnableAppsFileAssociations[]    = "enable-apps-file-associations";
    437 
    438 // Show apps windows after the first paint. Windows will be shown significantly
    439 // later for heavy apps loading resources synchronously but it will be
    440 // insignificant for apps that load most of their resources asynchronously.
    441 const char kEnableAppsShowOnFirstPaint[]    = "enable-apps-show-on-first-paint";
    442 
    443 // Enables the experimental asynchronous DNS client.
    444 const char kEnableAsyncDns[]                = "enable-async-dns";
    445 
    446 // Enables the inclusion of non-standard ports when generating the Kerberos SPN
    447 // in response to a Negotiate challenge. See
    448 // HttpAuthHandlerNegotiate::CreateSPN for more background.
    449 const char kEnableAuthNegotiatePort[]       = "enable-auth-negotiate-port";
    450 
    451 // Enables the benchmarking extensions.
    452 const char kEnableBenchmarking[]            = "enable-benchmarking";
    453 
    454 // Enables client hints, which adds hints about browser state to HTTP requests.
    455 const char kEnableClientHints[]             = "enable-client-hints";
    456 
    457 // Enables the multi-level undo system for bookmarks.
    458 const char kEnableBookmarkUndo[]            = "enable-bookmark-undo";
    459 
    460 // This applies only when the process type is "service". Enables the Cloud
    461 // Print Proxy component within the service process.
    462 const char kEnableCloudPrintProxy[]         = "enable-cloud-print-proxy";
    463 
    464 // If true devtools experimental settings are enabled.
    465 const char kEnableDevToolsExperiments[]     = "enable-devtools-experiments";
    466 
    467 // Enable device discovery notifications.
    468 const char kEnableDeviceDiscoveryNotifications[] =
    469     "enable-device-discovery-notifications";
    470 
    471 // Enables the DOM distiller.
    472 const char kEnableDomDistiller[]               = "enable-dom-distiller";
    473 
    474 // Enables Domain Reliability Monitoring.
    475 const char kEnableDomainReliability[]          = "enable-domain-reliability";
    476 
    477 // Enable Enhanced Bookmarks.
    478 const char kEnhancedBookmarksExperiment[] = "enhanced-bookmarks-experiment";
    479 
    480 // Enables Easy Unlock to be set up and used.
    481 extern const char kEnableEasyUnlock[] = "enable-easy-unlock";
    482 
    483 // Enables experimentation with ephemeral apps, which are launched without
    484 // installing in Chrome.
    485 const char kEnableEphemeralApps[]           = "enable-ephemeral-apps";
    486 
    487 // Enables logging for extension activity.
    488 const char kEnableExtensionActivityLogging[] =
    489     "enable-extension-activity-logging";
    490 
    491 const char kEnableExtensionActivityLogTesting[] =
    492     "enable-extension-activity-log-testing";
    493 
    494 // Enable the fast unload controller, which speeds up tab/window close by
    495 // running a tab's onunload js handler independently of the GUI -
    496 // crbug.com/142458 .
    497 const char kEnableFastUnload[]         = "enable-fast-unload";
    498 
    499 // Enables IPv6 support, even if probes suggest that it may not be fully
    500 // supported. Some probes may require internet connections, and this flag will
    501 // allow support independent of application testing. This flag overrides
    502 // "disable-ipv6" which appears elswhere in this file.
    503 const char kEnableIPv6[]                    = "enable-ipv6";
    504 
    505 // Enables experimentation with launching ephemeral apps via hyperlinks.
    506 const char kEnableLinkableEphemeralApps[]   = "enable-linkable-ephemeral-apps";
    507 
    508 // Runs the Native Client inside the renderer process and enables GPU plugin
    509 // (internally adds lEnableGpuPlugin to the command line).
    510 const char kEnableNaCl[]                    = "enable-nacl";
    511 
    512 // Enables the network-related benchmarking extensions.
    513 const char kEnableNetBenchmarking[]         = "enable-net-benchmarking";
    514 
    515 // Enables NPN with HTTP. It means NPN is enabled but SPDY won't be used.
    516 // HTTP is still used for all requests.
    517 const char kEnableNpnHttpOnly[]             = "enable-npn-http";
    518 
    519 // Enable auto-reload of error pages if offline.
    520 const char kEnableOfflineAutoReload[]       = "enable-offline-auto-reload";
    521 
    522 // Only auto-reload error pages when the tab is visible.
    523 const char kEnableOfflineAutoReloadVisibleOnly[] =
    524     "enable-offline-auto-reload-visible-only";
    525 
    526 // Enable/Disable offering a "Load stale copy" option to the user if offline.
    527 const char kEnableOfflineLoadStaleCache[]   = "enable-offline-load-stale-cache";
    528 const char kDisableOfflineLoadStaleCache[]  =
    529     "disable-offline-load-stale-cache";
    530 
    531 // Controls which branch of the origin chip in location bar experiment is
    532 // enabled.
    533 //
    534 // We're using independent flags here (as opposed to a common flag with
    535 // different values) to be able to enable/disable the entire experience
    536 // associated with this feature server-side from the FieldTrial (the complete
    537 // experience includes other flag changes as well). It is not currently possible
    538 // to do that with "flag=value" flags.
    539 const char kEnableOriginChipAlways[]        = "enable-origin-chip-always";
    540 const char kEnableOriginChipOnSrp[]         = "enable-origin-chip-on-srp";
    541 
    542 // Enables panels (always on-top docked pop-up windows).
    543 const char kEnablePanels[]                  = "enable-panels";
    544 
    545 // Enables showing unregistered printers in print preview
    546 const char kEnablePrintPreviewRegisterPromos[] =
    547     "enable-print-preview-register-promos";
    548 
    549 // Enable Privet storage.
    550 const char kEnablePrivetStorage[]           = "enable-privet-storage";
    551 
    552 // Enables tracking of tasks in profiler for viewing via about:profiler.
    553 // To predominantly disable tracking (profiling), use the command line switch:
    554 // --enable-profiling=0
    555 // Some tracking will still take place at startup, but it will be turned off
    556 // during chrome_browser_main.
    557 const char kEnableProfiling[]               = "enable-profiling";
    558 
    559 // Enables showing a prominent UI for initiating the URL app creation flow.
    560 const char kEnableProminentURLAppFlow[]     = "enable-prominent-url-app-flow";
    561 
    562 // Enables query in the omnibox.
    563 const char kEnableQueryExtraction[]         = "enable-query-extraction";
    564 
    565 // Enables support for the QUIC protocol.  This is a temporary testing flag.
    566 const char kEnableQuic[]                    = "enable-quic";
    567 
    568 // Enables support for the HTTPS over QUIC protocol.  This is a temporary
    569 // testing flag.  This only has an effect if QUIC protocol is enabled.
    570 const char kEnableQuicHttps[]               = "enable-quic-https";
    571 
    572 // Disable use of pacing of QUIC packets.
    573 // This only has an effect if QUIC protocol is enabled.
    574 const char kEnableQuicPacing[]              = "enable-quic-pacing";
    575 
    576 // Enable use of Chromium's port selection for the ephemeral port via bind().
    577 // This only has an effect if QUIC protocol is enabled.
    578 const char kEnableQuicPortSelection[]       = "enable-quic-port-selection";
    579 
    580 // Enables use of time-base loss detection for QUIC connections.
    581 // This only has an effect if QUIC protocol is enabled.
    582 const char kEnableQuicTimeBasedLossDetection[] =
    583     "enable-quic-time-based-loss-detection";
    584 
    585 // Enables save password prompt bubble.
    586 const char kEnableSavePasswordBubble[]      = "enable-save-password-bubble";
    587 
    588 // Enables SDCH for https schemes.
    589 const char kEnableSdchOverHttps[] = "enable-sdch-over-https";
    590 
    591 // Controls which branch of the "search button in omnibox" experiment is
    592 // enabled.
    593 //
    594 // We're using independent flags here (as opposed to a common flag with
    595 // different values) to be able to enable/disable the entire experience
    596 // associated with this feature server-side from the FieldTrial (the complete
    597 // experience includes other flag changes as well). It is not currently possible
    598 // to do that with "flag=value" flags.
    599 const char kEnableSearchButtonInOmniboxAlways[] =
    600     "enable-search-button-in-omnibox-always";
    601 const char kEnableSearchButtonInOmniboxForStr[] =
    602     "enable-search-button-in-omnibox-for-str";
    603 const char kEnableSearchButtonInOmniboxForStrOrIip[] =
    604     "enable-search-button-in-omnibox-for-str-or-iip";
    605 
    606 // Enables using bubbles for session restore request instead of infobars.
    607 const char kEnableSessionCrashedBubble[] = "enable-session-crashed-bubble";
    608 
    609 // Enables the deprecated window.showModalDialog API. This is slated for
    610 // removal.
    611 const char kEnableShowModalDialog[] = "enable-show-modal-dialog";
    612 
    613 // Enable or disable settings in a separate browser window per profile
    614 // (see SettingsWindowEnabled() below).
    615 const char kEnableSettingsWindow[]           = "enable-settings-window";
    616 const char kDisableSettingsWindow[]          = "disable-settings-window";
    617 
    618 // Enable SPDY/4, aka HTTP/2. This is a temporary testing flag.
    619 const char kEnableSpdy4[]                   = "enable-spdy4";
    620 
    621 // Enables auto correction for misspelled words.
    622 const char kEnableSpellingAutoCorrect[]     = "enable-spelling-auto-correct";
    623 
    624 // Enables participation in the field trial for user feedback to spelling
    625 // service.
    626 const char kEnableSpellingFeedbackFieldTrial[] =
    627     "enable-spelling-feedback-field-trial";
    628 
    629 // Enables an experimental hosted app experience.
    630 const char kEnableStreamlinedHostedApps[]   = "enable-streamlined-hosted-apps";
    631 
    632 // Enables the suggestions service.
    633 const char kEnableSuggestionsService[]      = "enable-suggestions-service";
    634 
    635 // Enables synced notifications.
    636 const char kEnableSyncSyncedNotifications[] =
    637     "enable-sync-synced-notifications";
    638 
    639 // Enables synced articles.
    640 const char kEnableSyncArticles[]            = "enable-sync-articles";
    641 
    642 // Enables fanciful thumbnail processing. Used with NTP for
    643 // instant-extended-api, where thumbnails are generally smaller.
    644 const char kEnableThumbnailRetargeting[]   = "enable-thumbnail-retargeting";
    645 
    646 // Enables Translate experimental new UX which replaces the infobar.
    647 const char kEnableTranslateNewUX[]         = "enable-translate-new-ux";
    648 
    649 // Enables Alternate-Protocol when the port is user controlled (> 1024).
    650 const char kEnableUserAlternateProtocolPorts[] =
    651     "enable-user-controlled-alternate-protocol-ports";
    652 
    653 // Spawns threads to watch for excessive delays in specified message loops.
    654 // User should set breakpoints on Alarm() to examine problematic thread.
    655 //
    656 // Usage:   -enable-watchdog=[ui][io]
    657 //
    658 // Order of the listed sub-arguments does not matter.
    659 const char kEnableWatchdog[]                = "enable-watchdog";
    660 
    661 // Uses WebSocket over SPDY.
    662 const char kEnableWebSocketOverSpdy[]       = "enable-websocket-over-spdy";
    663 
    664 // Explicitly allows additional ports using a comma-separated list of port
    665 // numbers.
    666 const char kExplicitlyAllowedPorts[]        = "explicitly-allowed-ports";
    667 
    668 // Turns on extension install verification if it would not otherwise have been
    669 // turned on.
    670 const char kExtensionsInstallVerification[] = "extensions-install-verification";
    671 
    672 // Specifies a comma-separated list of extension ids that should be forced to
    673 // be treated as not from the webstore when doing install verification.
    674 const char kExtensionsNotWebstore[] = "extensions-not-webstore";
    675 
    676 // Frequency in seconds for Extensions auto-update.
    677 const char kExtensionsUpdateFrequency[]     = "extensions-update-frequency";
    678 
    679 // Additional query params to insert in the search and instant URLs.  Useful for
    680 // testing.
    681 const char kExtraSearchQueryParams[]        = "extra-search-query-params";
    682 
    683 // Fakes the channel of the browser for purposes of Variations filtering. This
    684 // is to be used for testing only. Possible values are "stable", "beta", "dev"
    685 // and "canary". Note that this only applies if the browser's reported channel
    686 // is UNKNOWN.
    687 const char kFakeVariationsChannel[]         = "fake-variations-channel";
    688 
    689 // If this flag is present then this command line is being delegated to an
    690 // already running chrome process via the fast path, ie: before chrome.dll is
    691 // loaded. It is useful to tell the difference for tracking purposes.
    692 const char kFastStart[]            = "fast-start";
    693 
    694 // These two flags are added around the switches about:flags adds to the
    695 // command line. This is useful to see which switches were added by about:flags
    696 // on about:version. They don't have any effect.
    697 const char kFlagSwitchesBegin[]             = "flag-switches-begin";
    698 const char kFlagSwitchesEnd[]               = "flag-switches-end";
    699 
    700 // Forces application mode. This hides certain system UI elements and forces
    701 // the app to be installed if it hasn't been already.
    702 const char kForceAppMode[]                  = "force-app-mode";
    703 
    704 // Displays the First Run experience when the browser is started, regardless of
    705 // whether or not it's actually the First Run (this overrides kNoFirstRun).
    706 const char kForceFirstRun[]                 = "force-first-run";
    707 
    708 // Forces additional Chrome Variation Ids that will be sent in X-Client-Data
    709 // header, specified as a 64-bit encoded list of numeric experiment ids. Ids
    710 // prefixed with the character "t" will be treated as Trigger Variation Ids.
    711 const char kForceVariationIds[]             = "force-variation-ids";
    712 
    713 // Specifies a custom name for the GSSAPI library to load.
    714 const char kGSSAPILibraryName[]             = "gssapi-library-name";
    715 
    716 // These flags show the man page on Linux. They are equivalent to each
    717 // other.
    718 const char kHelp[]                          = "help";
    719 const char kHelpShort[]                     = "h";
    720 
    721 // Makes Windows happy by allowing it to show "Enable access to this program"
    722 // checkbox in Add/Remove Programs->Set Program Access and Defaults. This only
    723 // shows an error box because the only way to hide Chrome is by uninstalling
    724 // it.
    725 const char kHideIcons[]                     = "hide-icons";
    726 
    727 // Enables grouping websites by domain and filtering them by period.
    728 const char kHistoryEnableGroupByDomain[]    = "enable-grouped-history";
    729 
    730 // Specifies which page will be displayed in newly-opened tabs. We need this
    731 // for testing purposes so that the UI tests don't depend on what comes up for
    732 // http://google.com.
    733 const char kHomePage[]                      = "homepage";
    734 
    735 // Comma-separated list of rules that control how hostnames are mapped.
    736 //
    737 // For example:
    738 //    "MAP * 127.0.0.1" --> Forces all hostnames to be mapped to 127.0.0.1
    739 //    "MAP *.google.com proxy" --> Forces all google.com subdomains to be
    740 //                                 resolved to "proxy".
    741 //    "MAP test.com [::1]:77 --> Forces "test.com" to resolve to IPv6 loopback.
    742 //                               Will also force the port of the resulting
    743 //                               socket address to be 77.
    744 //    "MAP * baz, EXCLUDE www.google.com" --> Remaps everything to "baz",
    745 //                                            except for "www.google.com".
    746 //
    747 // These mappings apply to the endpoint host in a net::URLRequest (the TCP
    748 // connect and host resolver in a direct connection, and the CONNECT in an http
    749 // proxy connection, and the endpoint host in a SOCKS proxy connection).
    750 const char kHostRules[]                     = "host-rules";
    751 
    752 // The maximum number of concurrent host resolve requests (i.e. DNS) to allow
    753 // (not counting backup attempts which would also consume threads).
    754 // --host-resolver-retry-attempts must be set to zero for this to be exact.
    755 const char kHostResolverParallelism[]       = "host-resolver-parallelism";
    756 
    757 // The maximum number of retry attempts to resolve the host. Set this to zero
    758 // to disable host resolver retry attempts.
    759 const char kHostResolverRetryAttempts[]     = "host-resolver-retry-attempts";
    760 
    761 // Causes net::URLFetchers to ignore requests for SSL client certificates,
    762 // causing them to attempt an unauthenticated SSL/TLS session. This is intended
    763 // for use when testing various service URLs (eg: kPromoServerURL, kSbURLPrefix,
    764 // kSyncServiceURL, etc)
    765 const char kIgnoreUrlFetcherCertRequests[]  =
    766     "ignore-urlfetcher-cert-requests";
    767 
    768 // Causes the browser to launch directly in incognito mode.
    769 const char kIncognito[]                     = "incognito";
    770 
    771 // Causes Chrome to initiate an installation flow for the given app.
    772 const char kInstallChromeApp[]              = "install-chrome-app";
    773 
    774 // Causes Chrome to attempt to get metadata from the webstore for the
    775 // app/extension ID given, and then prompt the user to download and install it.
    776 const char kInstallFromWebstore[]           = "install-from-webstore";
    777 
    778 // Marks a renderer as an Instant process.
    779 const char kInstantProcess[]                = "instant-process";
    780 
    781 // Invalidation service should use GCM network channel even if experiment is not
    782 // enabled.
    783 const char kInvalidationUseGCMChannel[]     = "invalidation-use-gcm-channel";
    784 
    785 // Specifies the testcase used by the IPC fuzzer.
    786 const char kIpcFuzzerTestcase[]             = "ipc-fuzzer-testcase";
    787 
    788 // Used for testing - keeps browser alive after last browser window closes.
    789 const char kKeepAliveForTest[]              = "keep-alive-for-test";
    790 
    791 // Enable Kiosk mode.
    792 const char kKioskMode[]                     = "kiosk";
    793 
    794 // Print automatically in kiosk mode. |kKioskMode| must be set as well.
    795 // See http://crbug.com/31395.
    796 const char kKioskModePrinting[]             = "kiosk-printing";
    797 
    798 // Use this server address ledger.
    799 const char kLedgerServer[]                  = "ledger-server";
    800 
    801 // Use this tracing token for ledger.
    802 const char kLedgerTracingToken[]            = "ledger-tracing-token";
    803 
    804 // Causes Chrome to attempt to get metadata from the webstore for the
    805 // given item, and then prompt the user to download and install it.
    806 const char kLimitedInstallFromWebstore[]    = "limited-install-from-webstore";
    807 
    808 // Comma-separated list of directories with component extensions to load.
    809 const char kLoadComponentExtension[]        = "load-component-extension";
    810 
    811 // Loads an extension from the specified directory.
    812 const char kLoadExtension[]                 = "load-extension";
    813 
    814 // Controls which version of the malware and phishing interstitials is shown.
    815 const char kMalwareInterstitialV2[]         = "malware-interstitial-v2";
    816 const char kMalwareInterstitialV3[]         = "malware-interstitial-v3";
    817 const char kMalwareInterstitialV3Advice[]   = "malware-interstitial-v3-advice";
    818 const char kMalwareInterstitialV3Social[]   = "malware-interstitial-v3-social";
    819 const char kMalwareInterstitialV3NotRecommend[] =
    820     "malware-interstitial-v3-not-recommend";
    821 const char kMalwareInterstitialV3History[]  = "malware-interstitial-v3-history";
    822 
    823 // Makes Chrome default browser
    824 const char kMakeDefaultBrowser[]            = "make-default-browser";
    825 
    826 // Sets the supervised user ID for any loaded or newly created profile to the
    827 // given value. Pass an empty string to mark the profile as non-supervised.
    828 // Used for testing.
    829 const char kSupervisedUserId[]              = "managed-user-id";
    830 
    831 // Used to authenticate requests to the Sync service for supervised users.
    832 // Setting this switch also causes Sync to be set up for a supervised user.
    833 const char kSupervisedUserSyncToken[]       = "managed-user-sync-token";
    834 
    835 // Use to opt-in user into Finch experiment groups.
    836 const char kManualEnhancedBookmarks[] = "manual-enhanced-bookmarks";
    837 const char kManualEnhancedBookmarksOptout[] =
    838     "manual-enhanced-bookmarks-optout";
    839 
    840 // Forces the maximum disk space to be used by the media cache, in bytes.
    841 const char kMediaCacheSize[]                = "media-cache-size";
    842 
    843 // Enables histograming of tasks served by MessageLoop. See
    844 // about:histograms/Loop for results, which show frequency of messages on each
    845 // thread, including APC count, object signalling count, etc.
    846 const char kMessageLoopHistogrammer[]       = "message-loop-histogrammer";
    847 
    848 // Enables the recording of metrics reports but disables reporting. In contrast
    849 // to kDisableMetrics, this executes all the code that a normal client would
    850 // use for reporting, except the report is dropped rather than sent to the
    851 // server. This is useful for finding issues in the metrics code during UI and
    852 // performance tests.
    853 const char kMetricsRecordingOnly[]          = "metrics-recording-only";
    854 
    855 // Sets the base logging level for the net log. Log 0 logs the most data.
    856 // Intended primarily for use with --log-net-log.
    857 const char kNetLogLevel[]                   = "net-log-level";
    858 
    859 // Disables the default browser check. Useful for UI/browser tests where we
    860 // want to avoid having the default browser info-bar displayed.
    861 const char kNoDefaultBrowserCheck[]         = "no-default-browser-check";
    862 
    863 // By default, an https page can load images, fonts or frames from an http
    864 // page. This switch overrides this to block this lesser mixed-content problem.
    865 const char kNoDisplayingInsecureContent[]   = "no-displaying-insecure-content";
    866 
    867 // Don't record/playback events when using record & playback.
    868 const char kNoEvents[]                      = "no-events";
    869 
    870 // Disables all experiments set on about:flags. Does not disable about:flags
    871 // itself. Useful if an experiment makes chrome crash at startup: One can start
    872 // chrome with --no-experiments, disable the problematic lab at about:flags and
    873 // then restart chrome without this switch again.
    874 const char kNoExperiments[]                 = "no-experiments";
    875 
    876 // Skip First Run tasks, whether or not it's actually the First Run. Overridden
    877 // by kForceFirstRun. This does not drop the First Run sentinel and thus doesn't
    878 // prevent first run from occuring the next time chrome is launched without this
    879 // flag.
    880 const char kNoFirstRun[]                    = "no-first-run";
    881 
    882 // Whether or not the browser should warn if the profile is on a network share.
    883 // This flag is only relevant for Windows currently.
    884 const char kNoNetworkProfileWarning[]       = "no-network-profile-warning";
    885 
    886 // Don't send hyperlink auditing pings
    887 const char kNoPings[]                       = "no-pings";
    888 
    889 // Don't use a proxy server, always make direct connections. Overrides any
    890 // other proxy server flags that are passed.
    891 const char kNoProxyServer[]                 = "no-proxy-server";
    892 
    893 // Disables the service process from adding itself as an autorun process. This
    894 // does not delete existing autorun registrations, it just prevents the service
    895 // from registering a new one.
    896 const char kNoServiceAutorun[]              = "no-service-autorun";
    897 
    898 // Does not automatically open a browser window on startup (used when
    899 // launching Chrome for the purpose of hosting background apps).
    900 const char kNoStartupWindow[]               = "no-startup-window";
    901 
    902 // Disables checking whether we received an acknowledgment when registering
    903 // a supervised user. Also disables the timeout during registration that waits
    904 // for the ack. Useful when debugging against a server that does not
    905 // support notifications.
    906 const char kNoSupervisedUserAcknowledgmentCheck[]  =
    907     "no-managed-user-acknowledgment-check";
    908 
    909 // Specifies the maximum number of threads to use for running the Proxy
    910 // Autoconfig (PAC) script.
    911 const char kNumPacThreads[]                 = "num-pac-threads";
    912 
    913 // Launches URL in new browser window.
    914 const char kOpenInNewWindow[]               = "new-window";
    915 
    916 // Force use of QUIC for requests to the specified origin.
    917 const char kOriginToForceQuicOn[]           = "origin-to-force-quic-on";
    918 
    919 // The time that a new chrome process which is delegating to an already running
    920 // chrome process started. (See ProcessSingleton for more details.)
    921 const char kOriginalProcessStartTime[]      = "original-process-start-time";
    922 
    923 // Enable the out of process PDF plugin.
    924 const char kOutOfProcessPdf[] = "out-of-process-pdf";
    925 
    926 // Packages an extension to a .crx installable file from a given directory.
    927 const char kPackExtension[]                 = "pack-extension";
    928 
    929 // Optional PEM private key to use in signing packaged .crx.
    930 const char kPackExtensionKey[]              = "pack-extension-key";
    931 
    932 // Specifies the path to the user data folder for the parent profile.
    933 const char kParentProfile[]                 = "parent-profile";
    934 
    935 // Launches PerformanceMonitor at startup, which will gather statistics about
    936 // Chrome's CPU and memory usage, page load times, startup times, and network
    937 // usage, and will also store information about events which may be of interest,
    938 // such as extension-related occurrences and crashes. Optionally, this may be
    939 // run with an integer value representing the interval between the timed
    940 // metric gatherings, measured in seconds (if invalid or not provided, the
    941 // default interval is used).
    942 const char kPerformanceMonitorGathering[]   = "performance-monitor-gathering";
    943 
    944 // Development flag for permission request API. This flag is needed until
    945 // the API is finalized.
    946 // TODO(akuegel): Remove when this flag is not needed anymore.
    947 const char kPermissionRequestApiUrl[] = "permission-request-api-url";
    948 
    949 // Read previously recorded data from the cache. Only cached data is read.
    950 // See kRecordMode.
    951 const char kPlaybackMode[]                  = "playback-mode";
    952 
    953 // Use the PPAPI (Pepper) Flash found at the given path.
    954 const char kPpapiFlashPath[]                = "ppapi-flash-path";
    955 
    956 // Report the given version for the PPAPI (Pepper) Flash. The version should be
    957 // numbers separated by '.'s (e.g., "12.3.456.78"). If not specified, it
    958 // defaults to "10.2.999.999".
    959 const char kPpapiFlashVersion[]             = "ppapi-flash-version";
    960 
    961 // Triggers prerendering of search base page to prefetch results for the typed
    962 // omnibox query. Only has an effect when prerender is enabled.
    963 const char kPrefetchSearchResults[]         = "prefetch-search-results";
    964 
    965 // Triggers prerendering of pages from suggestions in the omnibox. Only has an
    966 // effect when Instant is either disabled or restricted to search, and when
    967 // prerender is enabled.
    968 const char kPrerenderFromOmnibox[]          = "prerender-from-omnibox";
    969 // These are the values the kPrerenderFromOmnibox switch may have, as in
    970 // "--prerender-from-omnibox=auto". auto: Allow field trial selection.
    971 const char kPrerenderFromOmniboxSwitchValueAuto[] = "auto";
    972 //   disabled: No prerendering.
    973 const char kPrerenderFromOmniboxSwitchValueDisabled[] = "disabled";
    974 //   enabled: Guaranteed prerendering.
    975 const char kPrerenderFromOmniboxSwitchValueEnabled[] = "enabled";
    976 // Controls speculative prerendering of pages, and content prefetching. Both
    977 // are dispatched from <link rel=prefetch href=...> elements.
    978 const char kPrerenderMode[]                 = "prerender";
    979 // These are the values the kPrerenderMode switch may have, as in
    980 // "--prerender=auto".
    981 //   auto: Allow field trial selection for prerender.
    982 const char kPrerenderModeSwitchValueAuto[]  = "auto";
    983 //   disabled: No prerendering.
    984 const char kPrerenderModeSwitchValueDisabled[] = "disabled";
    985 //   enabled: Prerendering.
    986 const char kPrerenderModeSwitchValueEnabled[] = "enabled";
    987 
    988 // Use IPv6 only for privet HTTP.
    989 const char kPrivetIPv6Only[]                   = "privet-ipv6-only";
    990 
    991 // Outputs the product version information and quit. Used as an internal api to
    992 // detect the installed version of Chrome on Linux.
    993 const char kProductVersion[]                = "product-version";
    994 
    995 // Selects directory of profile to associate with the first browser launched.
    996 const char kProfileDirectory[]              = "profile-directory";
    997 
    998 // Starts the sampling based profiler for the browser process at startup. This
    999 // will only work if chrome has been built with the gyp variable profiling=1.
   1000 // The output will go to the value of kProfilingFile.
   1001 const char kProfilingAtStart[]              = "profiling-at-start";
   1002 
   1003 // Specifies a location for profiling output. This will only work if chrome has
   1004 // been built with the gyp variable profiling=1.
   1005 //
   1006 //   {pid} if present will be replaced by the pid of the process.
   1007 //   {count} if present will be incremented each time a profile is generated
   1008 //           for this process.
   1009 // The default is chrome-profile-{pid}.
   1010 const char kProfilingFile[]                 = "profiling-file";
   1011 
   1012 // Specifies a path for the output of task-level profiling which can be loaded
   1013 // and viewed in about:profiler.
   1014 const char kProfilingOutputFile[]           = "profiling-output-file";
   1015 
   1016 // Controls whether profile data is periodically flushed to a file. Normally
   1017 // the data gets written on exit but cases exist where chrome doesn't exit
   1018 // cleanly (especially when using single-process). A time in seconds can be
   1019 // specified.
   1020 const char kProfilingFlush[]                = "profiling-flush";
   1021 
   1022 // Specifies a custom URL for fetching NTP promo data.
   1023 const char kPromoServerURL[]                = "promo-server-url";
   1024 
   1025 // Forces proxy auto-detection.
   1026 const char kProxyAutoDetect[]               = "proxy-auto-detect";
   1027 
   1028 // Specifies a list of hosts for whom we bypass proxy settings and use direct
   1029 // connections. Ignored if --proxy-auto-detect or --no-proxy-server are also
   1030 // specified. This is a comma-separated list of bypass rules. See:
   1031 // "net/proxy/proxy_bypass_rules.h" for the format of these rules.
   1032 const char kProxyBypassList[]               = "proxy-bypass-list";
   1033 
   1034 // Uses the pac script at the given URL
   1035 const char kProxyPacUrl[]                   = "proxy-pac-url";
   1036 
   1037 // Uses a specified proxy server, overrides system settings. This switch only
   1038 // affects HTTP and HTTPS requests.
   1039 const char kProxyServer[]                   = "proxy-server";
   1040 
   1041 // Specifies the maximum length for a QUIC packet.
   1042 const char kQuicMaxPacketLength[]           = "quic-max-packet-length";
   1043 
   1044 // Specifies the version of QUIC to use.
   1045 const char kQuicVersion[]                   = "quic-version";
   1046 
   1047 // Chrome supports a playback and record mode.  Record mode saves *everything*
   1048 // to the cache.  Playback mode reads data exclusively from the cache.  This
   1049 // allows us to record a session into the cache and then replay it at will.
   1050 // See also kPlaybackMode.
   1051 const char kRecordMode[]                    = "record-mode";
   1052 
   1053 // Enables print preview in the renderer. This flag is generated internally by
   1054 // Chrome and does nothing when directly passed to the browser.
   1055 const char kRendererPrintPreview[]          = "renderer-print-preview";
   1056 
   1057 // If set, the app list will forget it has been installed on startup. Note this
   1058 // doesn't prevent the app list from running, it just makes Chrome think the app
   1059 // list hasn't been enabled (as in kEnableAppList) yet.
   1060 const char kResetAppListInstallState[]      = "reset-app-list-install-state";
   1061 
   1062 // Indicates the last session should be restored on startup. This overrides the
   1063 // preferences value and is primarily intended for testing. The value of this
   1064 // switch is the number of tabs to wait until loaded before 'load completed' is
   1065 // sent to the ui_test.
   1066 const char kRestoreLastSession[]            = "restore-last-session";
   1067 
   1068 // Disable saving pages as HTML-only, disable saving pages as HTML Complete
   1069 // (with a directory of sub-resources). Enable only saving pages as MHTML.
   1070 // See http://crbug.com/120416 for how to remove this switch.
   1071 const char kSavePageAsMHTML[]               = "save-page-as-mhtml";
   1072 
   1073 // If present, safebrowsing only performs update when
   1074 // SafeBrowsingProtocolManager::ForceScheduleNextUpdate() is explicitly called.
   1075 // This is used for testing only.
   1076 const char kSbDisableAutoUpdate[] = "safebrowsing-disable-auto-update";
   1077 
   1078 // TODO(lzheng): Remove this flag once the feature works fine
   1079 // (http://crbug.com/74848).
   1080 //
   1081 // Disables safebrowsing feature that checks download url and downloads
   1082 // content's hash to make sure the content are not malicious.
   1083 const char kSbDisableDownloadProtection[] =
   1084     "safebrowsing-disable-download-protection";
   1085 
   1086 // Disables safebrowsing feature that checks for blacklisted extensions.
   1087 const char kSbDisableExtensionBlacklist[] =
   1088     "safebrowsing-disable-extension-blacklist";
   1089 
   1090 // Disables safebrowsing feature that provides a side-effect free whitelist.
   1091 const char kSbDisableSideEffectFreeWhitelist[] =
   1092     "safebrowsing-disable-side-effect-free-whitelist";
   1093 
   1094 // Causes the process to run as a service process.
   1095 const char kServiceProcess[]                = "service";
   1096 
   1097 // Sets a token in the token service, for testing.
   1098 const char kSetToken[]                      = "set-token";
   1099 
   1100 // If true the app list will be shown.
   1101 const char kShowAppList[]                   = "show-app-list";
   1102 
   1103 // See kHideIcons.
   1104 const char kShowIcons[]                     = "show-icons";
   1105 
   1106 // Marks a renderer as the signin process.
   1107 const char kSigninProcess[]                 = "signin-process";
   1108 
   1109 // Does not show an infobar when an extension attaches to a page using
   1110 // chrome.debugger page. Required to attach to extension background pages.
   1111 const char kSilentDebuggerExtensionAPI[]    = "silent-debugger-extension-api";
   1112 
   1113 // Causes Chrome to launch without opening any windows by default. Useful if
   1114 // one wishes to use Chrome as an ash server.
   1115 const char kSilentLaunch[]                  = "silent-launch";
   1116 
   1117 // Simulates an update being available.
   1118 const char kSimulateUpgrade[]               = "simulate-upgrade";
   1119 
   1120 // Simulates a critical update being available.
   1121 const char kSimulateCriticalUpdate[]        = "simulate-critical-update";
   1122 
   1123 // Simulates that current version is outdated.
   1124 const char kSimulateOutdated[]               = "simulate-outdated";
   1125 
   1126 // Simulates that current version is outdated and auto-update is off.
   1127 const char kSimulateOutdatedNoAU[]           = "simulate-outdated-no-au";
   1128 
   1129 // Specifies the URL where spelling service feedback data will be sent instead
   1130 // of the default URL. This switch is for temporary testing only.
   1131 // TODO(rouslan): Remove this flag when feedback testing is complete. Revisit by
   1132 // August 2013.
   1133 const char kSpellingServiceFeedbackUrl[] = "spelling-service-feedback-url";
   1134 
   1135 // Specifies the number of seconds between sending batches of feedback to
   1136 // spelling service. The default is 30 minutes. The mininum is 5 seconds. This
   1137 // switch is for temporary testing only.
   1138 // TODO(rouslan): Remove this flag when feedback testing is complete. Revisit by
   1139 // August 2013.
   1140 const char kSpellingServiceFeedbackIntervalSeconds[] =
   1141     "spelling-service-feedback-interval-seconds";
   1142 
   1143 // Controls which version of the TLS/SSL interstitial is shown.
   1144 const char kSSLInterstitialVersionV1[]         = "ssl-interstitial-v1";
   1145 const char kSSLInterstitialVersionV2Gray[]     = "ssl-interstitial-v2-gray";
   1146 const char kSSLInterstitialVersionV2Colorful[] = "ssl-interstitial-v2-colorful";
   1147 
   1148 // Specifies the maximum SSL/TLS version ("ssl3", "tls1", "tls1.1", or
   1149 // "tls1.2").
   1150 const char kSSLVersionMax[]                 = "ssl-version-max";
   1151 
   1152 // Specifies the minimum SSL/TLS version ("ssl3", "tls1", "tls1.1", or
   1153 // "tls1.2").
   1154 const char kSSLVersionMin[]                 = "ssl-version-min";
   1155 
   1156 // Starts the browser maximized, regardless of any previous settings.
   1157 const char kStartMaximized[]                = "start-maximized";
   1158 
   1159 // Controls the width of time-of-day filters on the 'suggested' ntp page, in
   1160 // minutes.
   1161 const char kSuggestionNtpFilterWidth[]      = "suggestion-ntp-filter-width";
   1162 
   1163 // Enables a normal distribution dropoff to the relevancy of visits with respect
   1164 // to the time of day.
   1165 const char kSuggestionNtpGaussianFilter[]   = "suggestion-ntp-gaussian-filter";
   1166 
   1167 // Enables a linear dropoff to the relevancy of visits with respect to the time
   1168 // of day.
   1169 const char kSuggestionNtpLinearFilter[]     = "suggestion-ntp-linear-filter";
   1170 
   1171 // This flag causes sync to retry very quickly (see polling_constants.h) the
   1172 // when it encounters an error, as the first step towards exponential backoff.
   1173 const char kSyncShortInitialRetryOverride[] =
   1174     "sync-short-initial-retry-override";
   1175 
   1176 // Overrides the default server used for profile sync.
   1177 const char kSyncServiceURL[]                = "sync-url";
   1178 
   1179 // Enables deferring sync backend initialization until user initiated changes
   1180 // occur.
   1181 const char kSyncDisableDeferredStartup[]     = "sync-disable-deferred-startup";
   1182 
   1183 // Allows overriding the deferred init fallback timeout.
   1184 const char kSyncDeferredStartupTimeoutSeconds[] =
   1185     "sync-deferred-startup-timeout-seconds";
   1186 
   1187 // Enables feature to avoid unnecessary GetUpdate requests.
   1188 const char kSyncEnableGetUpdateAvoidance[]   =
   1189     "sync-enable-get-update-avoidance";
   1190 
   1191 // Enables directory support for sync filesystem
   1192 const char kSyncfsEnableDirectoryOperation[] =
   1193     "enable-syncfs-directory-operation";
   1194 
   1195 // Disable data backup when user's not signed in.
   1196 const char kSyncDisableBackup[] = "disable-sync-backup";
   1197 
   1198 // Enable data rollback when receiving sync rollback command.
   1199 const char kSyncEnableRollback[] = "enable-sync-rollback";
   1200 
   1201 // Passes the name of the current running automated test to Chrome.
   1202 const char kTestName[]                      = "test-name";
   1203 
   1204 // Disables same-origin check on HTTP resources pushed via a SPDY proxy.
   1205 // The value is the host:port of the trusted proxy.
   1206 const char kTrustedSpdyProxy[]              = "trusted-spdy-proxy";
   1207 
   1208 // Experimental. Shows a dialog asking the user to try chrome. This flag is to
   1209 // be used only by the upgrade process.
   1210 const char kTryChromeAgain[]                = "try-chrome-again";
   1211 
   1212 // Runs un-installation steps that were done by chrome first-run.
   1213 const char kUninstall[]                     = "uninstall";
   1214 
   1215 // Overrides per-origin quota settings to unlimited storage for any
   1216 // apps/origins.  This should be used only for testing purpose.
   1217 const char kUnlimitedStorage[]              = "unlimited-storage";
   1218 
   1219 // Uses Spdy for the transport protocol instead of HTTP. This is a temporary
   1220 // testing flag.
   1221 const char kUseSpdy[]                       = "use-spdy";
   1222 
   1223 // A string used to override the default user agent with a custom one.
   1224 const char kUserAgent[]                     = "user-agent";
   1225 
   1226 // Specifies the user data directory, which is where the browser will look for
   1227 // all of its state.
   1228 const char kUserDataDir[]                   = "user-data-dir";
   1229 
   1230 // Examines a .crx for validity and prints the result.
   1231 const char kValidateCrx[]                   = "validate-crx";
   1232 
   1233 // Uses experimental simple cache backend if possible.
   1234 const char kUseSimpleCacheBackend[]         = "use-simple-cache-backend";
   1235 
   1236 // Specifies a custom URL for the server which reports variation data to the
   1237 // client. Specifying this switch enables the Variations service on
   1238 // unofficial builds. See variations_service.cc.
   1239 const char kVariationsServerURL[]           = "variations-server-url";
   1240 
   1241 // Prints version information and quits.
   1242 const char kVersion[]                       = "version";
   1243 
   1244 // Specify the initial window position: --window-position=x,y
   1245 const char kWindowPosition[]                = "window-position";
   1246 
   1247 // Specify the initial window size: --window-size=w,h
   1248 const char kWindowSize[]                    = "window-size";
   1249 
   1250 // Uses WinHTTP to fetch and evaluate PAC scripts. Otherwise the default is to
   1251 // use Chromium's network stack to fetch, and V8 to evaluate.
   1252 const char kWinHttpProxyResolver[]          = "winhttp-proxy-resolver";
   1253 
   1254 #if defined(ENABLE_PLUGIN_INSTALLATION)
   1255 // Specifies a custom URL for fetching plug-ins metadata. Used for testing.
   1256 const char kPluginsMetadataServerURL[]      = "plugins-metadata-server-url";
   1257 #endif
   1258 
   1259 #if defined(OS_ANDROID)
   1260 // Disables support for playing videos on Chromecast devices.
   1261 const char kDisableCast[]                    = "disable-cast";
   1262 
   1263 // Disables Contextual Search.
   1264 const char kDisableContextualSearch[]        = "disable-contextual-search";
   1265 
   1266 // Disables the new NTP.
   1267 const char kDisableNewNTP[]                  = "disable-new-ntp";
   1268 
   1269 // Disables zero suggest experiment on Dev channel.
   1270 const char kDisableZeroSuggest[] = "disable-zero-suggest";
   1271 
   1272 // Enable the accessibility tab switcher.
   1273 const char kEnableAccessibilityTabSwitcher[] =
   1274     "enable-accessibility-tab-switcher";
   1275 
   1276 // Enables app install alerts.
   1277 const char kEnableAppInstallAlerts[]        = "enable-app-install-alerts";
   1278 
   1279 // Enables Contextual Search.
   1280 const char kEnableContextualSearch[]        = "enable-contextual-search";
   1281 
   1282 // Enables the new NTP.
   1283 const char kEnableNewNTP[]                  = "enable-new-ntp";
   1284 
   1285 // Enables zero suggest functionality on Dev channel, showing contextual
   1286 // suggestions (EtherSuggest) for http pages and google.com search queries.
   1287 const char kEnableZeroSuggestEtherSerp[] =
   1288     "enable-zero-suggest-ether-serp";
   1289 
   1290 // Enables zero suggest functionality on Dev channel, showing contextual
   1291 // suggestions (EtherSuggest) for http pages.
   1292 const char kEnableZeroSuggestEtherNoSerp[] =
   1293     "enable-zero-suggest-ether-noserp";
   1294 
   1295 // Enables zero suggest functionality on Dev channel, showing most visited
   1296 // sites as default suggestions.
   1297 const char kEnableZeroSuggestMostVisited[] =
   1298     "enable-zero-suggest-most-visited";
   1299 
   1300 // Enables zero suggest functionality on Dev channel, showing recently typed
   1301 // queries as default suggestions.
   1302 const char kEnableZeroSuggestPersonalized[] =
   1303     "enable-zero-suggest-personalized";
   1304 
   1305 // Enables instant search clicks feature.
   1306 const char kEnableInstantSearchClicks[] = "enable-instant-search-clicks";
   1307 
   1308 // Enables EmbeddedSearch API in the search results page.
   1309 const char kEnableEmbeddedSearchAPI[] = "enable-embeddedsearch-api";
   1310 
   1311 #endif
   1312 
   1313 #if defined(USE_ASH)
   1314 const char kOpenAsh[]                       = "open-ash";
   1315 #endif
   1316 
   1317 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_CHROMEOS)
   1318 // Specifies which password store to use (detect, default, gnome, kwallet).
   1319 const char kPasswordStore[]                 = "password-store";
   1320 #endif
   1321 
   1322 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
   1323 // Triggers migration of user data directory to another directory
   1324 // specified as a parameter. The migration is done under singleton lock,
   1325 // and sanity checks are made to avoid corrupting the profile.
   1326 // The browser exits after migration is complete.
   1327 const char kMigrateDataDirForSxS[]          = "migrate-data-dir-for-sxs";
   1328 
   1329 // Allows sending text-to-speech requests to speech-dispatcher, a common
   1330 // Linux speech service. Because it's buggy, the user must explicitly
   1331 // enable it so that visiting a random webpage can't cause instability.
   1332 const char kEnableSpeechDispatcher[] = "enable-speech-dispatcher";
   1333 #endif  // defined(OS_LINUX) && !defined(OS_CHROMEOS)
   1334 
   1335 #if defined(OS_MACOSX)
   1336 // Prevents Chrome from quitting when Chrome Apps are open.
   1337 const char kAppsKeepChromeAlive[]           = "apps-keep-chrome-alive";
   1338 
   1339 // Forcibly disables Lion-style on newer OSes, to allow developers to test the
   1340 // older, SnowLeopard-style fullscreen.
   1341 const char kDisableSystemFullscreenForTesting[] =
   1342     "disable-system-fullscreen-for-testing";
   1343 
   1344 // Enables a simplified fullscreen UI on Mac.
   1345 const char kEnableSimplifiedFullscreen[]    = "enable-simplified-fullscreen";
   1346 
   1347 // A process type (switches::kProcessType) that relaunches the browser. See
   1348 // chrome/browser/mac/relauncher.h.
   1349 const char kRelauncherProcess[]             = "relauncher";
   1350 
   1351 #endif
   1352 
   1353 // Use bubbles for content permissions requests instead of infobars.
   1354 const char kEnablePermissionsBubbles[]      = "enable-permissions-bubbles";
   1355 
   1356 #if defined(OS_WIN)
   1357 // Fallback to XPS. By default connector uses CDD.
   1358 const char kEnableCloudPrintXps[]           = "enable-cloud-print-xps";
   1359 
   1360 // Force-enables the profile shortcut manager. This is needed for tests since
   1361 // they use a custom-user-data-dir which disables this.
   1362 const char kEnableProfileShortcutManager[]  = "enable-profile-shortcut-manager";
   1363 
   1364 // For the DelegateExecute verb handler to launch Chrome in metro mode on
   1365 // Windows 8 and higher.  Used when relaunching metro Chrome.
   1366 const char kForceImmersive[]                = "force-immersive";
   1367 
   1368 // For the DelegateExecute verb handler to launch Chrome in desktop mode on
   1369 // Windows 8 and higher.  Used when relaunching metro Chrome.
   1370 const char kForceDesktop[]                  = "force-desktop";
   1371 
   1372 // Relaunches metro Chrome on Windows 8 and higher using a given shortcut.
   1373 const char kRelaunchShortcut[]              = "relaunch-shortcut";
   1374 
   1375 // Requests that Chrome connect to the running Metro viewer process.
   1376 const char kViewerConnect[]                 = "viewer-connect";
   1377 
   1378 // Requests that Chrome launch the Metro viewer process via the given appid
   1379 // (which is assumed to be registered as default browser) and synchronously
   1380 // connect to it.
   1381 const char kViewerLaunchViaAppId[]          = "viewer-launch-via-appid";
   1382 
   1383 // Waits for the given handle to be signaled before relaunching metro Chrome on
   1384 // Windows 8 and higher.
   1385 const char kWaitForMutex[]                  = "wait-for-mutex";
   1386 
   1387 // Indicates that chrome was launched to service a search request in Windows 8.
   1388 const char kWindows8Search[]                = "windows8-search";
   1389 #endif
   1390 
   1391 #if defined(ENABLE_FULL_PRINTING) && !defined(OFFICIAL_BUILD)
   1392 // Enables support to debug printing subsystem.
   1393 const char kDebugPrint[] = "debug-print";
   1394 #endif
   1395 
   1396 #ifndef NDEBUG
   1397 // Enables overriding the path of file manager extension.
   1398 const char kFileManagerExtensionPath[]      = "filemgr-ext-path";
   1399 #endif
   1400 
   1401 bool SettingsWindowEnabled() {
   1402 #if defined(OS_CHROMEOS)
   1403   return !CommandLine::ForCurrentProcess()->HasSwitch(
   1404       ::switches::kDisableSettingsWindow);
   1405 #else
   1406   return CommandLine::ForCurrentProcess()->HasSwitch(
   1407       ::switches::kEnableSettingsWindow);
   1408 #endif
   1409 }
   1410 
   1411 // -----------------------------------------------------------------------------
   1412 // DO NOT ADD YOUR CRAP TO THE BOTTOM OF THIS FILE.
   1413 //
   1414 // You were going to just dump your switches here, weren't you? Instead, please
   1415 // put them in alphabetical order above, or in order inside the appropriate
   1416 // ifdef at the bottom. The order should match the header.
   1417 // -----------------------------------------------------------------------------
   1418 
   1419 }  // namespace switches
   1420