1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/common/chrome_switches.h"
7 #include "base/base_switches.h"
8 #include "base/command_line.h"
12 // -----------------------------------------------------------------------------
13 // Can't find the switch you are looking for? try looking in
14 // base/base_switches.cc instead.
16 // When commenting your switch, please use the same voice as surrounding
17 // comments. Imagine "This switch..." at the beginning of the phrase, and it'll
19 // -----------------------------------------------------------------------------
21 // Enables or disables the "action box" UI in the toolbar.
22 const char kActionBox
[] = "action-box";
24 // Allows third-party content included on a page to prompt for a HTTP basic
25 // auth username/password pair.
26 const char kAllowCrossOriginAuthPrompt
[] = "allow-cross-origin-auth-prompt";
28 // On ChromeOS, file:// access is disabled except for certain whitelisted
29 // directories. This switch re-enables file:// for testing.
30 const char kAllowFileAccess
[] = "allow-file-access";
32 // Allows non-https URL for background_page for hosted apps.
33 const char kAllowHTTPBackgroundPage
[] = "allow-http-background-page";
35 // Allows the browser to load extensions that lack a modern manifest when that
36 // would otherwise be forbidden.
37 const char kAllowLegacyExtensionManifests
[] =
38 "allow-legacy-extension-manifests";
40 // Specifies comma-separated list of extension ids to grant access to TCP/UDP
42 const char kAllowNaClSocketAPI
[] = "allow-nacl-socket-api";
44 // Don't block outdated plugins.
45 const char kAllowOutdatedPlugins
[] = "allow-outdated-plugins";
47 // By default, an https page cannot run JavaScript, CSS or plug-ins from http
48 // URLs. This provides an override to get the old insecure behavior.
49 const char kAllowRunningInsecureContent
[] = "allow-running-insecure-content";
51 // Allows injecting extensions and user scripts on the extensions gallery
52 // site. Normally prevented for security reasons, but can be useful for
53 // automation testing of the gallery.
54 const char kAllowScriptingGallery
[] = "allow-scripting-gallery";
56 // Prevents Chrome from requiring authorization to run certain widely installed
57 // but less commonly used plug-ins.
58 const char kAlwaysAuthorizePlugins
[] = "always-authorize-plugins";
60 // Specifies that the extension-app with the specified id should be launched
61 // according to its configuration.
62 const char kAppId
[] = "app-id";
64 // Specifies that the associated value should be launched in "application"
66 const char kApp
[] = "app";
68 // Specifies the initial size for application windows launched with --app.
69 // --app-window-size=w,h
70 const char kAppWindowSize
[] = "app-window-size";
72 // A URL for the server which assigns channel ids for server pushed app
74 const char kAppNotifyChannelServerURL
[] = "app-notify-channel-server-url";
76 // Overrides the apps checkout URL, which is used to determine when to expose
78 const char kAppsCheckoutURL
[] = "apps-checkout-url";
80 // The URL that the webstore APIs download extensions from.
81 // Note: the URL must contain one '%s' for the extension ID.
82 const char kAppsGalleryDownloadURL
[] = "apps-gallery-download-url";
84 // A setting to cause extension/app installs from the webstore skip the normal
85 // confirmation dialog. A value of 'accept' means to always act as if the dialog
86 // was accepted, and 'cancel' means to always act as if the dialog was
88 const char kAppsGalleryInstallAutoConfirmForTests
[] =
89 "apps-gallery-install-auto-confirm-for-tests";
91 // Allows the webstorePrivate APIs to return browser (aka sync) login tokens to
92 // be used for auto-login in the Web Store (normally they do not).
93 const char kAppsGalleryReturnTokens
[] = "apps-gallery-return-tokens";
95 // The URL to use for the gallery link in the app launcher.
96 const char kAppsGalleryURL
[] = "apps-gallery-url";
98 // The update url used by gallery/webstore extensions.
99 const char kAppsGalleryUpdateURL
[] = "apps-gallery-update-url";
101 // Whether to always use the new app install bubble when installing an app.
102 const char kAppsNewInstallBubble
[] = "apps-new-install-bubble";
104 // Disable throbber for extension apps.
105 const char kAppsNoThrob
[] = "apps-no-throb";
107 // Whitelist of servers that Negotiate will generate delegated Kerberos tickets
109 const char kAuthNegotiateDelegateWhitelist
[] =
110 "auth-negotiate-delegate-whitelist";
112 // HTTP authentication schemes to enable. This is a comma-separated list of
113 // authentication schemes (basic, digest, ntlm, and negotiate). By default all
114 // schemes are enabled. The primary use of this command line flag is to help
115 // triage authentication-related issues reported by end-users.
116 const char kAuthSchemes
[] = "auth-schemes";
118 // Whitelist of servers which NTLM and Negotiate can automatically authenticate
119 // with using the default credentials of the currently logged in user.
120 const char kAuthServerWhitelist
[] = "auth-server-whitelist";
122 // A flag that is used to tell Chrome that it was launched automatically at
123 // computer startup and not by some user action.
124 const char kAutoLaunchAtStartup
[] = "auto-launch-at-startup";
126 // Flag used to tell Chrome the base url of the Autofill service.
127 const char kAutofillServiceUrl
[] = "autofill-service-url";
129 // The value of this switch tells the app to listen for and broadcast
130 // automation-related messages on IPC channel with the given ID.
131 const char kAutomationClientChannelID
[] = "automation-channel";
133 // Causes the automation provider to reinitialize its IPC channel instead of
134 // shutting down when a client disconnects.
135 const char kAutomationReinitializeOnChannelError
[] =
136 "automation-reinitialize-on-channel-error";
138 // How often (in seconds) to check for updates. Should only be used for testing
140 const char kCheckForUpdateIntervalSec
[] = "check-for-update-interval";
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";
147 // Tells Chrome to delay shutdown (for a specified number of seconds) when a
148 // Chrome Frame automation channel is closed.
149 const char kChromeFrameShutdownDelay
[] = "chrome-frame-shutdown-delay";
151 // Tells chrome to load the specified version of chrome.dll on Windows. If this
152 // version cannot be loaded, Chrome will exit.
153 const char kChromeVersion
[] = "chrome-version";
155 // Comma-separated list of SSL cipher suites to disable.
156 const char kCipherSuiteBlacklist
[] = "cipher-suite-blacklist";
158 // Clears the token service before using it. This allows simulating the
159 // expiration of credentials during testing.
160 const char kClearTokenService
[] = "clear-token-service";
162 // Used with kCloudPrintFile. Tells Chrome to delete the file when finished
163 // displaying the print dialog.
164 const char kCloudPrintDeleteFile
[] = "cloud-print-delete-file";
166 // Tells chrome to display the cloud print dialog and upload the specified file
168 const char kCloudPrintFile
[] = "cloud-print-file";
170 // Specifies the mime type to be used when uploading data from the file
171 // referenced by cloud-print-file. Defaults to "application/pdf" if
173 const char kCloudPrintFileType
[] = "cloud-print-file-type";
175 // Used with kCloudPrintFile to specify a JSON print ticket for the resulting
176 // print job. Defaults to null if unspecified.
177 const char kCloudPrintPrintTicket
[] = "cloud-print-print-ticket";
179 // Used with kCloudPrintFile to specify a title for the resulting print job.
180 const char kCloudPrintJobTitle
[] = "cloud-print-job-title";
182 // The unique id to be used for this cloud print proxy instance.
183 const char kCloudPrintProxyId
[] = "cloud-print-proxy-id";
185 // The URL of the cloud print service to use, overrides any value stored in
186 // preferences, and the default. Only used if the cloud print service has been
187 // enabled (see enable-cloud-print).
188 const char kCloudPrintServiceURL
[] = "cloud-print-service";
190 // Comma-separated options to troubleshoot the component updater. Only valid
191 // for the browser process.
192 const char kComponentUpdaterDebug
[] = "component-updater-debug";
194 // Causes the browser process to inspect loaded and registered DLLs for known
195 // conflicts and warn the user.
196 const char kConflictingModulesCheck
[] = "conflicting-modules-check";
198 // Toggles a new version of the content settings dialog in options.
199 const char kContentSettings2
[] = "new-content-settings";
201 // The Country we should use. This is normally obtained from the operating
202 // system during first run and cached in the preferences afterwards. This is a
203 // string value, the 2 letter code from ISO 3166-1.
204 const char kCountry
[] = "country";
206 // Causes the browser process to crash if browser threads are not responding
207 // for the given number of seconds.
208 const char kCrashOnHangSeconds
[] = "crash-on-hang-seconds";
210 // Comma-separated list of BrowserThreads that cause browser process to crash
211 // if the given browser thread is not responsive. UI,IO,DB,FILE,CACHE are the
212 // list of BrowserThreads that are supported.
215 // --crash-on-hang-threads=UI,IO --> Crash the browser if UI or IO thread
216 // is not responsive.
217 const char kCrashOnHangThreads
[] = "crash-on-hang-threads";
219 // Causes the browser process to crash if the number of browser threads that
220 // are responding is equal to the given number.
223 // --crash-on-live=1 --> Crash if only one thread is responsive and all
224 // other threads are not responsive.
225 const char kCrashOnLive
[] = "crash-on-live";
227 // Some platforms like ChromeOS default to empty desktop.
228 // Browser tests may need to add this switch so that at least one browser
229 // instance is created on startup.
230 // TODO(nkostylev): Investigate if this switch could be removed.
231 // (http://crbug.com/148675)
232 const char kCreateBrowserOnStartupForTests
[] =
233 "create-browser-on-startup-for-tests";
235 // Enables a frame context menu item that toggles the frame in and out of glass
236 // mode (Windows Vista and up only).
237 const char kDebugEnableFrameToggle
[] = "debug-enable-frame-toggle";
239 // Adds debugging entries such as Inspect Element to context menus of packed
241 const char kDebugPackedApps
[] = "debug-packed-apps";
243 // Enables support to debug printing subsystem.
244 const char kDebugPrint
[] = "debug-print";
246 // Specifies the URL at which to fetch configuration policy from the device
247 // management backend. Specifying this switch turns on managed policy from the
248 // device management backend.
249 const char kDeviceManagementUrl
[] = "device-management-url";
251 // Triggers a plethora of diagnostic modes.
252 const char kDiagnostics
[] = "diagnostics";
254 // Replaces the audio IPC layer for <audio> and <video> with a mock audio
255 // device, useful when using remote desktop or machines without sound cards.
256 // This is temporary until we fix the underlying problem.
258 // Disables the experimental asynchronous DNS client.
259 const char kDisableAsyncDns
[] = "disable-async-dns";
261 // Disables CNAME lookup of the host when generating the Kerberos SPN for a
262 // Negotiate challenge. See HttpAuthHandlerNegotiate::CreateSPN for more
264 const char kDisableAuthNegotiateCnameLookup
[] =
265 "disable-auth-negotiate-cname-lookup";
267 // Disables background mode (background apps will not keep chrome running in
269 const char kDisableBackgroundMode
[] = "disable-background-mode";
271 // Disable several subsystems which run network requests in the background.
272 // This is for use when doing network performance testing to avoid noise in the
274 const char kDisableBackgroundNetworking
[] = "disable-background-networking";
276 // Disables the bundled PPAPI version of Flash (if it's enabled by default).
277 const char kDisableBundledPpapiFlash
[] = "disable-bundled-ppapi-flash";
279 // Disables the bookmark autocomplete provider (BookmarkProvider).
280 const char kDisableBookmarkAutocompleteProvider
[] =
281 "disable-bookmark-autocomplete-provider";
283 // Disables the client-side phishing detection feature. Note that even if
284 // client-side phishing detection is enabled, it will only be active if the
285 // user has opted in to UMA stats and SafeBrowsing is enabled in the
287 const char kDisableClientSidePhishingDetection
[] =
288 "disable-client-side-phishing-detection";
290 const char kDisableComponentUpdate
[] = "disable-component-update";
292 // Disables establishing certificate revocation information by downloading a
293 // set of CRLs rather than performing on-line checks.
294 const char kDisableCRLSets
[] = "disable-crl-sets";
296 // Disables the custom JumpList on Windows 7.
297 const char kDisableCustomJumpList
[] = "disable-custom-jumplist";
299 // Disables installation of default apps on first run. This is used during
300 // automated testing.
301 const char kDisableDefaultApps
[] = "disable-default-apps";
303 // Disables retrieval of PAC URLs from DHCP as per the WPAD standard.
304 const char kDisableDhcpWpad
[] = "disable-dhcp-wpad";
306 // Disable extensions.
307 const char kDisableExtensions
[] = "disable-extensions";
309 // Disable checking for user opt-in for extensions that want to inject script
310 // into file URLs (ie, always allow it). This is used during automated testing.
311 const char kDisableExtensionsFileAccessCheck
[] =
312 "disable-extensions-file-access-check";
314 // Disable the net::URLRequestThrottlerManager functionality for
315 // requests originating from extensions.
316 const char kDisableExtensionsHttpThrottling
[] =
317 "disable-extensions-http-throttling";
319 // Disable mandatory enforcement of web_accessible_resources in extensions.
320 const char kDisableExtensionsResourceWhitelist
[] =
321 "disable-extensions-resource-whitelist";
323 // Disables improved SafeBrowsing download protection.
324 const char kDisableImprovedDownloadProtection
[] =
325 "disable-improved-download-protection";
327 // Disable the Infinite Cache.
328 const char kDisableInfiniteCache
[] = "disable-infinite-cache";
330 // Disable the internal Flash Player.
331 const char kDisableInternalFlash
[] = "disable-internal-flash";
333 // Don't resolve hostnames to IPv6 addresses. This can be used when debugging
334 // issues relating to IPv6, but shouldn't otherwise be needed. Be sure to file
335 // bugs if something isn't working properly in the presence of IPv6. This flag
336 // can be overidden by the "enable-ipv6" flag.
337 const char kDisableIPv6
[] = "disable-ipv6";
339 // Disables IP Pooling within the networks stack (SPDY only). When a connection
340 // is needed for a domain which shares an IP with an existing connection,
341 // attempt to use the existing connection.
342 const char kDisableIPPooling
[] = "disable-ip-pooling";
344 // Disables the menu on the NTP for accessing sessions from other devices.
345 const char kDisableNTPOtherSessionsMenu
[] = "disable-ntp-other-sessions-menu";
347 // Disable pop-up blocking.
348 const char kDisablePopupBlocking
[] = "disable-popup-blocking";
350 // Disable speculative TCP/IP preconnection.
351 const char kDisablePreconnect
[] = "disable-preconnect";
353 // Normally when the user attempts to navigate to a page that was the result of
354 // a post we prompt to make sure they want to. This switch may be used to
355 // disable that check. This switch is used during automated testing.
356 const char kDisablePromptOnRepost
[] = "disable-prompt-on-repost";
358 // Prevents the URLs of BackgroundContents from being remembered and
359 // re-launched when the browser restarts.
360 const char kDisableRestoreBackgroundContents
[] =
361 "disable-restore-background-contents";
363 // Disables restoring session state (cookies, session storage, etc.) when
364 // restoring the browsing session.
365 const char kDisableRestoreSessionState
[] = "disable-restore-session-state";
367 // Disables throttling prints initiated by scripts.
368 const char kDisableScriptedPrintThrottling
[] =
369 "disable-scripted-print-throttling";
371 // Disables syncing browser data to a Google Account.
372 const char kDisableSync
[] = "disable-sync";
374 // Disables syncing of app settings.
375 const char kDisableSyncAppSettings
[] = "disable-sync-app-settings";
377 // Disables syncing of apps.
378 const char kDisableSyncApps
[] = "disable-sync-apps";
380 // Disable syncing app notifications.
381 const char kDisableSyncAppNotifications
[] = "disable-sync-app-notifications";
383 // Disables syncing of autofill.
384 const char kDisableSyncAutofill
[] = "disable-sync-autofill";
386 // Disables syncing of autofill Profile.
387 const char kDisableSyncAutofillProfile
[] = "disable-sync-autofill-profile";
389 // Disables syncing of bookmarks.
390 const char kDisableSyncBookmarks
[] = "disable-sync-bookmarks";
392 // Disables syncing extension settings.
393 const char kDisableSyncExtensionSettings
[] = "disable-sync-extension-settings";
395 // Disables syncing of extensions.
396 const char kDisableSyncExtensions
[] = "disable-sync-extensions";
398 // Disables syncing browser passwords.
399 const char kDisableSyncPasswords
[] = "disable-sync-passwords";
401 // Disables syncing of preferences.
402 const char kDisableSyncPreferences
[] = "disable-sync-preferences";
404 // Disable syncing custom search engines.
405 const char kDisableSyncSearchEngines
[] = "disable-sync-search-engines";
407 // Disables syncing of themes.
408 const char kDisableSyncThemes
[] = "disable-sync-themes";
410 // Disables syncing browser typed urls.
411 const char kDisableSyncTypedUrls
[] = "disable-sync-typed-urls";
413 // Allows disabling of translate from the command line to assist with automated
414 // browser testing (e.g. Selenium/WebDriver). Normal browser users should
415 // disable translate with the preference.
416 const char kDisableTranslate
[] = "disable-translate";
418 // Disables TLS Channel ID extension.
419 const char kDisableTLSChannelID
[] = "disable-tls-channel-id";
421 // Disables the backend service for web resources.
422 const char kDisableWebResources
[] = "disable-web-resources";
424 // Disables the website settings UI.
425 const char kDisableWebsiteSettings
[] = "disable-website-settings";
427 // Some tests seem to require the application to close when the last
428 // browser window is closed. Thus, we need a switch to force this behavior
429 // for ChromeOS Aura, disable "zero window mode".
430 // TODO(pkotwicz): Investigate if this bug can be removed.
431 // (http://crbug.com/119175)
432 extern const char kDisableZeroBrowsersOpenForTests
[] =
433 "disable-zero-browsers-open-for-tests";
435 // Use a specific disk cache location, rather than one derived from the
437 const char kDiskCacheDir
[] = "disk-cache-dir";
439 // Forces the maximum disk space to be used by the disk cache, in bytes.
440 const char kDiskCacheSize
[] = "disk-cache-size";
442 const char kDnsLogDetails
[] = "dns-log-details";
444 // Disables prefetching of DNS information.
445 const char kDnsPrefetchDisable
[] = "dns-prefetch-disable";
447 // Dump any accumualted histograms to the log when browser terminates (requires
448 // logging to be enabled to really do anything). Used by developers and test
450 const char kDumpHistogramsOnExit
[] = "dump-histograms-on-exit";
452 // Enables the experimental asynchronous DNS client.
453 const char kEnableAsyncDns
[] = "enable-async-dns";
455 // Enables the inclusion of non-standard ports when generating the Kerberos SPN
456 // in response to a Negotiate challenge. See
457 // HttpAuthHandlerNegotiate::CreateSPN for more background.
458 const char kEnableAuthNegotiatePort
[] = "enable-auth-negotiate-port";
460 // Enables the pre- and auto-login features. When a user signs in to sync, the
461 // browser's cookie jar is pre-filled with GAIA cookies. When the user visits a
462 // GAIA login page, an info bar can help the user login.
463 const char kEnableAutologin
[] = "enable-autologin";
465 // Enables the benchmarking extensions.
466 const char kEnableBenchmarking
[] = "enable-benchmarking";
468 // Enables the bundled PPAPI version of Flash.
469 const char kEnableBundledPpapiFlash
[] = "enable-bundled-ppapi-flash";
471 // Enables the new cloud policy stack.
472 const char kEnableCloudPolicyService
[] = "enable-cloud-policy-service";
474 // This applies only when the process type is "service". Enables the Cloud
475 // Print Proxy component within the service process.
476 const char kEnableCloudPrintProxy
[] = "enable-cloud-print-proxy";
478 // Enables fetching the user's contacts from Google and showing them in the
479 // Chrome OS apps list.
480 const char kEnableContacts
[] = "enable-contacts";
482 // Enables web developers to create apps for Chrome without using crx packages.
483 const char kEnableCrxlessWebApps
[] = "enable-crxless-web-apps";
485 // If true devtools experimental settings are enabled.
486 const char kEnableDevToolsExperiments
[] = "enable-devtools-experiments";
488 // Enables Drive v2 API instead of Google Documents List API.
489 const char kEnableDriveV2Api
[] = "enable-drive-v2-api";
491 // Enables an interactive autocomplete UI and a way to invoke this UI from
492 // WebKit by enabling HTMLFormElement#requestAutocomplete (and associated
493 // autocomplete* events and logic).
494 const char kEnableInteractiveAutocomplete
[] = "enable-interactive-autocomplete";
496 // Enables extensions to be easily installed from sites other than the web
497 // store. Without this flag, they can still be installed, but must be manually
498 // dragged onto chrome://extensions/.
499 const char kEasyOffStoreExtensionInstall
[] = "easy-off-store-extension-install";
501 // Enables extension APIs that are in development.
502 const char kEnableExperimentalExtensionApis
[] =
503 "enable-experimental-extension-apis";
505 // Enable autofill for new elements like checkboxes. crbug.com/157636
506 const char kEnableExperimentalFormFilling
[] =
507 "enable-experimental-form-filling";
509 // Enables logging for extension activity.
510 const char kEnableExtensionActivityLogging
[] =
511 "enable-extension-activity-logging";
513 // Enables the extension activity UI.
514 const char kEnableExtensionActivityUI
[] = "enable-extension-activity-ui";
516 // Enables or disables showing extensions in the action box.
517 const char kExtensionsInActionBox
[] = "extensions-in-action-box";
519 // Enables experimental timeline API.
520 const char kEnableExtensionTimelineApi
[] = "enable-extension-timeline-api";
522 // Applies the chrome style to any dialog based on ConstrainedWindowViews.
523 const char kEnableChromeStyleDialogs
[] = "enable-chrome-style-dialogs";
525 // By default, cookies are not allowed on file://. They are needed for testing,
526 // for example page cycler and layout tests. See bug 1157243.
527 const char kEnableFileCookies
[] = "enable-file-cookies";
529 // Enable HTTP pipelining. Attempt to pipeline HTTP connections. Heuristics will
530 // try to figure out if pipelining can be used for a given host and request.
531 // Without this flag, pipelining will never be used.
532 const char kEnableHttpPipelining
[] = "enable-http-pipelining";
534 // Enable Instant extended API.
535 const char kEnableInstantExtendedAPI
[] = "enable-instant-extended-api";
537 // Enables IPv6 support, even if probes suggest that it may not be fully
538 // supported. Some probes may require internet connections, and this flag will
539 // allow support independent of application testing. This flag overrides
540 // "disable-ipv6" which appears elswhere in this file.
541 const char kEnableIPv6
[] = "enable-ipv6";
543 /// Enables the IPC fuzzer for reliability testing
544 const char kEnableIPCFuzzing
[] = "enable-ipc-fuzzing";
546 // Enables IP Pooling within the networks stack (SPDY only). When a connection
547 // is needed for a domain which shares an IP with an existing connection,
548 // attempt to use the existing connection.
549 const char kEnableIPPooling
[] = "enable-ip-pooling";
551 // The managed storage extension API is disabled by default for now. This
552 // flag can be used to enable it until http://crbug.com/108992 is fixed.
553 extern const char kEnableManagedStorage
[] = "enable-managed-storage";
555 // Allows reporting memory info (JS heap size) to page.
556 const char kEnableMemoryInfo
[] = "enable-memory-info";
558 // Enables metrics recording and reporting in the browser startup sequence, as
559 // if this was an official Chrome build where the user allowed metrics
560 // reporting. This is used for testing only.
561 const char kEnableMetricsReportingForTesting
[] =
562 "enable-metrics-reporting-for-testing";
564 // Runs the Native Client inside the renderer process and enables GPU plugin
565 // (internally adds lEnableGpuPlugin to the command line).
566 const char kEnableNaCl
[] = "enable-nacl";
568 // Enables debugging via RSP over a socket.
569 const char kEnableNaClDebug
[] = "enable-nacl-debug";
571 // Uses NaCl manifest URL to choose whether NaCl program will be debugged by
573 // Switch value format: [!]pattern1,pattern2,...,patternN. Each pattern uses
574 // the same syntax as patterns in Chrome extension manifest. The only difference
575 // is that * scheme matches all schemes instead of matching only http and https.
576 // If the value doesn't start with !, a program will be debugged if manifest URL
577 // matches any pattern. If the value starts with !, a program will be debugged
578 // if manifest URL does not match any pattern.
579 const char kNaClDebugMask
[] = "nacl-debug-mask";
581 // Enables the SRPC Proxy for NaCl. The default is the Chrome IPC based proxy.
582 // TODO(bbudge) remove this after we switch to IPC and remove SRPC.
583 const char kEnableNaClSRPCProxy
[] = "enable-nacl-srpc-proxy";
585 // Enables hardware exception handling via debugger process.
586 const char kEnableNaClExceptionHandling
[] = "enable-nacl-exception-handling";
588 // Enables the native messaging extensions API.
589 const char kEnableNativeMessaging
[] = "enable-native-messaging";
591 // Enables the new Autofill UI, which is part of the browser process rather than
592 // part of the renderer process. http://crbug.com/51644
593 const char kEnableNewAutofillUi
[] = "enable-new-autofill-ui";
595 // Enables new Autofill heuristics, such as adding support for new field types.
596 const char kEnableNewAutofillHeuristics
[] = "enable-new-autofill-heuristics";
598 // Enables NPN and SPDY. In case server supports SPDY, browser will use SPDY.
599 const char kEnableNpn
[] = "enable-npn";
601 // Enables NPN with HTTP. It means NPN is enabled but SPDY won't be used.
602 // HTTP is still used for all requests.
603 const char kEnableNpnHttpOnly
[] = "enable-npn-http";
605 // Enables panels (always on-top docked pop-up windows).
606 const char kEnablePanels
[] = "enable-panels";
608 // Enables password generation when we detect that the user is going through
610 const char kEnablePasswordGeneration
[] = "enable-password-generation";
612 // Enables content settings based on host *and* plug-in in the user
614 const char kEnableResourceContentSettings
[] =
615 "enable-resource-content-settings";
617 // Enables the installation and usage of Portable Native Client.
618 const char kEnablePnacl
[] = "enable-pnacl";
620 // Enables tracking of tasks in profiler for viewing via about:profiler.
621 // To predominantly disable tracking (profiling), use the command line switch:
622 // --enable-profiling=0
623 // Some tracking will still take place at startup, but it will be turned off
624 // during chrome_browser_main.
625 const char kEnableProfiling
[] = "enable-profiling";
628 // Controls the support for SDCH filtering (dictionary based expansion of
629 // content). By default SDCH filtering is enabled. To disable SDCH filtering,
630 // use "--enable-sdch=0" as command line argument. SDCH is currently only
631 // supported server-side for searches on google.com.
632 const char kEnableSdch
[] = "enable-sdch";
634 // Enable SPDY/3. This is a temporary testing flag.
635 const char kEnableSpdy3
[] = "enable-spdy3";
637 // Enable SPDY CREDENTIAL frame support. This is a temporary testing flag.
638 const char kEnableSpdyCredentialFrames
[] = "enable-spdy-credential-frames";
640 // Enables auto correction for misspelled words.
641 const char kEnableSpellingAutoCorrect
[] = "enable-spelling-auto-correct";
643 // Enables the stacked tabstrip.
644 const char kEnableStackedTabStrip
[] = "enable-stacked-tab-strip";
646 // Enables experimental suggestions pane in New Tab page.
647 const char kEnableSuggestionsTabPage
[] = "enable-suggestions-ntp";
649 // Enables syncing of history delete directives.
650 const char kEnableSyncHistoryDeleteDirectives
[] =
651 "enable-sync-history-delete-directives";
653 // Disables syncing browser sessions. Will override kEnableSyncTabs.
654 const char kDisableSyncTabs
[] = "disable-sync-tabs";
656 // Enables context menu for selecting groups of tabs.
657 const char kEnableTabGroupsContextMenu
[] = "enable-tab-groups-context-menu";
659 // Spawns threads to watch for excessive delays in specified message loops.
660 // User should set breakpoints on Alarm() to examine problematic thread.
662 // Usage: -enable-watchdog=[ui][io]
664 // Order of the listed sub-arguments does not matter.
665 const char kEnableWatchdog
[] = "enable-watchdog";
667 // Uses WebSocket over SPDY.
668 const char kEnableWebSocketOverSpdy
[] = "enable-websocket-over-spdy";
670 // Explicitly allows additional ports using a comma-separated list of port
672 const char kExplicitlyAllowedPorts
[] = "explicitly-allowed-ports";
674 // The time in seconds that an extension event page can be idle before it
676 const char kEventPageIdleTime
[] = "event-page-idle-time";
678 // The time in seconds that an extension event page has between being notified
679 // of its impending unload and that unload happening.
680 const char kEventPageUnloadingTime
[] = "event-page-unloading-time";
682 // Marks a renderer as extension process.
683 const char kExtensionProcess
[] = "extension-process";
685 // Frequency in seconds for Extensions auto-update.
686 const char kExtensionsUpdateFrequency
[] = "extensions-update-frequency";
688 // These two flags are added around the switches about:flags adds to the
689 // command line. This is useful to see which switches were added by about:flags
690 // on about:version. They don't have any effect.
691 const char kFlagSwitchesBegin
[] = "flag-switches-begin";
692 const char kFlagSwitchesEnd
[] = "flag-switches-end";
694 // Alternative feedback server to use when submitting user feedback
695 const char kFeedbackServer
[] = "feedback-server";
697 // The file descriptor limit is set to the value of this switch, subject to the
698 // OS hard limits. Useful for testing that file descriptor exhaustion is
699 // handled gracefully.
700 const char kFileDescriptorLimit
[] = "file-descriptor-limit";
702 // Displays the First Run experience when the browser is started, regardless of
703 // whether or not it's actually the first run.
704 const char kFirstRun
[] = "first-run";
706 // Force use of synchronous spell checking. If this is enabled, unified spell
707 // checking will be disabled since it relies on asynchronous spellchecking.
708 const char kForceSyncSpellCheck
[] = "force-sync-spellcheck";
710 // Enables using GAIA information to populate profile name and icon.
711 const char kGaiaProfileInfo
[] = "gaia-profile-info";
713 // Specifies an alternate URL to use for retrieving the search domain for
714 // Google. Useful for testing.
715 const char kGoogleSearchDomainCheckURL
[] = "google-search-domain-check-url";
717 // Specifies a custom name for the GSSAPI library to load.
718 const char kGSSAPILibraryName
[] = "gssapi-library-name";
720 // These flags show the man page on Linux. They are equivalent to each
722 const char kHelp
[] = "help";
723 const char kHelpShort
[] = "h";
725 // Makes Windows happy by allowing it to show "Enable access to this program"
726 // checkbox in Add/Remove Programs->Set Program Access and Defaults. This only
727 // shows an error box because the only way to hide Chrome is by uninstalling
729 const char kHideIcons
[] = "hide-icons";
731 // Specifies which page will be displayed in newly-opened tabs. We need this
732 // for testing purposes so that the UI tests don't depend on what comes up for
733 // http://google.com.
734 const char kHomePage
[] = "homepage";
736 // Comma-separated list of rules that control how hostnames are mapped.
739 // "MAP * 127.0.0.1" --> Forces all hostnames to be mapped to 127.0.0.1
740 // "MAP *.google.com proxy" --> Forces all google.com subdomains to be
741 // resolved to "proxy".
742 // "MAP test.com [::1]:77 --> Forces "test.com" to resolve to IPv6 loopback.
743 // Will also force the port of the resulting
744 // socket address to be 77.
745 // "MAP * baz, EXCLUDE www.google.com" --> Remaps everything to "baz",
746 // except for "www.google.com".
748 // These mappings apply to the endpoint host in a net::URLRequest (the TCP
749 // connect and host resolver in a direct connection, and the CONNECT in an http
750 // proxy connection, and the endpoint host in a SOCKS proxy connection).
751 const char kHostRules
[] = "host-rules";
753 // The maximum number of concurrent host resolve requests (i.e. DNS) to allow
754 // (not counting backup attempts which would also consume threads).
755 // --host-resolver-retry-attempts must be set to zero for this to be exact.
756 const char kHostResolverParallelism
[] = "host-resolver-parallelism";
758 // The maximum number of retry attempts to resolve the host. Set this to zero
759 // to disable host resolver retry attempts.
760 const char kHostResolverRetryAttempts
[] = "host-resolver-retry-attempts";
762 // Takes the JSON-formatted HSTS specification and loads it as if it were a
763 // preloaded HSTS entry. Takes precedence over both website-specified rules and
764 // built-in rules. The JSON format is the same as that persisted in
765 // <profile_dir>/Default/TransportSecurity
766 const char kHstsHosts
[] = "hsts-hosts";
768 // Performs importing from another browser. The value associated with this
769 // setting encodes the target browser and what items to import.
770 const char kImport
[] = "import";
772 // Performs bookmark importing from an HTML file. The value associated with
773 // this setting encodes the file path. It may be used jointly with kImport.
774 const char kImportFromFile
[] = "import-from-file";
776 // Causes the browser to launch directly in incognito mode.
777 const char kIncognito
[] = "incognito";
779 // Causes Chrome to attempt to get metadata from the webstore for the
780 // app/extension ID given, and then prompt the user to download and install it.
781 const char kInstallFromWebstore
[] = "install-from-webstore";
783 // URL to use for instant. If specified this overrides the url from the
785 const char kInstantURL
[] = "instant-url";
787 // Used for testing - keeps browser alive after last browser window closes.
788 const char kKeepAliveForTest
[] = "keep-alive-for-test";
790 // Enable Kiosk mode.
791 const char kKioskMode
[] = "kiosk";
793 // Print automatically in kiosk mode. |kKioskMode| must be set as well.
794 // See http://crbug.com/31395.
795 const char kKioskModePrinting
[] = "kiosk-printing";
797 // Comma-separated list of directories with component extensions to load.
798 const char kLoadComponentExtension
[] = "load-component-extension";
800 // If present, cloud policy will be loaded and applied once the user is signed
801 // in to the browser.
802 const char kLoadCloudPolicyOnSignin
[] = "load-cloud-policy-on-signin";
804 // Loads an extension from the specified directory.
805 const char kLoadExtension
[] = "load-extension";
807 // Loads the opencryptoki library into NSS at startup. This is only needed
808 // temporarily for developers who need to work on WiFi/VPN certificate code.
810 // TODO(gspencer): Remove this switch once cryptohomed work is finished:
811 // http://crosbug.com/12295 and http://crosbug.com/12304
812 const char kLoadOpencryptoki
[] = "load-opencryptoki";
814 // Enables displaying net log events on the command line, or writing the events
815 // to a separate file if a file name is given.
816 const char kLogNetLog
[] = "log-net-log";
818 // Uninstalls an extension with the specified extension id.
819 const char kUninstallExtension
[] = "uninstall-extension";
821 // Starts the browser in managed mode.
822 const char kManaged
[] = "managed";
824 // Makes Chrome default browser
825 const char kMakeDefaultBrowser
[] = "make-default-browser";
827 // Forces the maximum disk space to be used by the media cache, in bytes.
828 const char kMediaCacheSize
[] = "media-cache-size";
830 // Enables dynamic loading of the Memory Profiler DLL, which will trace all
831 // memory allocations during the run.
832 const char kMemoryProfiling
[] = "memory-profile";
834 // Enables histograming of tasks served by MessageLoop. See
835 // about:histograms/Loop for results, which show frequency of messages on each
836 // thread, including APC count, object signalling count, etc.
837 const char kMessageLoopHistogrammer
[] = "message-loop-histogrammer";
839 // Enables the recording of metrics reports but disables reporting. In contrast
840 // to kDisableMetrics, this executes all the code that a normal client would
841 // use for reporting, except the report is dropped rather than sent to the
842 // server. This is useful for finding issues in the metrics code during UI and
843 // performance tests.
844 const char kMetricsRecordingOnly
[] = "metrics-recording-only";
846 // Enables multiprofile Chrome.
847 const char kMultiProfiles
[] = "multi-profiles";
849 // Native Client GDB debugger for loader. It needs switches calculated
850 // at run time in order to work correctly. That's why NaClLoadCmdPrefix
851 // flag can't be used.
852 const char kNaClGdb
[] = "nacl-gdb";
854 // GDB script to pass to the nacl-gdb debugger at startup.
855 const char kNaClGdbScript
[] = "nacl-gdb-script";
857 // On POSIX only: the contents of this flag are prepended to the nacl-loader
858 // command line. Useful values might be "valgrind" or "xterm -e gdb --args".
859 const char kNaClLoaderCmdPrefix
[] = "nacl-loader-cmd-prefix";
861 // Sets the base logging level for the net log. Log 0 logs the most data.
862 // Intended primarily for use with --log-net-log.
863 const char kNetLogLevel
[] = "net-log-level";
865 // Disables the default browser check. Useful for UI/browser tests where we
866 // want to avoid having the default browser info-bar displayed.
867 const char kNoDefaultBrowserCheck
[] = "no-default-browser-check";
869 // By default, an https page can load images, fonts or frames from an http
870 // page. This switch overrides this to block this lesser mixed-content problem.
871 const char kNoDisplayingInsecureContent
[] = "no-displaying-insecure-content";
873 // Don't record/playback events when using record & playback.
874 const char kNoEvents
[] = "no-events";
876 // Disables all experiments set on about:flags. Does not disable about:flags
877 // itself. Useful if an experiment makes chrome crash at startup: One can start
878 // chrome with --no-experiments, disable the problematic lab at about:flags and
879 // then restart chrome without this switch again.
880 const char kNoExperiments
[] = "no-experiments";
882 // Whether or not it's actually the first run. Overrides kFirstRun in case
883 // you're for some reason tempted to pass them both.
884 const char kNoFirstRun
[] = "no-first-run";
886 // Support a separate switch that enables the v8 playback extension.
887 // The extension causes javascript calls to Date.now() and Math.random()
888 // to return consistent values, such that subsequent loads of the same
889 // page will result in consistent js-generated data and XHR requests.
890 // Pages may still be able to generate inconsistent data from plugins.
891 const char kNoJsRandomness
[] = "no-js-randomness";
893 // Starts the browser outside of managed mode.
894 const char kNoManaged
[] = "no-managed";
896 // Whether or not the browser should warn if the profile is on a network share.
897 // This flag is only relevant for Windows currently.
898 const char kNoNetworkProfileWarning
[] = "no-network-profile-warning";
900 // Don't send hyperlink auditing pings
901 const char kNoPings
[] = "no-pings";
903 // Don't use a proxy server, always make direct connections. Overrides any
904 // other proxy server flags that are passed.
905 const char kNoProxyServer
[] = "no-proxy-server";
907 // Disables the service process from adding itself as an autorun process. This
908 // does not delete existing autorun registrations, it just prevents the service
909 // from registering a new one.
910 const char kNoServiceAutorun
[] = "no-service-autorun";
912 // Does not automatically open a browser window on startup (used when
913 // launching Chrome for the purpose of hosting background apps).
914 const char kNoStartupWindow
[] = "no-startup-window";
916 // Shows a desktop notification that the cloud print token has expired and that
917 // user needs to re-authenticate.
918 const char kNotifyCloudPrintTokenExpired
[] = "notify-cp-token-expired";
920 // Specifies the maximum number of threads to use for running the Proxy
921 // Autoconfig (PAC) script.
922 const char kNumPacThreads
[] = "num-pac-threads";
924 // Controls whether to use the fancy new scoring (takes into account
925 // word breaks, does better balancing of topicality, recency, etc.) for
926 // HistoryQuickProvider.
927 const char kOmniboxHistoryQuickProviderNewScoring
[] =
928 "omnibox-history-quick-provider-new-scoring";
929 // The value the kOmniboxHistoryQuickProviderNewScoring switch may have,
930 // as in "--omnibox-history-quick-provider-new-scoring=1".
931 // 1 means use new scoring.
932 const char kOmniboxHistoryQuickProviderNewScoringEnabled
[] = "1";
933 // 0 means use old scoring ( == current behavior as of 6/2012).
934 const char kOmniboxHistoryQuickProviderNewScoringDisabled
[] = "0";
936 // Controls whether HistoryQuickProvider is allowed to reorder results
937 // according to inlineability in order to more aggressively assign/keep
938 // high relevance scores.
939 const char kOmniboxHistoryQuickProviderReorderForInlining
[] =
940 "omnibox-history-quick-provider-reorder-for-inlining";
941 // The value the kOmniboxHistoryQuickProviderReorderForInlining switch may
942 // have, as in "--omnibox-history-quick-provider-reorder-for-inlining=1".
943 // 1 means allow reordering results.
944 const char kOmniboxHistoryQuickProviderReorderForInliningEnabled
[] = "1";
945 // 0 means don't allow reordering results ( == current behavior as of 6/2012).
946 const char kOmniboxHistoryQuickProviderReorderForInliningDisabled
[] = "0";
948 // Controls whether the omnibox's HistoryQuickProvider is allowed to
949 // inline suggestions.
950 const char kOmniboxInlineHistoryQuickProvider
[] =
951 "omnibox-inline-history-quick-provider-allowed";
952 // The values the kOmniboxInlineHistoryQuickProvider switch may have, as in
953 // "--omnibox-inline-history-quick-provider-allowed=1"
954 // allowed: if HistoryQuickProvider thinks it appropriate, it can inline
955 // ( == current behavior as of 2/2012).
956 const char kOmniboxInlineHistoryQuickProviderAllowed
[] = "1";
957 // prohibited: never inline matches
958 const char kOmniboxInlineHistoryQuickProviderProhibited
[] = "0";
959 // auto: any other value => the code and field trial does what it wants.
961 // When the option to block third-party cookies is enabled, only block
962 // third-party cookies from being set.
963 const char kOnlyBlockSettingThirdPartyCookies
[] =
964 "only-block-setting-third-party-cookies";
966 // Launches URL in new browser window.
967 const char kOpenInNewWindow
[] = "new-window";
969 // Simulates an organic Chrome install.
970 const char kOrganicInstall
[] = "organic";
972 // Packages an extension to a .crx installable file from a given directory.
973 const char kPackExtension
[] = "pack-extension";
975 // Optional PEM private key to use in signing packaged .crx.
976 const char kPackExtensionKey
[] = "pack-extension-key";
978 // Specifies the path to the user data folder for the parent profile.
979 const char kParentProfile
[] = "parent-profile";
981 // Launches PerformanceMonitor at startup, which will gather statistics about
982 // Chrome's CPU and memory usage, page load times, startup times, and network
983 // usage, and will also store information about events which may be of interest,
984 // such as extension-related occurrences and crashes. Optionally, this may be
985 // run with an integer value representing the interval between the timed
986 // metric gatherings, measured in seconds (if invalid or not provided, the
987 // default interval is used).
988 const char kPerformanceMonitorGathering
[] = "performance-monitor-gathering";
990 // Enable the post crash analyzer which uploads detailed crash information in
991 // situations where a crash is determined to be particularly interesting.
992 const char kPerformCrashAnalysis
[] = "perform-crash-analysis";
994 // Read previously recorded data from the cache. Only cached data is read.
996 const char kPlaybackMode
[] = "playback-mode";
998 // Overrides the path to the location that PNaCl is installed.
999 const char kPnaclDir
[] = "pnacl-dir";
1001 // Forces the PPAPI version of Flash (if it's being used) to run in the
1002 // renderer process rather than in a separate plugin process.
1003 const char kPpapiFlashInProcess
[] = "ppapi-flash-in-process";
1005 // Use the PPAPI (Pepper) Flash found at the given path.
1006 const char kPpapiFlashPath
[] = "ppapi-flash-path";
1008 // Report the given version for the PPAPI (Pepper) Flash. The version should be
1009 // numbers separated by '.'s (e.g., "12.3.456.78"). If not specified, it
1010 // defaults to "10.2.999.999".
1011 const char kPpapiFlashVersion
[] = "ppapi-flash-version";
1013 // Triggers prerendering of pages from suggestions in the omnibox. Only has an
1014 // effect when Instant is either disabled or restricted to search, and when
1015 // prerender is enabled.
1016 const char kPrerenderFromOmnibox
[] = "prerender-from-omnibox";
1017 // These are the values the kPrerenderFromOmnibox switch may have, as in
1018 // "--prerender-from-omnibox=auto". auto: Allow field trial selection.
1019 const char kPrerenderFromOmniboxSwitchValueAuto
[] = "auto";
1020 // disabled: No prerendering.
1021 const char kPrerenderFromOmniboxSwitchValueDisabled
[] = "disabled";
1022 // enabled: Guaranteed prerendering.
1023 const char kPrerenderFromOmniboxSwitchValueEnabled
[] = "enabled";
1024 // Controls speculative prerendering of pages, and content prefetching. Both
1025 // are dispatched from <link rel=prefetch href=...> elements.
1026 const char kPrerenderMode
[] = "prerender";
1027 // These are the values the kPrerenderMode switch may have, as in
1028 // "--prerender=auto".
1029 // auto: Allow field trial selection in both prerender and prefetch.
1030 const char kPrerenderModeSwitchValueAuto
[] = "auto";
1031 // disabled: No prerendering or prefetching.
1032 const char kPrerenderModeSwitchValueDisabled
[] = "disabled";
1033 // enabled: Both prerendering and prefetching.
1034 const char kPrerenderModeSwitchValueEnabled
[] = "enabled";
1035 // prefetch_only: No prerendering, but enables prefetching.
1036 const char kPrerenderModeSwitchValuePrefetchOnly
[] = "prefetch_only";
1038 // Enable conversion from vector to raster for any page.
1039 const char kPrintRaster
[] = "print-raster";
1041 // Outputs the product version information and quit. Used as an internal api to
1042 // detect the installed version of Chrome on Linux.
1043 const char kProductVersion
[] = "product-version";
1045 // Selects directory of profile to associate with the first browser launched.
1046 const char kProfileDirectory
[] = "profile-directory";
1048 // Starts the sampling based profiler for the browser process at startup. This
1049 // will only work if chrome has been built with the gyp variable profiling=1.
1050 // The output will go to the value of kProfilingFile.
1051 const char kProfilingAtStart
[] = "profiling-at-start";
1053 // Specifies a location for profiling output. This will only work if chrome has
1054 // been built with the gyp variable profiling=1.
1056 // {pid} if present will be replaced by the pid of the process.
1057 // {count} if present will be incremented each time a profile is generated
1058 // for this process.
1059 // The default is chrome-profile-{pid}.
1060 const char kProfilingFile
[] = "profiling-file";
1062 // Specifies a path for the output of task-level profiling which can be loaded
1063 // and viewed in about:profiler.
1064 const char kProfilingOutputFile
[] = "profiling-output-file";
1066 // Controls whether profile data is periodically flushed to a file. Normally
1067 // the data gets written on exit but cases exist where chrome doesn't exit
1068 // cleanly (especially when using single-process). A time in seconds can be
1070 const char kProfilingFlush
[] = "profiling-flush";
1072 // Specifies a custom URL for fetching NTP promo data.
1073 const char kPromoServerURL
[] = "promo-server-url";
1075 // Should we prompt the user before allowing external extensions to install?
1077 const char kPromptForExternalExtensions
[] = "prompt-for-external-extensions";
1079 // Enables the Protector feature.
1080 const char kProtector
[] = "protector";
1082 // Forces proxy auto-detection.
1083 const char kProxyAutoDetect
[] = "proxy-auto-detect";
1085 // Specifies a list of hosts for whom we bypass proxy settings and use direct
1086 // connections. Ignored if --proxy-auto-detect or --no-proxy-server are also
1087 // specified. This is a comma-separated list of bypass rules. See:
1088 // "net/proxy/proxy_bypass_rules.h" for the format of these rules.
1089 const char kProxyBypassList
[] = "proxy-bypass-list";
1091 // Uses the pac script at the given URL
1092 const char kProxyPacUrl
[] = "proxy-pac-url";
1094 // Uses a specified proxy server, overrides system settings. This switch only
1095 // affects HTTP and HTTPS requests.
1096 const char kProxyServer
[] = "proxy-server";
1098 // Adds a "Purge memory" button to the Task Manager, which tries to dump as
1099 // much memory as possible. This is mostly useful for testing how well the
1100 // MemoryPurger functionality works.
1102 // NOTE: This is only implemented for Views.
1103 const char kPurgeMemoryButton
[] = "purge-memory-button";
1105 // Capture resource consumption information through page cycling and output the
1106 // data to the specified file.
1107 const char kRecordStats
[] = "record-stats";
1109 // Chrome supports a playback and record mode. Record mode saves *everything*
1110 // to the cache. Playback mode reads data exclusively from the cache. This
1111 // allows us to record a session into the cache and then replay it at will.
1112 // See also kPlaybackMode.
1113 const char kRecordMode
[] = "record-mode";
1115 // Uses custom front-end URL for the remote debugging.
1116 const char kRemoteDebuggingFrontend
[] = "remote-debugging-frontend";
1118 // Enables print preview in the renderer. This flag is generated internally by
1119 // Chrome and does nothing when directly passed to the browser.
1120 const char kRendererPrintPreview
[] = "renderer-print-preview";
1122 // Forces a reset of the one-time-randomized FieldTrials on this client, also
1123 // known as the Chrome Variations state.
1124 const char kResetVariationState
[] = "reset-variation-state";
1126 // Indicates the last session should be restored on startup. This overrides the
1127 // preferences value and is primarily intended for testing. The value of this
1128 // switch is the number of tabs to wait until loaded before 'load completed' is
1129 // sent to the ui_test.
1130 const char kRestoreLastSession
[] = "restore-last-session";
1132 // Disable saving pages as HTML-only, disable saving pages as HTML Complete
1133 // (with a directory of sub-resources). Enable only saving pages as MHTML.
1134 // See http://crbug.com/120416 for how to remove this switch.
1135 const char kSavePageAsMHTML
[] = "save-page-as-mhtml";
1137 // URL prefix used by safebrowsing to fetch hash, download data and report
1139 const char kSbURLPrefix
[] = "safebrowsing-url-prefix";
1141 // If present, safebrowsing only performs update when
1142 // SafeBrowsingProtocolManager::ForceScheduleNextUpdate() is explicitly called.
1143 // This is used for testing only.
1144 const char kSbDisableAutoUpdate
[] = "safebrowsing-disable-auto-update";
1146 // TODO(lzheng): Remove this flag once the feature works fine
1147 // (http://crbug.com/74848).
1149 // Disables safebrowsing feature that checks download url and downloads
1150 // content's hash to make sure the content are not malicious.
1151 const char kSbDisableDownloadProtection
[] =
1152 "safebrowsing-disable-download-protection";
1154 // Enables or disables extension scripts badges in the location bar.
1155 const char kScriptBadges
[] = "script-badges";
1157 // Enable or diable the "script bubble" icon in the URL bar that tells you how
1158 // many extensions are running scripts on a page.
1159 const char kScriptBubble
[] = "script-bubble";
1161 // Enables the showing of an info-bar instructing user they can search directly
1162 // from the omnibox.
1163 const char kSearchInOmniboxHint
[] = "search-in-omnibox-hint";
1165 // Sets a token in the token service, for testing.
1166 const char kSetToken
[] = "set-token";
1168 // If true the app list will be shown.
1169 const char kShowAppList
[] = "show-app-list";
1171 // If true an app list shortcut will be shown in the taskbar.
1172 const char kShowAppListShortcut
[] = "show-app-list-shortcut";
1174 // Annotates forms with Autofill field type predictions.
1175 const char kShowAutofillTypePredictions
[] = "show-autofill-type-predictions";
1177 // Makes component extensions appear in chrome://settings/extensions.
1178 const char kShowComponentExtensionOptions
[] =
1179 "show-component-extension-options";
1182 const char kShowIcons
[] = "show-icons";
1184 // If true the alignment of the launcher can be changed.
1185 const char kShowLauncherAlignmentMenu
[] = "show-launcher-alignment-menu";
1187 // Enables or disables sideload wipeout extension effort.
1188 const char kSideloadWipeout
[] = "sideload-wipeout";
1190 // Changes the DCHECKS to dump memory and continue instead of displaying error
1191 // dialog. This is valid only in Release mode when --enable-dcheck is
1193 const char kSilentDumpOnDCHECK
[] = "silent-dump-on-dcheck";
1195 // Causes Chrome to launch without opening any windows by default. Useful if
1196 // one wishes to use Chrome as an ash server.
1197 const char kSilentLaunch
[] = "silent-launch";
1199 // Simulates an update being available.
1200 const char kSimulateUpgrade
[] = "simulate-upgrade";
1202 // Replaces the buffered data source for <audio> and <video> with a simplified
1203 // resource loader that downloads the entire resource into memory.
1205 // Socket reuse policy. The value should be of type enum
1206 // ClientSocketReusePolicy.
1207 const char kSocketReusePolicy
[] = "socket-reuse-policy";
1209 // Origin for which SpdyProxy authentication is supported.
1210 const char kSpdyProxyOrigin
[] = "spdy-proxy-origin";
1212 // Speculative resource prefetching.
1213 const char kSpeculativeResourcePrefetching
[] =
1214 "speculative-resource-prefetching";
1216 // Speculative resource prefetching is disabled.
1217 const char kSpeculativeResourcePrefetchingDisabled
[] = "disabled";
1219 // Speculative resource prefetching will only learn about resources that need to
1220 // be prefetched but will not prefetch them.
1221 const char kSpeculativeResourcePrefetchingLearning
[] = "learning";
1223 // Speculative resource prefetching is enabled.
1224 const char kSpeculativeResourcePrefetchingEnabled
[] = "enabled";
1226 // Specifies the maximum SSL/TLS version ("ssl3", "tls1", "tls1.1", or
1228 const char kSSLVersionMax
[] = "ssl-version-max";
1230 // Specifies the minimum SSL/TLS version ("ssl3", "tls1", "tls1.1", or
1232 const char kSSLVersionMin
[] = "ssl-version-min";
1234 // Starts the browser maximized, regardless of any previous settings.
1235 const char kStartMaximized
[] = "start-maximized";
1237 // Controls the width of time-of-day filters on the 'suggested' ntp page, in
1239 const char kSuggestionNtpFilterWidth
[] = "suggestion-ntp-filter-width";
1241 // Enables a normal distribution dropoff to the relevancy of visits with respect
1242 // to the time of day.
1243 const char kSuggestionNtpGaussianFilter
[] = "suggestion-ntp-gaussian-filter";
1245 // Enables a linear dropoff to the relevancy of visits with respect to the time
1247 const char kSuggestionNtpLinearFilter
[] = "suggestion-ntp-linear-filter";
1249 // Allows insecure XMPP connections for sync (for testing).
1250 const char kSyncAllowInsecureXmppConnection
[] =
1251 "sync-allow-insecure-xmpp-connection";
1253 // Invalidates any login info passed into sync's XMPP connection.
1254 const char kSyncInvalidateXmppLogin
[] = "sync-invalidate-xmpp-login";
1256 // Enable support for keystore key based encryption.
1257 const char kSyncKeystoreEncryption
[] = "sync-keystore-encryption";
1259 // This flag causes sync to retry very quickly (see polling_constants.h) the
1260 // when it encounters an error, as the first step towards exponential backoff.
1261 const char kSyncShortInitialRetryOverride
[] =
1262 "sync-short-initial-retry-override";
1264 // Overrides the default notification method for sync.
1265 const char kSyncNotificationMethod
[] = "sync-notification-method";
1267 // Overrides the default host:port used for sync notifications.
1268 const char kSyncNotificationHostPort
[] = "sync-notification-host-port";
1270 // Overrides the default server used for profile sync.
1271 const char kSyncServiceURL
[] = "sync-url";
1273 // Enables syncing of favicons as part of tab sync.
1274 const char kSyncTabFavicons
[] = "sync-tab-favicons";
1276 // Makes the sync code to throw an unrecoverable error after initialization.
1277 // Useful for testing unrecoverable error scenarios.
1278 const char kSyncThrowUnrecoverableError
[] = "sync-throw-unrecoverable-error";
1281 // Tries to connect to XMPP using SSLTCP first (for testing).
1282 const char kSyncTrySsltcpFirstForXmpp
[] = "sync-try-ssltcp-first-for-xmpp";
1284 // Enables tab dragging to create a real browser.
1285 const char kTabBrowserDragging
[] = "enable-tab-browser-dragging";
1287 // Enables tab capture.
1288 const char kTabCapture
[] = "enable-tab-capture";
1290 // Passes the name of the current running automated test to Chrome.
1291 const char kTestName
[] = "test-name";
1293 // Runs the security test for the NaCl loader sandbox.
1294 const char kTestNaClSandbox
[] = "test-nacl-sandbox";
1296 // Type of the current test harness ("browser" or "ui").
1297 const char kTestType
[] = "test-type";
1299 // Tells the app to listen for and broadcast testing-related messages on IPC
1300 // channel with the given ID.
1301 const char kTestingChannelID
[] = "testing-channel";
1303 // Disables same-origin check on HTTP resources pushed via a SPDY proxy.
1304 // The value is the host:port of the trusted proxy.
1305 const char kTrustedSpdyProxy
[] = "trusted-spdy-proxy";
1307 // Experimental. Shows a dialog asking the user to try chrome. This flag is to
1308 // be used only by the upgrade process.
1309 const char kTryChromeAgain
[] = "try-chrome-again";
1311 // Runs un-installation steps that were done by chrome first-run.
1312 const char kUninstall
[] = "uninstall";
1314 // Use hardware gpu, if available, for tests.
1315 const char kUseGpuInTests
[] = "use-gpu-in-tests";
1317 // Uses Spdy for the transport protocol instead of HTTP. This is a temporary
1319 const char kUseSpdy
[] = "use-spdy";
1321 // Enables use of the spelling web service. This will only work if asynchronous
1322 // spell checking is not disabled.
1323 const char kUseSpellingService
[] = "use-spelling-service";
1325 // Sets the maximum SPDY sessions per domain.
1326 const char kMaxSpdySessionsPerDomain
[] = "max-spdy-sessions-per-domain";
1328 // Sets the maximum concurrent streams over a SPDY session.
1329 const char kMaxSpdyConcurrentStreams
[] = "max-spdy-concurrent-streams";
1331 // Specifies the user data directory, which is where the browser will look for
1332 // all of its state.
1333 const char kUserDataDir
[] = "user-data-dir";
1335 // Uses the GAIA web-based signin flow instead of the native UI signin flow.
1336 const char kUseWebBasedSigninFlow
[] = "use-web-based-signin-flow";
1338 // Specifies a custom URL for the server which reports variation data to the
1339 // client. See variations_service.cc.
1340 const char kVariationsServerURL
[] = "variations-server-url";
1342 // Prints version information and quits.
1343 const char kVersion
[] = "version";
1345 // Requests that Chrome connect to a remote viewer process using an IPC
1346 // channel of the given name.
1347 const char kViewerConnection
[] = "viewer-connection";
1349 // Cycle through a series of URLs listed in the specified file.
1350 const char kVisitURLs
[] = "visit-urls";
1352 // Enable the "native services" feature of web-intents.
1353 const char kWebIntentsNativeServicesEnabled
[] =
1354 "web-intents-native-services-enabled";
1356 // Enable invocation of web intents from web content.
1357 const char kWebIntentsInvocationEnabled
[] =
1358 "enable-web-intents-invocation";
1360 // Adds the given extension ID to all the permission whitelists.
1361 const char kWhitelistedExtensionID
[] = "whitelisted-extension-id";
1363 // Specify the initial window position: --window-position=x,y
1364 const char kWindowPosition
[] = "window-position";
1366 // Specify the initial window size: --window-size=w,h
1367 const char kWindowSize
[] = "window-size";
1369 // Uses WinHTTP to fetch and evaluate PAC scripts. Otherwise the default is to
1370 // use Chromium's network stack to fetch, and V8 to evaluate.
1371 const char kWinHttpProxyResolver
[] = "winhttp-proxy-resolver";
1373 #if defined(ENABLE_PLUGIN_INSTALLATION)
1374 // Specifies a custom URL for fetching plug-ins metadata. Used for testing.
1375 const char kPluginsMetadataServerURL
[] = "plugins-metadata-server-url";
1378 #if defined(OS_ANDROID)
1379 // Use the tablet specific UI components when available.
1380 const char kTabletUI
[] = "tablet-ui";
1383 #if defined(USE_ASH)
1384 const char kAshEnableTabScrubbing
[] = "ash-enable-tab-scrubbing";
1387 #if defined(OS_CHROMEOS)
1388 // When wallpaper boot animation is not disabled this switch
1389 // is used to override OOBE/sign in WebUI init type.
1390 // Possible values: parallel|postpone. Default: parallel.
1391 const char kAshWebUIInit
[] = "ash-webui-init";
1393 // Enables switching between different cellular carriers from the UI.
1394 const char kEnableCarrierSwitching
[] = "enable-carrier-switching";
1396 // Disables wallpaper boot animation (except of OOBE case).
1397 const char kDisableBootAnimation
[] = "disable-boot-animation";
1399 // Disables Chrome Captive Portal detector, which initiates Captive
1400 // Portal detection for new active networks.
1401 const char kDisableChromeCaptivePortalDetector
[] =
1402 "disable-chrome-captive-portal-detector";
1404 // Disables Google Drive integration.
1405 const char kDisableDrive
[] = "disable-drive";
1407 // Disables file prefetching in Google Drive Client for Chrome OS.
1408 const char kDisableDrivePrefetch
[] = "disable-drive-prefetch";
1410 // Disables reset the device to its factory state in design.
1411 const char kDisableFactoryReset
[] = "disable-factory-reset";
1413 // Avoid doing expensive animations upon login.
1414 const char kDisableLoginAnimations
[] = "disable-login-animations";
1416 // Disables new OOBE/sign in design.
1417 const char kDisableNewOobe
[] = "disable-new-oobe";
1419 // Avoid doing animations upon oobe.
1420 const char kDisableOobeAnimation
[] = "disable-oobe-animation";
1422 // Enables component extension that initializes background pages of
1423 // certain hosted applications.
1424 const char kEnableBackgroundLoader
[] = "enable-background-loader";
1426 // Enables Chrome Captive Portal detector, which initiates Captive
1427 // Portal detection for new active networks.
1428 const char kEnableChromeCaptivePortalDetector
[] =
1429 "enable-chrome-captive-portal-detector";
1431 // Enables touchpad three-finger-click as middle button.
1432 const char kEnableTouchpadThreeFingerClick
[]
1433 = "enable-touchpad-three-finger-click";
1435 // Enables touchpad three-finger swipe.
1436 const char kEnableTouchpadThreeFingerSwipe
[]
1437 = "enable-touchpad-three-finger-swipe";
1439 // Skips OAuth part of ChromeOS login process.
1440 const char kSkipOAuthLogin
[] = "skip-oauth-login";
1442 // Enables the redirection of viewable document requests to the Google Document
1444 const char kEnableGView
[] = "enable-gview";
1446 // Enable Kiosk mode for ChromeOS
1447 const char kEnableKioskMode
[] = "enable-kiosk-mode";
1449 // Enables request of tablet site (via user agent override).
1450 const char kEnableRequestTabletSite
[] = "enable-request-tablet-site";
1452 // Enables static ip configuration. This flag should be removed when it's on by
1454 const char kEnableStaticIPConfig
[] = "enable-static-ip-config";
1456 // Passed to Chrome on first boot. Not passed on restart after sign out.
1457 const char kFirstBoot
[] = "first-boot";
1459 // If true, the Chromebook has a Chrome OS keyboard. Don't use the flag for
1461 const char kHasChromeOSKeyboard
[] = "has-chromeos-keyboard";
1463 // Path for the screensaver used in Kiosk mode
1464 const char kKioskModeScreensaverPath
[] = "kiosk-mode-screensaver-path";
1466 // Enables Chrome-as-a-login-manager behavior.
1467 const char kLoginManager
[] = "login-manager";
1469 // Allows to override the first login screen. The value should be the name of
1470 // the first login screen to show (see
1471 // chrome/browser/chromeos/login/login_wizard_view.cc for actual names).
1472 // Ignored if kLoginManager is not specified. TODO(avayvod): Remove when the
1473 // switch is no longer needed for testing.
1474 const char kLoginScreen
[] = "login-screen";
1476 // Controls the initial login screen size. Pass width,height.
1477 const char kLoginScreenSize
[] = "login-screen-size";
1479 // Specifies the profile to use once a chromeos user is logged in.
1480 const char kLoginProfile
[] = "login-profile";
1482 // Specifies the user which is already logged in.
1483 const char kLoginUser
[] = "login-user";
1485 // Specifies a password to be used to login (along with login-user).
1486 const char kLoginPassword
[] = "login-password";
1488 // Enables natural scroll by default.
1489 const char kNaturalScrollDefault
[] = "enable-natural-scroll-default";
1491 // Disables tab discard in low memory conditions, a feature which silently
1492 // closes inactive tabs to free memory and to attempt to avoid the kernel's
1493 // out-of-memory process killer.
1494 const char kNoDiscardTabs
[] = "no-discard-tabs";
1496 // Indicates that the browser is in "browse without sign-in" (Guest session)
1497 // mode. Should completely disable extensions, sync and bookmarks.
1498 const char kGuestSession
[] = "bwsi";
1500 // Enables overriding the path for the default echo component extension.
1501 // Useful for testing.
1502 const char kEchoExtensionPath
[] = "echo-ext-path";
1504 // Indicates that a stub implementation of CrosSettings that stores settings in
1505 // memory without signing should be used, treating current user as the owner.
1506 // This option is for testing the chromeos build of chrome on the desktop only.
1507 const char kStubCrosSettings
[] = "stub-cros-settings";
1509 // Enables overriding the path for the default authentication extension.
1510 const char kAuthExtensionPath
[] = "auth-ext-path";
1512 // Power of the power-of-2 initial modulus that will be used by the
1513 // auto-enrollment client. E.g. "4" means the modulus will be 2^4 = 16.
1514 const char kEnterpriseEnrollmentInitialModulus
[] =
1515 "enterprise-enrollment-initial-modulus";
1517 // Power of the power-of-2 maximum modulus that will be used by the
1518 // auto-enrollment client.
1519 const char kEnterpriseEnrollmentModulusLimit
[] =
1520 "enterprise-enrollment-modulus-limit";
1522 // Loads the File Manager as a packaged app.
1523 const char kFileManagerPackaged
[] = "file-manager-packaged";
1526 // Skips all other OOBE pages after user login.
1527 const char kOobeSkipPostLogin
[] = "oobe-skip-postlogin";
1529 #endif // OS_CHROMEOS
1531 #if defined(OS_POSIX)
1532 // A flag, generated internally by Chrome for renderer and other helper process
1533 // command lines on Linux and Mac. It tells the helper process to enable crash
1534 // dumping and reporting, because helpers cannot access the profile or other
1535 // files needed to make this decision.
1536 const char kEnableCrashReporter
[] = "enable-crash-reporter";
1538 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS)
1539 // Specifies which password store to use (detect, default, gnome, kwallet).
1540 const char kPasswordStore
[] = "password-store";
1544 #if defined(OS_MACOSX)
1545 // Enables the tabs expose feature ( http://crbug.com/50307 ).
1546 const char kEnableExposeForTabs
[] = "enable-expose-for-tabs";
1548 // Performs Keychain reauthorization from the command line on behalf of a
1549 // special Keychain reauthorization stub executable. Used during auto-update.
1550 const char kKeychainReauthorize
[] = "keychain-reauthorize";
1552 // A process type (switches::kProcessType) that relaunches the browser. See
1553 // chrome/browser/mac/relauncher.h.
1554 const char kRelauncherProcess
[] = "relauncher";
1556 // Uses mock keychain for testing purposes, which prevents blocking dialogs
1557 // from causing timeouts.
1558 const char kUseMockKeychain
[] = "use-mock-keychain";
1562 // Disables profile desktop shortcuts handling, preventing their creation,
1563 // modification or removal.
1564 const char kDisableDesktopShortcuts
[] = "disable-desktop-shortcuts";
1566 // Enables sync credential caching on Windows 8.
1567 // See chrome/browser/sync/credential_cache_service_win.h.
1568 const char kEnableSyncCredentialCaching
[] = "enable-sync-credential-caching";
1570 // For the DelegateExecute verb handler to launch Chrome in metro mode on
1571 // Windows 8 and higher. Used when relaunching metro Chrome.
1572 const char kForceImmersive
[] = "force-immersive";
1574 // For the DelegateExecute verb handler to launch Chrome in desktop mode on
1575 // Windows 8 and higher. Used when relaunching metro Chrome.
1576 const char kForceDesktop
[] = "force-desktop";
1578 // Allows for disabling the overlapped I/O for TCP reads.
1579 // Possible values are "on" or "off".
1580 // The default is "on" which matches the existing behavior.
1581 // "off" switches to use non-blocking reads and WSAEventSelect.
1582 const char kOverlappedRead
[] = "overlapped-reads";
1584 // Relaunches metro Chrome on Windows 8 and higher using a given shortcut.
1585 const char kRelaunchShortcut
[] = "relaunch-shortcut";
1587 // Waits for the given handle to be signaled before relaunching metro Chrome on
1588 // Windows 8 and higher.
1589 const char kWaitForMutex
[] = "wait-for-mutex";
1593 // Enables overriding the path of file manager extension.
1594 const char kFileManagerExtensionPath
[] = "filemgr-ext-path";
1596 // Dumps dependency information about our profile services into a dot file in
1597 // the profile directory.
1598 const char kDumpProfileDependencyGraph
[] = "dump-profile-graph";
1601 // Controls print preview in the browser process.
1602 #if defined(GOOGLE_CHROME_BUILD)
1603 // Disables print preview (For testing, and for users who don't like us. :[ )
1604 const char kDisablePrintPreview
[] = "disable-print-preview";
1606 // Enables print preview (Force enable on Chromium, which normally does not
1607 // have the PDF viewer required for print preview.)
1608 const char kEnablePrintPreview
[] = "enable-print-preview";
1611 // -----------------------------------------------------------------------------
1612 // DO NOT ADD YOUR CRAP TO THE BOTTOM OF THIS FILE.
1614 // You were going to just dump your switches here, weren't you? Instead, please
1615 // put them in alphabetical order above, or in order inside the appropriate
1616 // ifdef at the bottom. The order should match the header.
1617 // -----------------------------------------------------------------------------
1619 } // namespace switches
1623 bool UseChromeStyleDialogs() {
1624 #if defined(OS_MACOSX)
1626 #elif defined(OS_WIN)
1627 return CommandLine::ForCurrentProcess()->HasSwitch(
1628 switches::kEnableChromeStyleDialogs
);
1630 return CommandLine::ForCurrentProcess()->HasSwitch(
1631 switches::kEnableChromeStyleDialogs
);
1635 } // namespace chrome