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