chrome_switches.cc revision 72a454cd3513ac24fbdd0e0cb9ad70b86a99b801
1// Copyright (c) 2011 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
10namespace switches {
11
12// -----------------------------------------------------------------------------
13// Can't find the switch you are looking for? try looking in
14// base/base_switches.cc instead.
15// -----------------------------------------------------------------------------
16
17// Activate (make foreground) myself on launch.  Helpful when Chrome
18// is launched on the command line (e.g. by Selenium).  Only needed on Mac.
19const char kActivateOnLaunch[]              = "activate-on-launch";
20
21// By default, file:// URIs cannot read other file:// URIs. This is an
22// override for developers who need the old behavior for testing.
23const char kAllowFileAccessFromFiles[]      = "allow-file-access-from-files";
24
25// On ChromeOS, file:// access is disabled except for certain whitelisted
26// directories. This switch re-enables file:// for testing.
27const char kAllowFileAccess[]               = "allow-file-access";
28
29// Don't block outdated plugins.
30const char kAllowOutdatedPlugins[]          = "allow-outdated-plugins";
31
32// Disable checking of the renegotiation extension and any future checks over
33// and above what a "traditional" SSL stack might do. This has been requested
34// in order to support some web development tools that intercept SSL
35// connections.
36const char kAllowSSLMITMProxies[]           = "allow-ssl-mitm-proxies";
37
38// Allows debugging of sandboxed processes (see zygote_main_linux.cc).
39const char kAllowSandboxDebugging[]         = "allow-sandbox-debugging";
40
41// Allows injecting extensions and user scripts on the extensions
42// gallery site. Normally prevented for security reasons, but can be
43// useful for automation testing of the gallery.
44const char kAllowScriptingGallery[]         = "allow-scripting-gallery";
45
46// This prevents Chrome from requiring authorization to run certain widely
47// installed but less commonly used plug-ins.
48const char kAlwaysAuthorizePlugins[]        = "always-authorize-plugins";
49
50// Enable web inspector for all windows, even if they're part of the browser.
51// Allows us to use our dev tools to debug browser windows itself.
52const char kAlwaysEnableDevTools[]          = "always-enable-dev-tools";
53
54// Specifies that the associated value should be launched in "application" mode.
55const char kApp[]                           = "app";
56
57// Specifies that the extension-app with the specified id should be launched
58// according to its configuration.
59const char kAppId[]                         = "app-id";
60
61// Specifying this flag allows the webstorePrivate APIs to return browser (aka
62// sync) login tokens to be used for auto-login in the Web Store (normally they
63// do not).
64const char kAppsGalleryReturnTokens[]       = "apps-gallery-return-tokens";
65
66// The URL to use for the gallery link in the app launcher.
67const char kAppsGalleryURL[]                = "apps-gallery-url";
68
69// The update url used by gallery/webstore extensions.
70const char kAppsGalleryUpdateURL[]          = "apps-gallery-update-url";
71
72// Disable throbber for extension apps.
73const char kAppsNoThrob[]                   = "apps-no-throb";
74
75// Whitelist of servers that Negotiate will generate delegated Kerberos tickets
76// for.
77const char kAuthNegotiateDelegateWhitelist[] =
78    "auth-negotiate-delegate-whitelist";
79
80// HTTP authentication schemes to enable. This is a comma separated list
81// of authentication schemes (basic, digest, ntlm, and negotiate). By default
82// all schemes are enabled. The primary use of this command line flag is to help
83// triage autentication-related issues reported by end-users.
84const char kAuthSchemes[]                   = "auth-schemes";
85
86// Whitelist of servers which NTLM and Negotiate can automatically authenticate
87// with using the default credentials of the currently logged in user.
88const char kAuthServerWhitelist[] = "auth-server-whitelist";
89
90// The value of this switch tells the app to listen for and broadcast
91// automation-related messages on IPC channel with the given ID.
92const char kAutomationClientChannelID[]     = "automation-channel";
93
94// When the option to block third-party cookies from being set is enabled,
95// also block third-party cookies from being read.
96const char kBlockReadingThirdPartyCookies[] =
97    "block-reading-third-party-cookies";
98
99// Causes the browser process to throw an assertion on startup.
100const char kBrowserAssertTest[]             = "assert-test";
101
102// Causes the browser process to crash on startup.
103const char kBrowserCrashTest[]              = "crash-test";
104
105// Path to the exe to run for the renderer and plugin subprocesses.
106const char kBrowserSubprocessPath[]         = "browser-subprocess-path";
107
108// How often (in seconds) to check for updates. Should only be used for
109// testing purposes.
110const char kCheckForUpdateIntervalSec[]     = "check-for-update-interval";
111
112// Run Chrome in Chrome Frame mode. This means that Chrome expects to be run
113// as a dependent process of the Chrome Frame plugin.
114const char kChromeFrame[]                   = "chrome-frame";
115
116// Tells chrome to load the specified version of chrome.dll on Windows. If
117// this version cannot be loaded, Chrome will exit.
118const char kChromeVersion[]                 = "chrome-version";
119
120// The unique id to be used for this cloud print proxy instance.
121const char kCloudPrintProxyId[]             = "cloud-print-proxy-id";
122
123// Tells chrome to display the cloud print dialog and upload the
124// specified file for printing.
125const char kCloudPrintFile[]                = "cloud-print-file";
126
127// Used with kCloudPrintFile to specify a title for the resulting print
128// job.
129const char kCloudPrintJobTitle[]            = "cloud-print-job-title";
130
131// The URL of the cloud print service to use, overrides any value
132// stored in preferences, and the default.  Only used if the cloud
133// print service has been enabled (see enable-cloud-print).
134const char kCloudPrintServiceURL[]          = "cloud-print-service";
135
136// Causes the browser process to inspect loaded and registered DLLs for
137// known conflicts and warn the user.
138const char kConflictingModulesCheck[]       = "conflicting-modules-check";
139
140// The Country we should use.  This is normally obtained from the operating
141// system during first run and cached in the preferences afterwards.  This is a
142// string value, the 2 letter code from ISO 3166-1.
143const char kCountry[]                       = "country";
144
145// Enables support to debug printing subsystem.
146const char kDebugPrint[]                    = "debug-print";
147
148// Specifies the URL at which to fetch configuration policy from the device
149// management backend. Specifying this switch turns on managed policy from the
150// device management backend.
151const char kDeviceManagementUrl[]           = "device-management-url";
152
153// Triggers a pletora of diagnostic modes.
154const char kDiagnostics[]                   = "diagnostics";
155
156// Disables client-visible 3D APIs, in particular WebGL and Pepper 3D.
157// This is controlled by policy and is kept separate from the other
158// enable/disable switches to avoid accidentally regressing the policy
159// support for controlling access to these APIs.
160const char kDisable3DAPIs[]                 = "disable-3d-apis";
161
162// Disables accelerated compositing.
163const char kDisableAcceleratedCompositing[] =
164    "disable-accelerated-compositing";
165
166// Disables GPU accelerated video display.
167const char kDisableAcceleratedVideo[]       = "disable-accelerated-video";
168
169// Disables the alternate window station for the renderer.
170const char kDisableAltWinstation[]          = "disable-winsta";
171
172// Disable the ApplicationCache.
173const char kDisableApplicationCache[]       = "disable-application-cache";
174
175// Replaces the audio IPC layer for <audio> and <video> with a mock audio
176// device, useful when using remote desktop or machines without sound cards.
177// This is temporary until we fix the underlying problem.
178//
179// TODO(scherkus): remove --disable-audio when we have a proper fallback
180// mechanism.
181const char kDisableAudio[]                  = "disable-audio";
182
183// Disable CNAME lookup of the host when generating the Kerberos SPN for a
184// Negotiate challenge. See HttpAuthHandlerNegotiate::CreateSPN
185// for more background.
186const char kDisableAuthNegotiateCnameLookup[] =
187    "disable-auth-negotiate-cname-lookup";
188
189// Disable background mode (background apps will not keep chrome running in the
190// background).
191const char kDisableBackgroundMode[] = "disable-background-mode";
192
193// Disable several subsystems which run network requests in the background.
194// This is for use when doing network performance testing to avoid noise
195// in the measurements.
196const char kDisableBackgroundNetworking[] = "disable-background-networking";
197
198// Disable limits on the number of backing stores. Can prevent blinking for
199// users with many windows/tabs and lots of memory.
200const char kDisableBackingStoreLimit[]      = "disable-backing-store-limit";
201
202// Disables blocked content warning animation. Currently shows animation for
203// blocked pop-ups only.
204const char kDisableBlockContentAnimation[]  =
205    "disable-blocked-content-animation";
206
207// Disables establishing a backup TCP connection if a specified timeout is
208// exceeded.
209const char kDisableConnectBackupJobs[]      = "disable-connect-backup-jobs";
210
211// Disables the custom JumpList on Windows 7.
212const char kDisableCustomJumpList[]         = "disable-custom-jumplist";
213
214// Disables HTML5 DB support.
215const char kDisableDatabases[]              = "disable-databases";
216
217// Disables desktop notifications (default enabled on windows).
218const char kDisableDesktopNotifications[]   = "disable-desktop-notifications";
219
220// Browser flag to disable the web inspector for all renderers.
221const char kDisableDevTools[]               = "disable-dev-tools";
222
223// Disables device orientation events.
224const char kDisableDeviceOrientation[]      = "disable-device-orientation";
225
226// By default, if the URL request throttler finds that a server is overloaded or
227// encounters an error, it rejects requests to the server for a period of time,
228// which is determined by an exponential back-off algorithm. This switch
229// disables such behavior.
230const char kDisableEnforcedThrottling[]     = "disable-enforced-throttling";
231
232// Disable experimental WebGL support.
233const char kDisableExperimentalWebGL[]      = "disable-webgl";
234
235// Disable extensions.
236const char kDisableExtensions[]             = "disable-extensions";
237
238// Disable checking for user opt-in for extensions that want to inject script
239// into file URLs (ie, always allow it). This is used during automated testing.
240const char kDisableExtensionsFileAccessCheck[] =
241    "disable-extensions-file-access-check";
242
243// Disable FileSystem API.
244const char kDisableFileSystem[]             = "disable-file-system";
245
246// Disables the sandbox for the built-in flash player.
247const char kDisableFlashSandbox[]           = "disable-flash-sandbox";
248
249// Suppresses support for the Geolocation javascript API.
250const char kDisableGeolocation[]            = "disable-geolocation";
251
252// Disable GL multisampling.
253const char kDisableGLMultisampling[]        = "disable-gl-multisampling";
254
255// Disable the GLSL translator.
256const char kDisableGLSLTranslator[]         = "disable-glsl-translator";
257
258// Disable the thread that crashes the GPU process if it stops responding to
259// messages.
260const char kDisableGpuWatchdog[]            = "disable-gpu-watchdog";
261
262// Suppresses hang monitor dialogs in renderer processes.  This may allow slow
263// unload handlers on a page to prevent the tab from closing, but the Task
264// Manager can be used to terminate the offending process in this case.
265const char kDisableHangMonitor[]            = "disable-hang-monitor";
266
267// Disable the use of the HistoryQuickProvider for autocomplete results.
268const char kDisableHistoryQuickProvider[]   = "disable-history-quick-provider";
269
270// Disable the use of the HistoryURLProvider for autocomplete results.
271const char kDisableHistoryURLProvider[]   = "disable-history-url-provider";
272
273// Disable the Indexed Database API.
274const char kDisableIndexedDatabase[]         = "disable-indexed-database";
275
276// Disables HTML5 Forms interactive validation.
277const char kDisableInteractiveFormValidation[] =
278    "disable-interactive-form-validation";
279
280// Disable the internal Flash Player.
281const char kDisableInternalFlash[]          = "disable-internal-flash";
282
283// Don't resolve hostnames to IPv6 addresses. This can be used when debugging
284// issues relating to IPv6, but shouldn't otherwise be needed. Be sure to
285// file bugs if something isn't working properly in the presence of IPv6.
286// This flag can be overidden by the "enable-ipv6" flag.
287const char kDisableIPv6[]                   = "disable-ipv6";
288
289// Disable speculative TCP/IP preconnection.
290const char kDisablePreconnect[]             = "disable-preconnect";
291
292// Don't execute JavaScript (browser JS like the new tab page still runs).
293const char kDisableJavaScript[]             = "disable-javascript";
294
295// Prevent Java from running.
296const char kDisableJava[]                   = "disable-java";
297
298// Disable LocalStorage.
299const char kDisableLocalStorage[]           = "disable-local-storage";
300
301// Force logging to be disabled.  Logging is enabled by default in debug
302// builds.
303const char kDisableLogging[]                = "disable-logging";
304
305// Whether we should prevent the new tab page from showing the first run
306// notification.
307const char kDisableNewTabFirstRun[]         = "disable-new-tab-first-run";
308
309// Prevent plugins from running.
310const char kDisablePlugins[]                = "disable-plugins";
311
312// Disable pop-up blocking.
313const char kDisablePopupBlocking[]          = "disable-popup-blocking";
314
315// Normally when the user attempts to navigate to a page that was the result of
316// a post we prompt to make sure they want to. This switch may be used to
317// disable that check. This switch is used during automated testing.
318const char kDisablePromptOnRepost[]         = "disable-prompt-on-repost";
319
320// Disable remote web font support. SVG font should always work whether
321// this option is specified or not.
322const char kDisableRemoteFonts[]            = "disable-remote-fonts";
323
324// Turns off the accessibility in the renderer.
325const char kDisableRendererAccessibility[]  = "disable-renderer-accessibility";
326
327// Prevents the URLs of BackgroundContents from being remembered and re-launched
328// when the browser restarts.
329const char kDisableRestoreBackgroundContents[] =
330    "disable-restore-background-contents";
331
332// Disable session storage.
333const char kDisableSessionStorage[]         = "disable-session-storage";
334
335// Enable shared workers. Functionality not yet complete.
336const char kDisableSharedWorkers[]          = "disable-shared-workers";
337
338// Disable site-specific tailoring to compatibility issues in WebKit.
339const char kDisableSiteSpecificQuirks[]     = "disable-site-specific-quirks";
340
341// Disables speech input.
342const char kDisableSpeechInput[]            = "disable-speech-input";
343
344// Disable False Start in SSL and TLS connections.
345const char kDisableSSLFalseStart[]          = "disable-ssl-false-start";
346
347// Disable syncing browser data to a Google Account.
348const char kDisableSync[]                   = "disable-sync";
349
350// Disable syncing of apps.
351const char kDisableSyncApps[]               = "disable-sync-apps";
352
353// Disable syncing of autofill.
354const char kDisableSyncAutofill[]           = "disable-sync-autofill";
355
356// Disable syncing of autofill Profile.
357const char kDisableSyncAutofillProfile[]     = "disable-sync-autofill-profile";
358
359// Disable syncing of bookmarks.
360const char kDisableSyncBookmarks[]          = "disable-sync-bookmarks";
361
362// Disable syncing of extensions.
363const char kDisableSyncExtensions[]         = "disable-sync-extensions";
364
365// Disable syncing browser passwords.
366const char kDisableSyncPasswords[]          = "disable-sync-passwords";
367
368// Disable syncing of preferences.
369const char kDisableSyncPreferences[]        = "disable-sync-preferences";
370
371// Disable syncing of themes.
372const char kDisableSyncThemes[]             = "disable-sync-themes";
373
374// Disable tabbed options, i.e., WebUI version of options window.
375const char kDisableTabbedOptions[]           = "disable-tabbed-options";
376
377// TabCloseableStateWatcher disallows closing of tabs and browsers under certain
378// situations on ChromeOS.  Some tests expect tabs or browsers to close, so we
379// need a switch to disable the watcher.
380const char kDisableTabCloseableStateWatcher[] =
381    "disable-tab-closeable-state-watcher";
382
383// Allow disabling of translate from the command line to assist with
384// automated browser testing (e.g. Selenium/WebDriver).  Normal
385// browser users should disable translate with the preference.
386const char kDisableTranslate[] = "disable-translate";
387
388// Enables the backend service for web resources, used in the new tab page for
389// loading tips and recommendations from a JSON feed.
390const char kDisableWebResources[]           = "disable-web-resources";
391
392// Don't enforce the same-origin policy.  (Used by people testing their sites.)
393const char kDisableWebSecurity[]            = "disable-web-security";
394
395// Disable Web Sockets support.
396const char kDisableWebSockets[]             = "disable-web-sockets";
397
398// Disable WebKit's XSSAuditor.  The XSSAuditor mitigates reflective XSS.
399const char kDisableXSSAuditor[]             = "disable-xss-auditor";
400
401// Use a specific disk cache location, rather than one derived from the
402// UserDatadir.
403const char kDiskCacheDir[]                  = "disk-cache-dir";
404
405// Forces the maximum disk space to be used by the disk cache, in bytes.
406const char kDiskCacheSize[]                 = "disk-cache-size";
407
408const char kDnsLogDetails[]                 = "dns-log-details";
409
410// Disables prefetching of DNS information.
411const char kDnsPrefetchDisable[]            = "dns-prefetch-disable";
412
413// Use the specified DNS server for raw DNS resolution.
414const char kDnsServer[]                     = "dns-server";
415
416// Specifies if the dom_automation_controller_ needs to be bound in the
417// renderer. This binding happens on per-frame basis and hence can potentially
418// be a performance bottleneck. One should only enable it when automating
419// dom based tests.
420const char kDomAutomationController[]       = "dom-automation";
421
422// Dump any accumualted histograms to the log when browser terminates (requires
423// logging to be enabled to really do anything).  Used by developers and test
424// scripts.
425const char kDumpHistogramsOnExit[]          = "dump-histograms-on-exit";
426
427// Enable displaying net log events on the command line.
428extern const char kLogNetLog[]              = "log-net-log";
429
430// Enable gpu-accelerated 2d canvas.
431const char kEnableAccelerated2dCanvas[]     = "enable-accelerated-2d-canvas";
432
433// Enables the hardware acceleration of 3D CSS and animation.
434const char kEnableAcceleratedLayers[]       = "enable-accelerated-layers";
435
436// Enables the hardware acceleration of plugins.
437const char kEnableAcceleratedPlugins[]       = "enable-accelerated-plugins";
438
439// Enables WebKit accessibility within the renderer process.
440const char kEnableAccessibility[]           = "enable-accessibility";
441
442// Enables AeroPeek for each tab. (This switch only works on Windows 7).
443const char kEnableAeroPeekTabs[]            = "enable-aero-peek-tabs";
444
445// Enable the inclusion of non-standard ports when generating the Kerberos SPN
446// in response to a Negotiate challenge. See HttpAuthHandlerNegotiate::CreateSPN
447// for more background.
448const char kEnableAuthNegotiatePort[]       = "enable-auth-negotiate-port";
449
450// Enables the benchmarking extensions.
451const char kEnableBenchmarking[]            = "enable-benchmarking";
452
453// In the browser process this switch is used to enable or disable the
454// client-side phishing detection.  In the renderer this switch is only enabled
455// if this switch is enabled in the browser and the user has opted in to UMA
456// stats and SafeBrowsing is enabled in the preferences.
457const char kEnableClientSidePhishingDetection[] =
458    "enable-client-side-phishing-detection";
459
460// This flag enables UI for clearing server data.  Temporarily in place
461// until there's a server endpoint deployed.
462const char kEnableClearServerData[]         = "enable-clear-server-data";
463
464// Enable click-to-play for blocked plug-ins.
465const char kEnableClickToPlay[]            = "enable-click-to-play";
466
467// This applies only when the process type is "service". Enables the
468// Cloud Print Proxy component within the service process.
469const char kEnableCloudPrintProxy[]         = "enable-cloud-print-proxy";
470
471// Enables the Cloud Print dialog hosting code.
472const char kEnableCloudPrint[]              = "enable-cloud-print";
473
474// Enable the Confirm to Quit experiment.
475const char kEnableConfirmToQuit[]           = "enable-confirm-to-quit";
476
477// Enables establishing a backup TCP connection if a specified timeout is
478// exceeded.
479const char kEnableConnectBackupJobs[]       = "enable-connect-backup-jobs";
480
481// Enables web developers to create apps for Chrome without using crx packages.
482const char kEnableCrxlessWebApps[]          = "enable-crxless-web-apps";
483
484// Enables device motion events.
485const char kEnableDeviceMotion[]            = "enable-device-motion";
486
487// Enable DNS side checking of certificates. Still experimental, should only
488// be used by developers at the current time.
489const char kEnableDNSCertProvenanceChecking[] =
490     "enable-dns-cert-provenance-checking";
491
492const char kEnableDNSSECCerts[]             = "enable-dnssec-certs";
493
494// Enables extension APIs that are in development.
495const char kEnableExperimentalExtensionApis[] =
496    "enable-experimental-extension-apis";
497
498// Enable experimental timeline API.
499const char kEnableExtensionTimelineApi[]    = "enable-extension-timeline-api";
500
501// Enable the fastback page cache.
502const char kEnableFastback[]                = "enable-fastback";
503
504// By default, cookies are not allowed on file://. They are needed for
505// testing, for example page cycler and layout tests.  See bug 1157243.
506const char kEnableFileCookies[]             = "enable-file-cookies";
507
508// Enable FileSystem API URLs.
509const char kEnableFileSystemURLScheme[]     = "enable-filesystem-url-scheme";
510
511// Enable the in-browser thumbnailing, which is more efficient than the
512// in-renderer thumbnailing, as we can use more information to determine
513// if we need to update thumbnails.
514const char kEnableInBrowserThumbnailing[]   = "enable-in-browser-thumbnailing";
515
516// Enable IPv6 support, even if probes suggest that it may not be fully
517// supported.  Some probes may require internet connections, and this flag will
518// allow support independent of application testing.
519// This flag overrides "disable-ipv6" which appears elswhere in this file.
520const char kEnableIPv6[]                    = "enable-ipv6";
521
522// Enable the GPU plugin and Pepper 3D rendering.
523const char kEnableGPUPlugin[]               = "enable-gpu-plugin";
524
525// Enable experimental JavaScript I18N API.
526const char kEnableJavaScriptI18NAPI[]       = "enable-javascript-i18n-api";
527
528// Force logging to be enabled.  Logging is disabled by default in release
529// builds.
530const char kEnableLogging[]                 = "enable-logging";
531
532// Allows reporting memory info (JS heap size) to page.
533const char kEnableMemoryInfo[]              = "enable-memory-info";
534
535// On Windows, converts the page to the currently-installed monitor profile.
536// This does NOT enable color management for images. The source is still
537// assumed to be sRGB.
538const char kEnableMonitorProfile[]          = "enable-monitor-profile";
539
540// Runs the Native Client inside the renderer process and enables GPU plugin
541// (internally adds lEnableGpuPlugin to the command line).
542const char kEnableNaCl[]                    = "enable-nacl";
543
544// Enables debugging via RSP over a socket.
545const char kEnableNaClDebug[]               = "enable-nacl-debug";
546
547// Enable Native Web Worker support.
548const char kEnableNativeWebWorkers[]        = "enable-native-web-workers";
549
550// This applies only when the process type is "service". Enables the
551// Chromoting Host Process within the service process.
552const char kEnableRemoting[]                = "enable-remoting";
553
554// Enable content settings based on host *and* plug-in.
555const char kEnableResourceContentSettings[] =
556    "enable-resource-content-settings";
557
558// Enable speculative TCP/IP preconnection.
559const char kEnablePreconnect[]              = "enable-preconnect";
560
561// Enable caching of pre-parsed JS script data.  See http://crbug.com/32407.
562const char kEnablePreparsedJsCaching[]      = "enable-preparsed-js-caching";
563
564// Enable print preview (work in progress).
565const char kEnablePrintPreview[]            = "enable-print-preview";
566
567// Enable the IsSearchProviderInstalled and InstallSearchProvider with an extra
568// parameter to indicate if the provider should be the default.
569const char kEnableSearchProviderApiV2[]     = "enable-search-provider-api-v2";
570
571// Enables 0-RTT HTTPS handshakes.
572const char kEnableSnapStart[]               = "enable-snap-start";
573
574// Enables speech input.
575const char kEnableSpeechInput[]             = "enable-speech-input";
576
577// Enables StatsTable, logging statistics to a global named shared memory table.
578const char kEnableStatsTable[]              = "enable-stats-table";
579
580// Enable syncing browser data to a Google Account.
581const char kEnableSync[]                    = "enable-sync";
582
583// Enable syncing browser autofill.
584const char kEnableSyncAutofill[]            = "enable-sync-autofill";
585
586// Enable syncing browser sessions.
587const char kEnableSyncSessions[]            = "enable-sync-sessions";
588
589// Enable syncing browser typed urls.
590const char kEnableSyncTypedUrls[]           = "enable-sync-typed-urls";
591
592// Enable use of experimental TCP sockets API for sending data in the
593// SYN packet.
594const char kEnableTcpFastOpen[]             = "enable-tcp-fastopen";
595
596// Whether or not the touch events API is exposed.
597const char kEnableTouch[]                   = "enable-touch";
598
599// Enables the option to show tabs as a vertical stack down the side of the
600// browser window.
601const char kEnableVerticalTabs[]            = "enable-vertical-tabs";
602
603// Enables support for fullscreen video. Current implementation is
604// incomplete and this flag is used for development and testing.
605const char kEnableVideoFullscreen[]         = "enable-video-fullscreen";
606
607// Enables video logging where video elements log playback performance data to
608// the debug log.
609const char kEnableVideoLogging[]            = "enable-video-logging";
610
611// Spawn threads to watch for excessive delays in specified message loops.
612// User should set breakpoints on Alarm() to examine problematic thread.
613// Usage:   -enable-watchdog=[ui][io]
614// Order of the listed sub-arguments does not matter.
615const char kEnableWatchdog[]                = "enable-watchdog";
616
617// Enable web audio API.
618const char kEnableWebAudio[]                = "enable-webaudio";
619
620// Enables experimental features for the geolocation API.
621// Current features:
622// - CoreLocation support for Mac OS X 10.6
623// - Gateway location for Linux and Windows
624// - Location platform support for Windows 7
625const char kExperimentalLocationFeatures[]  = "experimental-location-features";
626
627// Enables experimental features for Spellchecker. Right now, the first
628// experimental feature is auto spell correct, which corrects words which are
629// misppelled by typing the word with two consecutive letters swapped. The
630// features that will be added next are:
631// 1 - Allow multiple spellcheckers to work simultaneously.
632// 2 - Allow automatic detection of spell check language.
633// TODO(sidchat): Implement the above fetaures to work under this flag.
634const char kExperimentalSpellcheckerFeatures[] =
635    "experimental-spellchecker-features";
636
637// Explicitly allow additional ports using a comma separated list of port
638// numbers.
639const char kExplicitlyAllowedPorts[]        = "explicitly-allowed-ports";
640
641// Causes the process to run as an extension subprocess.
642const char kExtensionProcess[]              = "extension";
643
644// Frequency in seconds for Extensions auto-update.
645const char kExtensionsUpdateFrequency[]     = "extensions-update-frequency";
646
647// These two flags are added around the switches about:flags adds to the
648// command line. This is useful to see which switches were added by about:flags
649// on about:version. They don't have any effect.
650const char kFlagSwitchesBegin[]             = "flag-switches-begin";
651const char kFlagSwitchesEnd[]               = "flag-switches-end";
652
653// Alternative feedback server to use when submitting user feedback
654const char kFeedbackServer[]                = "feedback-server";
655
656// The file descriptor limit is set to the value of this switch, subject to the
657// OS hard limits. Useful for testing that file descriptor exhaustion is handled
658// gracefully.
659const char kFileDescriptorLimit[]           = "file-descriptor-limit";
660
661// Display the First Run experience when the browser is started, regardless of
662// whether or not it's actually the first run.
663const char kFirstRun[]                      = "first-run";
664
665// Forces the apps/webstore promo to be shown, independent of whether it has
666// timed out, etc. Useful for testing.
667const char kForceAppsPromoVisible[]         = "force-apps-promo-visible";
668
669// Some field tests may rendomized in the browser, and the randomly selected
670// outcome needs to be propogated to the renderer.  For instance, this is used
671// to modify histograms recorded in the renderer, or to get the renderer to
672// also set of its state (initialize, or not initialize components) to match the
673// experiment(s).
674// The argument is a string-ized list of experiment names, and the associated
675// value that was randomly selected.  In the recent implementetaion, the
676// persistent representation generated by field_trial.cc and later decoded, is a
677// list of name and value pairs, separated by slashes. See field trial.cc for
678// current details.
679const char kForceFieldTestNameAndValue[]    = "force-fieldtest";
680
681// Force renderer accessibility to be on instead of enabling it on demand when
682// a screen reader is detected. The disable-renderer-accessibility switch
683// overrides this if present.
684const char kForceRendererAccessibility[]   = "force-renderer-accessibility";
685
686// Extra command line options for launching the GPU process (normally used
687// for debugging). Use like renderer-cmd-prefix.
688const char kGpuLauncher[]                   = "gpu-launcher";
689
690// Makes this process a GPU sub-process.
691const char kGpuProcess[]                    = "gpu-process";
692
693// Causes the GPU process to display a dialog on launch.
694const char kGpuStartupDialog[]              = "gpu-startup-dialog";
695
696// Specifies a custom name for the GSSAPI library to load.
697const char kGSSAPILibraryName[]             = "gssapi-library-name";
698
699// These flags show the man page on Linux. They are equivalent to each
700// other.
701const char kHelp[]                          = "help";
702const char kHelpShort[]                     = "h";
703
704// Make Windows happy by allowing it to show "Enable access to this program"
705// checkbox in Add/Remove Programs->Set Program Access and Defaults. This
706// only shows an error box because the only way to hide Chrome is by
707// uninstalling it.
708const char kHideIcons[]                     = "hide-icons";
709
710// The value of this switch specifies which page will be displayed
711// in newly-opened tabs.  We need this for testing purposes so
712// that the UI tests don't depend on what comes up for http://google.com.
713const char kHomePage[]                      = "homepage";
714
715// Comma separated list of rules that control how hostnames are mapped.
716//
717// For example:
718//    "MAP * 127.0.0.1" --> Forces all hostnames to be mapped to 127.0.0.1
719//    "MAP *.google.com proxy" --> Forces all google.com subdomains to be
720//                                 resolved to "proxy".
721//    "MAP test.com [::1]:77 --> Forces "test.com" to resolve to IPv6 loopback.
722//                               Will also force the port of the resulting
723//                               socket address to be 77.
724//    "MAP * baz, EXCLUDE www.google.com" --> Remaps everything to "baz",
725//                                            except for "www.google.com".
726//
727// These mappings apply to the endpoint host in a net::URLRequest (the TCP
728// connect and host resolver in a direct connection, and the CONNECT in an http
729// proxy connection, and the endpoint host in a SOCKS proxy connection).
730const char kHostRules[]                     = "host-rules";
731
732// The maximum number of concurrent host resolve requests (i.e. DNS) to allow.
733const char kHostResolverParallelism[]       = "host-resolver-parallelism";
734
735// These mappings only apply to the host resolver.
736const char kHostResolverRules[]             = "host-resolver-rules";
737
738// Ignores GPU blacklist.
739const char kIgnoreGpuBlacklist[]            = "ignore-gpu-blacklist";
740
741// Perform importing from another browser. The value associated with this
742// setting encodes the target browser and what items to import.
743const char kImport[]                        = "import";
744
745// Perform bookmark importing from an HTML file. The value associated with this
746// setting encodes the file path. It may be used jointly with kImport.
747const char kImportFromFile[]                = "import-from-file";
748
749// Runs plugins inside the renderer process
750const char kInProcessPlugins[]              = "in-process-plugins";
751
752// Runs WebGL inside the renderer process.
753const char kInProcessWebGL[]                = "in-process-webgl";
754
755// Causes the browser to launch directly in incognito mode.
756const char kIncognito[]                     = "incognito";
757
758// URL to use for instant. If specified this overrides the url from the
759// TemplateURL.
760const char kInstantURL[]                    = "instant-url";
761
762// Runs a trusted Pepper plugin inside the renderer process.
763const char kInternalPepper[]                = "internal-pepper";
764
765// Specifies the flags passed to JS engine
766const char kJavaScriptFlags[]               = "js-flags";
767
768// Used for testing - keeps browser alive after last browser window closes.
769const char kKeepAliveForTest[]              = "keep-alive-for-test";
770
771// Load an extension from the specified directory.
772const char kLoadExtension[]                 = "load-extension";
773
774// Uninstall an extension with the specified extension id.
775const char kUninstallExtension[]            = "uninstall-extension";
776
777// Load an NPAPI plugin from the specified path.
778const char kLoadPlugin[]                    = "load-plugin";
779
780// Load NPAPI plugins from the specified directory.
781const char kExtraPluginDir[]                = "extra-plugin-dir";
782
783// Make plugin processes log their sent and received messages to VLOG(1).
784const char kLogPluginMessages[]             = "log-plugin-messages";
785
786// Sets the minimum log level. Valid values are from 0 to 3:
787// INFO = 0, WARNING = 1, LOG_ERROR = 2, LOG_FATAL = 3.
788const char kLoggingLevel[]                  = "log-level";
789
790// Make Chrome default browser
791const char kMakeDefaultBrowser[]            = "make-default-browser";
792
793// Forces the maximum disk space to be used by the media cache, in bytes.
794const char kMediaCacheSize[]                = "media-cache-size";
795
796// Enable dynamic loading of the Memory Profiler DLL, which will trace
797// all memory allocations during the run.
798const char kMemoryProfiling[]               = "memory-profile";
799
800// Enable histograming of tasks served by MessageLoop. See about:histograms/Loop
801// for results, which show frequency of messages on each thread, including APC
802// count, object signalling count, etc.
803const char kMessageLoopHistogrammer[]       = "message-loop-histogrammer";
804
805// Enables the recording of metrics reports but disables reporting.  In
806// contrast to kDisableMetrics, this executes all the code that a normal client
807// would use for reporting, except the report is dropped rather than sent to
808// the server. This is useful for finding issues in the metrics code during UI
809// and performance tests.
810const char kMetricsRecordingOnly[]          = "metrics-recording-only";
811
812// The minimum version of Flash that implements the NPP_ClearSiteData API.
813const char kMinClearSiteDataFlashVersion[]  = "min-clearsitedata-flash-version";
814
815// Sets the default IP address (interface) for the stub (normally 127.0.0.1).
816const char kNaClDebugIP[]                   = "nacl-debug-ip";
817
818// Sets the default port range for debugging.
819const char kNaClDebugPorts[]                = "nacl-debug-ports";
820
821// Causes the process to run as a NativeClient broker
822// (used for launching NaCl loader processes on 64-bit Windows).
823const char kNaClBrokerProcess[]             = "nacl-broker";
824
825// Causes the process to run as a NativeClient loader.
826const char kNaClLoaderProcess[]             = "nacl-loader";
827
828// Causes the Native Client process to display a dialog on launch.
829const char kNaClStartupDialog[]             = "nacl-startup-dialog";
830
831// Disables the default browser check. Useful for UI/browser tests where we
832// want to avoid having the default browser info-bar displayed.
833const char kNoDefaultBrowserCheck[]         = "no-default-browser-check";
834
835// Don't record/playback events when using record & playback.
836const char kNoEvents[]                      = "no-events";
837
838// Bypass the First Run experience when the browser is started, regardless of
839// Disables all experiments set on about:flags. Does not disable about:flags
840// itself. Useful if an experiment makes chrome crash at startup: One can start
841// chrome with --no-experiments, disable the problematic lab at about:flags and
842// then restart chrome without this switch again.
843const char kNoExperiments[]                 = "no-experiments";
844
845// whether or not it's actually the first run. Overrides kFirstRun in case
846// you're for some reason tempted to pass them both.
847const char kNoFirstRun[]                    = "no-first-run";
848
849// Don't Sandbox the GPU process, does not affect other sandboxed processes.
850const char kNoGpuSandbox[]                  = "no-gpu-sandbox";
851
852// Support a separate switch that enables the v8 playback extension.
853// The extension causes javascript calls to Date.now() and Math.random()
854// to return consistent values, such that subsequent loads of the same
855// page will result in consistent js-generated data and XHR requests.
856// Pages may still be able to generate inconsistent data from plugins.
857const char kNoJsRandomness[]                = "no-js-randomness";
858
859// Don't send hyperlink auditing pings
860const char kNoPings[]                       = "no-pings";
861
862// Don't use a proxy server, always make direct connections. Overrides any
863// other proxy server flags that are passed.
864const char kNoProxyServer[]                 = "no-proxy-server";
865
866// Don't send HTTP-Referer headers.
867const char kNoReferrers[]                   = "no-referrers";
868
869// Disables the sandbox for all process types that are normally sandboxed.
870const char kNoSandbox[]                     = "no-sandbox";
871
872// Does not automatically open a browser window on startup (used when launching
873// Chrome for the purpose of hosting background apps).
874const char kNoStartupWindow[]               = "no-startup-window";
875
876// Show a desktop notification that the cloud print token has expired and
877// that user needs to re-authenticate.
878const char kNotifyCloudPrintTokenExpired[] = "notify-cp-token-expired";
879
880// Specifies the maximum number of threads to use for running the Proxy
881// Autoconfig (PAC) script.
882const char kNumPacThreads[]                 = "num-pac-threads";
883
884// Launch URL in new browser window.
885const char kOpenInNewWindow[]               = "new-window";
886
887// Simulate an organic Chrome install.
888const char kOrganicInstall[]                = "organic";
889
890// Package an extension to a .crx installable file from a given directory.
891const char kPackExtension[]                 = "pack-extension";
892
893// Optional PEM private key is to use in signing packaged .crx.
894const char kPackExtensionKey[]              = "pack-extension-key";
895
896// Specifies the path to the user data folder for the parent profile.
897const char kParentProfile[]                 = "parent-profile";
898
899// Read previously recorded data from the cache. Only cached data is read.
900// See kRecordMode.
901const char kPlaybackMode[]                  = "playback-mode";
902
903// Specifies the plugin data directory, which is where plugins (Gears
904// specifically) will store its state.
905const char kPluginDataDir[]                 = "plugin-data-dir";
906
907// Specifies a command that should be used to launch the plugin process.  Useful
908// for running the plugin process through purify or quantify.  Ex:
909//   --plugin-launcher="path\to\purify /Run=yes"
910const char kPluginLauncher[]                = "plugin-launcher";
911
912// Tells the plugin process the path of the plugin to load
913const char kPluginPath[]                    = "plugin-path";
914
915// Causes the process to run as a plugin subprocess.
916const char kPluginProcess[]                 = "plugin";
917
918// Causes the plugin process to display a dialog on launch.
919const char kPluginStartupDialog[]           = "plugin-startup-dialog";
920
921// Runs PPAPI (Pepper) plugins out-of-process.
922const char kPpapiOutOfProcess[]             = "ppapi-out-of-process";
923
924// Like kPluginLauncher for PPAPI plugins.
925const char kPpapiPluginLauncher[]           = "ppapi-plugin-launcher";
926
927// Argument to the process type that indicates a PPAPI plugin process type.
928const char kPpapiPluginProcess[]            = "ppapi";
929
930// Causes the PPAPI sub process to display a dialog on launch.
931const char kPpapiStartupDialog[]            = "ppapi-startup-dialog";
932
933// Controls speculative prerendering of pages, and content prefetching.  Both
934// are dispatched from <link rel=prefetch href=...> elements.
935const char kPrerender[]                     = "prerender";
936// These are the values the switch may have, as in "--prerender=auto".
937//   auto: Allow field trial selection in both prerender and prefetch.
938const char kPrerenderSwitchValueAuto[]      = "auto";
939//   disabled: No prerendering or prefetching.
940const char kPrerenderSwitchValueDisabled[]  = "disabled";
941//   enabled: Both prerendering and prefetching.
942const char kPrerenderSwitchValueEnabled[]   = "enabled";
943//   prefetch_only: No prerendering, but enable prefetching.
944const char kPrerenderSwitchValuePrefetchOnly[] = "prefetch_only";
945
946// Prints the pages on the screen.
947const char kPrint[]                         = "print";
948
949// Runs a single process for each site (i.e., group of pages from the same
950// registered domain) the user visits.  We default to using a renderer process
951// for each site instance (i.e., group of pages from the same registered
952// domain with script connections to each other).
953const char kProcessPerSite[]                = "process-per-site";
954
955// Runs each set of script-connected tabs (i.e., a BrowsingInstance) in its own
956// renderer process.  We default to using a renderer process for each
957// site instance (i.e., group of pages from the same registered domain with
958// script connections to each other).
959const char kProcessPerTab[]                 = "process-per-tab";
960
961// The value of this switch determines whether the process is started as a
962// renderer or plugin host.  If it's empty, it's the browser.
963const char kProcessType[]                   = "type";
964
965// Output the product version information and quit. Used as an internal api to
966// detect the installed version of Chrome on Linux.
967const char kProductVersion[]                = "product-version";
968
969// Causes the process to run as a profile import subprocess.
970const char kProfileImportProcess[]          = "profile-import";
971
972// Starts the sampling based profiler for the browser process at
973// startup. This will only work if chrome has been built with
974// the gyp variable profiling=1. The output will go to the value
975// of kProfilingFile.
976const char kProfilingAtStart[]              = "profiling-at-start";
977
978// Specifies a location for profiling output. This will only work if chrome
979// has been built with the gyp variable profiling=1.
980//   {pid} if present will be replaced by the pid of the process.
981//   {count} if present will be incremented each time a profile is generated
982//           for this process.
983// The default is chrome-profile-{pid}.
984const char kProfilingFile[]                 = "profiling-file";
985
986// Controls whether profile data is periodically flushed to a file.
987// Normally the data gets written on exit but cases exist where chrome
988// doesn't exit cleanly (especially when using single-process).
989// A time in seconds can be specified.
990const char kProfilingFlush[]                = "profiling-flush";
991
992// Force proxy auto-detection.
993const char kProxyAutoDetect[]               = "proxy-auto-detect";
994
995// Specify a list of hosts for whom we bypass proxy settings and use direct
996// connections. Ignored if --proxy-auto-detect or --no-proxy-server are
997// also specified.
998// This is a comma separated list of bypass rules. See:
999// "net/proxy/proxy_bypass_rules.h" for the format of these rules.
1000const char kProxyBypassList[]               = "proxy-bypass-list";
1001
1002// Use the pac script at the given URL
1003const char kProxyPacUrl[]                   = "proxy-pac-url";
1004
1005// Use a specified proxy server, overrides system settings. This switch only
1006// affects HTTP and HTTPS requests.
1007const char kProxyServer[]                   = "proxy-server";
1008
1009// Adds a "Purge memory" button to the Task Manager, which tries to dump as
1010// much memory as possible.  This is mostly useful for testing how well the
1011// MemoryPurger functionality works.
1012//
1013// NOTE: This is only implemented for Views.
1014const char kPurgeMemoryButton[]             = "purge-memory-button";
1015
1016// Chrome supports a playback and record mode.  Record mode saves *everything*
1017// to the cache.  Playback mode reads data exclusively from the cache.  This
1018// allows us to record a session into the cache and then replay it at will.
1019// See also kPlaybackMode.
1020const char kRecordMode[]                    = "record-mode";
1021
1022// Register pepper plugins that should be loaded into the renderer.
1023const char kRegisterPepperPlugins[]         = "register-pepper-plugins";
1024
1025// Reload pages that have been killed when they are next focused by the user.
1026const char kReloadKilledTabs[]              = "reload-killed-tabs";
1027
1028// Enable remote debug over HTTP on the specified port.
1029const char kRemoteDebuggingPort[]           = "remote-debugging-port";
1030
1031// Enable remote debug / automation shell on the specified port.
1032const char kRemoteShellPort[]               = "remote-shell-port";
1033
1034// Causes the renderer process to throw an assertion on launch.
1035const char kRendererAssertTest[]            = "renderer-assert-test";
1036
1037#if !defined(OFFICIAL_BUILD)
1038// Causes the renderer process to throw an assertion on launch.
1039const char kRendererCheckFalseTest[]        = "renderer-check-false-test";
1040#endif
1041
1042// On POSIX only: the contents of this flag are prepended to the renderer
1043// command line. Useful values might be "valgrind" or "xterm -e gdb --args".
1044const char kRendererCmdPrefix[]             = "renderer-cmd-prefix";
1045
1046// Causes the renderer process to crash on launch.
1047const char kRendererCrashTest[]             = "renderer-crash-test";
1048
1049// Causes the process to run as renderer instead of as browser.
1050const char kRendererProcess[]               = "renderer";
1051
1052// Causes the renderer process to display a dialog on launch.
1053const char kRendererStartupDialog[]         = "renderer-startup-dialog";
1054
1055// Indicates the last session should be restored on startup. This overrides
1056// the preferences value and is primarily intended for testing. The value of
1057// this switch is the number of tabs to wait until loaded before
1058// 'load completed' is sent to the ui_test.
1059const char kRestoreLastSession[]            = "restore-last-session";
1060
1061// Runs the plugin processes inside the sandbox.
1062const char kSafePlugins[]                   = "safe-plugins";
1063
1064// URL prefix used by safebrowsing to fetch hash, download data and
1065// report malware.
1066const char kSbInfoURLPrefix[] = "safebrowsing-info-url-prefix";
1067
1068// URL prefix used by safebrowsing to get MAC key.
1069const char kSbMacKeyURLPrefix[] = "safebrowsing-mackey-url-prefix";
1070
1071// If present, safebrowsing only performs update when
1072// SafeBrowsingProtocolManager::ForceScheduleNextUpdate() is explicitly called.
1073// This is used for testing only.
1074const char kSbDisableAutoUpdate[] = "safebrowsing-disable-auto-update";
1075
1076// If present, safebrowsing checks download url and download content's hash
1077// to make sure the content are not malicious.
1078const char kSbEnableDownloadProtection[] = "safebrowsing-download-protection";
1079
1080// Enable support for SDCH filtering (dictionary based expansion of content).
1081// Optional argument is *the* only domain name that will have SDCH suppport.
1082// Default is  "-enable-sdch" to advertise SDCH on all domains.
1083// Sample usage with argument: "-enable-sdch=.google.com"
1084// SDCH is currently only supported server-side for searches on google.com.
1085const char kSdchFilter[]                    = "enable-sdch";
1086
1087// Enables the showing of an info-bar instructing user they can search directly
1088// from the omnibox.
1089const char kSearchInOmniboxHint[]           = "search-in-omnibox-hint";
1090
1091// Causes the process to run as a service process.
1092const char kServiceProcess[]                = "service";
1093
1094// The LSID of the account to use for the service process.
1095const char kServiceAccountLsid[]            = "service-account-lsid";
1096
1097// See kHideIcons.
1098const char kShowIcons[]                     = "show-icons";
1099
1100// Renders a border around composited Render Layers to help debug and study
1101// layer compositing.
1102const char kShowCompositedLayerBorders[]    = "show-composited-layer-borders";
1103
1104// Visibly render a border around paint rects in the web page to help debug
1105// and study painting behavior.
1106const char kShowPaintRects[]                = "show-paint-rects";
1107
1108// Change the DCHECKS to dump memory and continue instead of displaying error
1109// dialog. This is valid only in Release mode when --enable-dcheck is
1110// specified.
1111const char kSilentDumpOnDCHECK[]            = "silent-dump-on-dcheck";
1112
1113// Replaces the buffered data source for <audio> and <video> with a simplified
1114// resource loader that downloads the entire resource into memory.
1115//
1116// TODO(scherkus): remove --simple-data-source when our media resource loading
1117// is cleaned up and playback testing completed.
1118const char kSimpleDataSource[]              = "simple-data-source";
1119
1120// Runs the renderer and plugins in the same process as the browser
1121const char kSingleProcess[]                 = "single-process";
1122
1123// Start the browser maximized, regardless of any previous settings.
1124const char kStartMaximized[]                = "start-maximized";
1125
1126// Allow insecure XMPP connections for sync (for testing).
1127const char kSyncAllowInsecureXmppConnection[] =
1128    "sync-allow-insecure-xmpp-connection";
1129
1130// Invalidate any login info passed into sync's XMPP connection.
1131const char kSyncInvalidateXmppLogin[]       = "sync-invalidate-xmpp-login";
1132
1133// Use the SyncerThread implementation that matches up with the old pthread
1134// impl semantics, but using Chrome synchronization primitives.  The only
1135// difference between this and the default is that we now have no timeout on
1136// Stop().  Should only use if you experience problems with the default.
1137const char kSyncerThreadTimedStop[]         = "syncer-thread-timed-stop";
1138
1139// Override the default notification method for sync.
1140const char kSyncNotificationMethod[]        = "sync-notification-method";
1141
1142// Override the default host used for sync notifications.  Can be either
1143// "host" or "host:port".
1144const char kSyncNotificationHost[]          = "sync-notification-host";
1145
1146// Override the default server used for profile sync.
1147const char kSyncServiceURL[]                = "sync-url";
1148
1149// Try to connect to XMPP using SSLTCP first (for testing).
1150const char kSyncTrySsltcpFirstForXmpp[]     = "sync-try-ssltcp-first-for-xmpp";
1151
1152// Pass the name of the current running automated test to Chrome.
1153const char kTestName[]                      = "test-name";
1154
1155// Runs the security test for the renderer sandbox.
1156const char kTestSandbox[]                   = "test-sandbox";
1157
1158// Runs the security test for the NaCl loader sandbox.
1159const char kTestNaClSandbox[]               = "test-nacl-sandbox";
1160
1161// Pass the type of the current test harness ("browser" or "ui")
1162const char kTestType[]                      = "test-type";
1163
1164// The value of this switch tells the app to listen for and broadcast
1165// testing-related messages on IPC channel with the given ID.
1166const char kTestingChannelID[]              = "testing-channel";
1167
1168// Excludes these plugins from the plugin sandbox.
1169// This is a comma-separated list of plugin library names.
1170const char kTrustedPlugins[]                = "trusted-plugins";
1171
1172// Experimental. Shows a dialog asking the user to try chrome. This flag
1173// is to be used only by the upgrade process.
1174const char kTryChromeAgain[]                = "try-chrome-again";
1175
1176// Runs un-installation steps that were done by chrome first-run.
1177const char kUninstall[]                     = "uninstall";
1178
1179// Use Spdy for the transport protocol instead of HTTP.
1180// This is a temporary testing flag.
1181const char kUseSpdy[]                       = "use-spdy";
1182
1183// Ignore certificate related errors.
1184const char kIgnoreCertificateErrors[]       = "ignore-certificate-errors";
1185
1186// Set the maximum SPDY sessions per domain.
1187const char kMaxSpdySessionsPerDomain[]      = "max-spdy-sessions-per-domain";
1188
1189// Set the maximum concurrent streams over a SPDY session.
1190const char kMaxSpdyConcurrentStreams[]      = "max-spdy-concurrent-streams";
1191
1192// Grant unlimited quota to store files to this process.
1193// Used for testing Pepper's FileRef/FileIO/FileSystem implementations.
1194// DO NOT USE FOR OTHER PURPOSES.
1195// TODO(dumi): remove the switch when we have a real quota implementation.
1196const char kUnlimitedQuotaForFiles[]        = "unlimited-quota-for-files";
1197
1198// This is for testing IndexedDB and will give any website you visit unlimited
1199// quota in IndexedDB. This should only be used for development and not general
1200// browsing. It is ignored in single process mode.
1201const char kUnlimitedQuotaForIndexedDB[]    = "unlimited-quota-for-indexeddb";
1202
1203// Use the low fragmentation heap for the CRT.
1204const char kUseLowFragHeapCrt[]             = "use-lf-heap";
1205
1206// A string used to override the default user agent with a custom one.
1207const char kUserAgent[]                     = "user-agent";
1208
1209// Specifies the user data directory, which is where the browser will look
1210// for all of its state.
1211const char kUserDataDir[]                   = "user-data-dir";
1212
1213// directory to locate user scripts in as an over-ride of the default
1214const char kUserScriptsDir[]                = "user-scripts-dir";
1215
1216// On POSIX only: the contents of this flag are prepended to the utility
1217// process command line. Useful values might be "valgrind" or "xterm -e gdb
1218// --args".
1219const char kUtilityCmdPrefix[]              = "utility-cmd-prefix";
1220
1221// Causes the process to run as a utility subprocess.
1222const char kUtilityProcess[]                = "utility";
1223
1224// The utility process is sandboxed, with access to one directory. This flag
1225// specifies the directory that can be accessed.
1226const char kUtilityProcessAllowedDir[]      = "utility-allowed-dir";
1227
1228// Print version information and quit.
1229const char kVersion[]                       = "version";
1230
1231// Will add kWaitForDebugger to every child processes. If a value is passed, it
1232// will be used as a filter to determine if the child process should have the
1233// kWaitForDebugger flag passed on or not.
1234const char kWaitForDebuggerChildren[]       = "wait-for-debugger-children";
1235
1236// Causes the worker process allocation to use as many processes as cores.
1237const char kWebWorkerProcessPerCore[]       = "web-worker-process-per-core";
1238
1239// Causes workers to run together in one process, depending on their domains.
1240// Note this is duplicated in webworkerclient_impl.cc
1241const char kWebWorkerShareProcesses[]       = "web-worker-share-processes";
1242
1243// Use WinHTTP to fetch and evaluate PAC scripts. Otherwise the default is
1244// to use Chromium's network stack to fetch, and V8 to evaluate.
1245const char kWinHttpProxyResolver[]          = "winhttp-proxy-resolver";
1246
1247// Causes the process to run as a worker subprocess.
1248const char kWorkerProcess[]                 = "worker";
1249
1250// The prefix used when starting the zygote process. (i.e. 'gdb --args')
1251const char kZygoteCmdPrefix[]               = "zygote-cmd-prefix";
1252
1253// Causes the process to run as a renderer zygote.
1254const char kZygoteProcess[]                 = "zygote";
1255
1256#if defined(OS_CHROMEOS)
1257// Enable the redirection of viewable document requests to the Google
1258// Document Viewer.
1259const char kEnableGView[]                   = "enable-gview";
1260
1261// Should we show the image based login?
1262const char kEnableLoginImages[]             = "enable-login-images";
1263
1264// Enable Chrome-as-a-login-manager behavior.
1265const char kLoginManager[]                  = "login-manager";
1266
1267// Allows to override the first login screen. The value should be the name
1268// of the first login screen to show (see
1269// chrome/browser/chromeos/login/login_wizard_view.cc for actual names).
1270// Ignored if kLoginManager is not specified.
1271// TODO(avayvod): Remove when the switch is no longer needed for testing.
1272const char kLoginScreen[]                   = "login-screen";
1273
1274// Allows control over the initial login screen size. Pass width,height.
1275const char kLoginScreenSize[]               = "login-screen-size";
1276
1277// Attempts to load libcros and validate it, then exits. A nonzero return code
1278// means the library could not be loaded correctly.
1279const char kTestLoadLibcros[]               = "test-load-libcros";
1280
1281// Specifies the profile to use once a chromeos user is logged in.
1282const char kLoginProfile[]                  = "login-profile";
1283
1284// Specifies the user which is already logged in.
1285const char kLoginUser[]                     = "login-user";
1286// Specifies a password to be used to login (along with login-user).
1287const char kLoginPassword[]                 = "login-password";
1288
1289// Allows to emulate situation when user logins with new password.
1290const char kLoginUserWithNewPassword[]      = "login-user-with-new-password";
1291
1292// Attempts to perform Chrome OS offline and online login in parallel.
1293const char kParallelAuth[]                  = "parallel-auth";
1294
1295// Use the frame layout used in chromeos.
1296const char kChromeosFrame[]                 = "chromeos-frame";
1297
1298// Use the given language for UI in the input method candidate window.
1299const char kCandidateWindowLang[]           = "lang";
1300
1301// Indicates that the browser is in "browse without sign-in" (Guest session)
1302// mode. Should completely disable extensions, sync and bookmarks.
1303const char kGuestSession[]                  = "bwsi";
1304
1305// Indicates that stub implementations of the libcros library should be used.
1306// This is typically used to test the chromeos build of chrome on the desktop.
1307const char kStubCros[]                      = "stub-cros";
1308
1309// URL of the html page for Screen Saver.
1310const char kScreenSaverUrl[]                = "screen-saver-url";
1311
1312// Flag to trigger ChromeOS system log compression during feedback submit.
1313const char kCompressSystemFeedback[]        = "compress-sys-feedback";
1314
1315// Forces usage of libcros stub implementation. For testing purposes, this
1316// switch separates chrome code from the rest of ChromeOS.
1317const char kForceStubLibcros[]              = "force-stub-libcros";
1318
1319// Enables WebUI menu.
1320const char kEnableWebUIMenu[]               = "enable-webui-menu";
1321
1322// Enables Media Player.
1323const char kEnableMediaPlayer[]             = "enable-media-player";
1324
1325// Enables Advanced File System.
1326const char kEnableAdvancedFileSystem[]      = "enable-advanced-fs";
1327#endif
1328
1329#if defined(OS_LINUX)
1330// Specify the amount the trackpad should scroll by.
1331const char kScrollPixels[]                  = "scroll-pixels";
1332#endif
1333
1334#if defined(OS_MACOSX) || defined(OS_WIN)
1335// Use the system SSL library (Secure Transport on Mac, SChannel on Windows)
1336// instead of NSS for SSL.
1337const char kUseSystemSSL[]                  = "use-system-ssl";
1338#endif
1339
1340#if defined(OS_POSIX)
1341// A flag, generated internally by Chrome for renderer and other helper process
1342// command lines on Linux and Mac.  It tells the helper process to enable crash
1343// dumping and reporting, because helpers cannot access the profile or other
1344// files needed to make this decision.
1345const char kEnableCrashReporter[]           = "enable-crash-reporter";
1346
1347// Bypass the error dialog when the profile lock couldn't be attained.
1348// This switch is used during automated testing.
1349const char kNoProcessSingletonDialog[]      = "no-process-singleton-dialog";
1350
1351#if !defined(OS_MACOSX)
1352// Specifies which password store to use (detect, default, gnome, kwallet).
1353const char kPasswordStore[]                 = "password-store";
1354#endif
1355#endif
1356
1357#if defined(OS_MACOSX)
1358// Temporary flag to disable hole punching for accelerated surfaces. This is
1359// here to aid debugging eventual problems, it can be removed once hole punching
1360// has been out there for a few dev channel releases without problems.
1361const char kDisableHolePunching[]           = "disable-hole-punching";
1362
1363// Cause the OS X sandbox write to syslog every time an access to a resource
1364// is denied by the sandbox.
1365const char kEnableSandboxLogging[]          = "enable-sandbox-logging";
1366#else
1367// Enable Kiosk mode.
1368const char kKioskMode[]                     = "kiosk";
1369#endif
1370
1371// Enables debug paint in views framework. Enabling this causes the damaged
1372// region being painted to flash in red.
1373#if defined(TOOLKIT_VIEWS)
1374const char kDebugViewsPaint[]               = "debug-views-paint";
1375#endif
1376
1377#ifndef NDEBUG
1378// Clear the token service before using it.  This allows simulating
1379// the expiration of credentials during testing.
1380const char kClearTokenService[]             = "clear-token-service";
1381
1382// Debug only switch to specify which gears plugin dll to load.
1383const char kGearsPluginPathOverride[]       = "gears-plugin-path";
1384
1385// Sets a token in the token service, for testing.
1386const char kSetToken[]                      = "set-token";
1387
1388// Debug only switch to specify which websocket live experiment host to be used.
1389// If host is specified, it also makes initial delay shorter (5 min to 5 sec)
1390// to make it faster to test websocket live experiment code.
1391const char kWebSocketLiveExperimentHost[]   = "websocket-live-experiment-host";
1392#endif
1393
1394#if defined(HAVE_XINPUT2)
1395// Tells chrome to interpret events from these devices as touch events. Only
1396// available with XInput 2 (i.e. X server 1.8 or above). The id's of the devices
1397// can be retrieved from 'xinput list'.
1398const char kTouchDevices[]                  = "touch-devices";
1399#endif
1400
1401
1402// SeccompSandboxEnabled() controls whether we are using Seccomp.
1403// It is currently off by default on all platforms.
1404// TODO(evan): unify all of these once we turn the seccomp sandbox always
1405// on.  Also remove the #include of command_line.h above.
1406
1407// Disable the seccomp sandbox (Linux only)
1408const char kDisableSeccompSandbox[]         = "disable-seccomp-sandbox";
1409// Enable the seccomp sandbox (Linux only)
1410const char kEnableSeccompSandbox[]          = "enable-seccomp-sandbox";
1411
1412bool SeccompSandboxEnabled() {
1413  return CommandLine::ForCurrentProcess()->HasSwitch(
1414             switches::kEnableSeccompSandbox);
1415}
1416
1417// -----------------------------------------------------------------------------
1418// DO NOT ADD YOUR CRAP TO THE BOTTOM OF THIS FILE.
1419//
1420// You were going to just dump your switches here, weren't you? Instead,
1421// please put them in alphabetical order above, or in order inside the
1422// appropriate ifdef at the bottom. The order should match the header.
1423// -----------------------------------------------------------------------------
1424
1425}  // namespace switches
1426