1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // Defines all the command-line switches used by Chrome.
7 #ifndef CHROME_COMMON_CHROME_SWITCHES_H_
8 #define CHROME_COMMON_CHROME_SWITCHES_H_
10 #include "build/build_config.h"
12 #include "base/base_switches.h"
13 #include "components/autofill/core/common/autofill_switches.h"
14 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_switches.h"
15 #include "components/password_manager/core/common/password_manager_switches.h"
16 #include "components/signin/core/common/signin_switches.h"
17 #include "content/public/common/content_switches.h"
21 // -----------------------------------------------------------------------------
22 // Can't find the switch you are looking for? Try looking in
23 // media/base/media_switches.cc or ui/gl/gl_switches.cc or one of the
24 // .cc files corresponding to the *_switches.h files included above
26 // -----------------------------------------------------------------------------
28 // All switches in alphabetical order. The switches should be documented
29 // alongside the definition of their values in the .cc file.
30 extern const char kAllowCrossOriginAuthPrompt
[];
31 extern const char kAllowFileAccess
[];
32 extern const char kAllowHttpScreenCapture
[];
33 extern const char kAllowInsecureLocalhost
[];
34 extern const char kAllowOutdatedPlugins
[];
35 extern const char kAllowRunningInsecureContent
[];
36 extern const char kAlternativeServiceProbabilityThreshold
[];
37 extern const char kAlwaysAuthorizePlugins
[];
38 extern const char kAppId
[];
39 extern const char kApp
[];
40 extern const char kAppsCheckoutURL
[];
41 extern const char kAppsGalleryDownloadURL
[];
42 extern const char kAppsGalleryURL
[];
43 extern const char kAppsGalleryUpdateURL
[];
44 extern const char kAppModeAuthCode
[];
45 extern const char kAppModeOAuth2Token
[];
46 extern const char kAuthExtensionPath
[];
47 extern const char kAuthServerWhitelist
[];
48 extern const char kAutoLaunchAtStartup
[];
49 extern const char kAutoSelectDesktopCaptureSource
[];
50 extern const char kBypassAppBannerEngagementChecks
[];
51 extern const char kCertificateTransparencyLog
[];
52 extern const char kCheckForUpdateIntervalSec
[];
53 extern const char kCipherSuiteBlacklist
[];
54 extern const char kCloudPrintFile
[];
55 extern const char kCloudPrintJobTitle
[];
56 extern const char kCloudPrintFileType
[];
57 extern const char kCloudPrintPrintTicket
[];
58 extern const char kCloudPrintSetupProxy
[];
59 extern const char kCrashOnHangThreads
[];
60 extern const char kCreateBrowserOnStartupForTests
[];
61 extern const char kDebugEnableFrameToggle
[];
62 extern const char kDebugPackedApps
[];
63 extern const char kDiagnostics
[];
64 extern const char kDiagnosticsFormat
[];
65 extern const char kDiagnosticsRecovery
[];
66 extern const char kDisableAboutInSettings
[];
67 extern const char kDisableAddToShelf
[];
68 extern const char kDisableAsyncDns
[];
69 extern const char kDisableBackgroundNetworking
[];
70 extern const char kDisableBundledPpapiFlash
[];
71 extern const char kDisableCastStreamingHWEncoding
[];
72 extern const char kDisableChildAccountDetection
[];
73 extern const char kDisableClientSidePhishingDetection
[];
74 extern const char kDisableComponentExtensionsWithBackgroundPages
[];
75 extern const char kDisableComponentUpdate
[];
76 extern const char kDisableDefaultApps
[];
77 extern const char kDisableDeviceDiscoveryNotifications
[];
78 extern const char kDisableDinosaurEasterEgg
[];
79 extern const char kDisableDomainReliability
[];
80 extern const char kDisableExtensionsFileAccessCheck
[];
81 extern const char kDisableExtensionsHttpThrottling
[];
82 extern const char kDisableExtensions
[];
83 extern const char kDisableFieldTrialTestingConfig
[];
84 extern const char kDisableJavaScriptHarmonyShipping
[];
85 extern const char kDisableMinimizeOnSecondLauncherItemClick
[];
86 extern const char kDisableNewBookmarkApps
[];
87 extern const char kDisableOfflineAutoReload
[];
88 extern const char kDisableOfflineAutoReloadVisibleOnly
[];
89 extern const char kDisableOutOfProcessPac
[];
90 extern const char kDisablePasswordManagerReauthentication
[];
91 extern const char kDisablePdfMaterialUI
[];
92 extern const char kDisablePermissionsBubbles
[];
93 extern const char kDisablePopupBlocking
[];
94 extern const char kDisablePreconnect
[];
95 extern const char kDisablePrintPreview
[];
96 extern const char kDisablePromptOnRepost
[];
97 extern const char kDisableQuic
[];
98 extern const char kDisableQuicPortSelection
[];
99 extern const char kDisableSavePasswordBubble
[];
100 extern const char kDisableSdchPersistence
[];
101 extern const char kDisableSessionCrashedBubble
[];
102 extern const char kDisableSiteEngagementService
[];
103 extern const char kDisableSuggestionsService
[];
104 extern const char kDisableSync
[];
105 extern const char kDisableSyncTypes
[];
106 extern const char kDisableWebResources
[];
107 extern const char kDisableZeroBrowsersOpenForTests
[];
108 extern const char kDiskCacheDir
[];
109 extern const char kDiskCacheSize
[];
110 extern const char kDnsLogDetails
[];
111 extern const char kDnsPrefetchDisable
[];
112 extern const char kDumpBrowserHistograms
[];
113 extern const char kEasyUnlockAppPath
[];
114 extern const char kEnableAddToShelf
[];
115 extern const char kEnableAppsFileAssociations
[];
116 extern const char kEnableBenchmarking
[];
117 extern const char kEnableBookmarkUndo
[];
118 extern const char kEnableChildAccountDetection
[];
119 extern const char kEnableClearBrowsingDataCounters
[];
120 extern const char kEnableCloudPrintProxy
[];
121 extern const char kEnableDevToolsExperiments
[];
122 extern const char kEnableDeviceDiscoveryNotifications
[];
123 extern const char kEnableDomDistiller
[];
124 extern const char kEnableDownloadNotification
[];
125 extern const char kEnhancedBookmarksExperiment
[];
126 extern const char kEnableDomainReliability
[];
127 extern const char kEnableEphemeralAppsInWebstore
[];
128 extern const char kEnableExperimentalHotwordHardware
[];
129 extern const char kEnableExtensionActivityLogging
[];
130 extern const char kEnableExtensionActivityLogTesting
[];
131 extern const char kEnableFastUnload
[];
132 extern const char kEnableLinkableEphemeralApps
[];
133 extern const char kEnableMaterialDesignDownloads
[];
134 extern const char kEnableMaterialDesignSettings
[];
135 extern const char kEnableMediaRouter
[];
136 extern const char kEnableNaCl
[];
137 extern const char kEnableNavigationTracing
[];
138 extern const char kEnableNetBenchmarking
[];
139 extern const char kEnableNewBookmarkApps
[];
140 extern const char kEnableOfflineAutoReload
[];
141 extern const char kEnableOfflineAutoReloadVisibleOnly
[];
142 extern const char kEnablePanels
[];
143 extern const char kEnablePdfMaterialUI
[];
144 extern const char kEnablePermissionsBubbles
[];
145 extern const char kEnablePluginPlaceholderShadowDom
[];
146 extern const char kEnablePotentiallyAnnoyingSecurityFeatures
[];
147 extern const char kEnablePowerOverlay
[];
148 extern const char kEnablePrintPreviewRegisterPromos
[];
149 extern const char kEnableProfiling
[];
150 extern const char kEnableQueryExtraction
[];
151 extern const char kEnableQuic
[];
152 extern const char kEnableQuicPortSelection
[];
153 extern const char kEnableSavePasswordBubble
[];
154 extern const char kEnableSdchPersistence
[];
155 extern const char kEnableSessionCrashedBubble
[];
156 extern const char kEnableSettingsWindow
[];
157 extern const char kDisableSettingsWindow
[];
158 extern const char kEnableSiteEngagementService
[];
159 extern const char kEnableSuggestionsService
[];
160 extern const char kEnableSupervisedUserManagedBookmarksFolder
[];
161 extern const char kEnableSyncArticles
[];
162 extern const char kEnableTabAudioMuting
[];
163 extern const char kEnableThumbnailRetargeting
[];
164 extern const char kEnableUserAlternateProtocolPorts
[];
165 extern const char kEnableWebAppFrame
[];
166 extern const char kEnableWifiCredentialSync
[];
167 extern const char kEnhancedBookmarksExperiment
[];
168 extern const char kExtensionContentVerificationBootstrap
[];
169 extern const char kExtensionContentVerificationEnforceStrict
[];
170 extern const char kExtensionContentVerificationEnforce
[];
171 extern const char kExtensionContentVerification
[];
172 extern const char kExtensionsInstallVerification
[];
173 extern const char kExtensionsNotWebstore
[];
174 extern const char kExtensionsUpdateFrequency
[];
175 extern const char kFakeVariationsChannel
[];
176 extern const char kFastStart
[];
177 extern const char kFlagSwitchesBegin
[];
178 extern const char kFlagSwitchesEnd
[];
179 extern const char kForceAppMode
[];
180 extern const char kForceFieldTrialParams
[];
181 extern const char kForceFirstRun
[];
182 extern const char kForceVariationIds
[];
183 extern const char kHistoryEnableGroupByDomain
[];
184 extern const char kHomePage
[];
185 extern const char kHostRules
[];
186 extern const char kHostResolverRetryAttempts
[];
187 extern const char kIgnoreUrlFetcherCertRequests
[];
188 extern const char kIncognito
[];
189 extern const char kInstallChromeApp
[];
190 extern const char kInstallEphemeralAppFromWebstore
[];
191 extern const char kInstallSupervisedUserWhitelists
[];
192 extern const char kInstantProcess
[];
193 extern const char kInvalidationUseGCMChannel
[];
194 extern const char kIpcDumpDirectory
[];
195 extern const char kJavaScriptHarmony
[];
196 extern const char kKeepAliveForTest
[];
197 extern const char kKioskMode
[];
198 extern const char kKioskModePrinting
[];
199 extern const char kLoadComponentExtension
[];
200 extern const char kLoadExtension
[];
201 #if !defined(OFFICIAL_BUILD)
202 extern const char kLocalNtpReload
[];
204 extern const char kMakeDefaultBrowser
[];
205 extern const char kManualEnhancedBookmarks
[];
206 extern const char kManualEnhancedBookmarksOptout
[];
207 extern const char kMarkNonSecureAs
[];
208 extern const char kMarkNonSecureAsNeutral
[];
209 extern const char kMarkNonSecureAsDubious
[];
210 extern const char kMarkNonSecureAsNonSecure
[];
211 extern const char kMediaCacheSize
[];
212 extern const char kMessageLoopHistogrammer
[];
213 extern const char kMetricsRecordingOnly
[];
214 extern const char kMonitoringDestinationID
[];
215 extern const char kNetLogCaptureMode
[];
216 extern const char kNoDefaultBrowserCheck
[];
217 extern const char kNoDisplayingInsecureContent
[];
218 extern const char kNoExperiments
[];
219 extern const char kNoFirstRun
[];
220 extern const char kNoProxyServer
[];
221 extern const char kNoPings
[];
222 extern const char kNoServiceAutorun
[];
223 extern const char kNoStartupWindow
[];
224 extern const char kNoSupervisedUserAcknowledgmentCheck
[];
225 extern const char kNumPacThreads
[];
226 extern const char kOpenInNewWindow
[];
227 extern const char kOriginToForceQuicOn
[];
228 extern const char kOriginalProcessStartTime
[];
229 extern const char kPackExtension
[];
230 extern const char kPackExtensionKey
[];
231 extern const char kParentProfile
[];
232 extern const char kPermissionRequestApiScope
[];
233 extern const char kPermissionRequestApiUrl
[];
234 extern const char kPpapiFlashPath
[];
235 extern const char kPpapiFlashVersion
[];
236 extern const char kPrerenderFromOmnibox
[];
237 extern const char kPrerenderFromOmniboxSwitchValueAuto
[];
238 extern const char kPrerenderFromOmniboxSwitchValueDisabled
[];
239 extern const char kPrerenderFromOmniboxSwitchValueEnabled
[];
240 extern const char kPrerenderMode
[];
241 extern const char kPrerenderModeSwitchValueDisabled
[];
242 extern const char kPrerenderModeSwitchValueEnabled
[];
243 extern const char kPrivetIPv6Only
[];
244 extern const char kProductVersion
[];
245 extern const char kProfileDirectory
[];
246 extern const char kProfilingAtStart
[];
247 extern const char kProfilingFile
[];
248 extern const char kProfilingFlush
[];
249 extern const char kProxyAutoDetect
[];
250 extern const char kProxyBypassList
[];
251 extern const char kProxyPacUrl
[];
252 extern const char kProxyServer
[];
253 extern const char kQuicConnectionOptions
[];
254 extern const char kQuicMaxPacketLength
[];
255 extern const char kQuicVersion
[];
256 extern const char kRemoteDebuggingTargets
[];
257 extern const char kRestoreLastSession
[];
258 extern const char kRestrictIFramePermissions
[];
259 extern const char kSavePageAsMHTML
[];
260 extern const char kSbDisableAutoUpdate
[];
261 extern const char kSbDisableDownloadProtection
[];
262 extern const char kSbDisableExtensionBlacklist
[];
263 extern const char kServiceProcess
[];
264 extern const char kSilentDebuggerExtensionAPI
[];
265 extern const char kSilentLaunch
[];
266 extern const char kShowAppList
[];
267 extern const char kShowSavedCopy
[];
268 extern const char kEnableShowSavedCopyPrimary
[];
269 extern const char kEnableShowSavedCopySecondary
[];
270 extern const char kDisableShowSavedCopy
[];
271 extern const char kSimulateElevatedRecovery
[];
272 extern const char kSimulateUpgrade
[];
273 extern const char kSimulateCriticalUpdate
[];
274 extern const char kSimulateOutdated
[];
275 extern const char kSimulateOutdatedNoAU
[];
276 extern const char kSpeculativeResourcePrefetching
[];
277 extern const char kSpeculativeResourcePrefetchingDisabled
[];
278 extern const char kSpeculativeResourcePrefetchingEnabled
[];
279 extern const char kSpeculativeResourcePrefetchingLearning
[];
280 #if defined(ENABLE_SPELLCHECK)
281 #if defined(OS_ANDROID)
282 extern const char kEnableAndroidSpellChecker
[];
284 extern const char kEnableMultilingualSpellChecker
[];
285 extern const char kEnableSpellingAutoCorrect
[];
286 extern const char kEnableSpellingFeedbackFieldTrial
[];
287 extern const char kSpellingServiceFeedbackUrl
[];
288 extern const char kSpellingServiceFeedbackIntervalSeconds
[];
290 extern const char kSSLVersionMax
[];
291 extern const char kSSLVersionMin
[];
292 extern const char kSSLVersionFallbackMin
[];
293 extern const char kSSLVersionTLSv1
[];
294 extern const char kSSLVersionTLSv11
[];
295 extern const char kSSLVersionTLSv12
[];
296 extern const char kStartMaximized
[];
297 extern const char kSupervisedUserId
[];
298 extern const char kSupervisedUserSafeSites
[];
299 extern const char kSupervisedUserSyncToken
[];
300 extern const char kSyncShortInitialRetryOverride
[];
301 extern const char kSyncServiceURL
[];
302 extern const char kSyncDisableDeferredStartup
[];
303 extern const char kSyncDeferredStartupTimeoutSeconds
[];
304 extern const char kSyncEnableGetUpdateAvoidance
[];
305 extern const char kSyncEnableClearDataOnPassphraseEncryption
[];
306 extern const char kSyncDisableBackup
[];
307 extern const char kSyncDisableRollback
[];
308 extern const char kTestName
[];
309 extern const char kTrustedSpdyProxy
[];
310 extern const char kTryChromeAgain
[];
311 extern const char kUnlimitedStorage
[];
312 extern const char kUnsafelyTreatInsecureOriginAsSecure
[];
313 extern const char kUseSimpleCacheBackend
[];
314 extern const char kUseSpdy
[];
315 extern const char kUserAgent
[];
316 extern const char kUserDataDir
[];
317 extern const char kV8PacMojoInProcess
[];
318 extern const char kV8PacMojoOutOfProcess
[];
319 extern const char kValidateCrx
[];
320 extern const char kVariationsServerURL
[];
321 extern const char kVersion
[];
322 extern const char kWindowPosition
[];
323 extern const char kWindowSize
[];
324 extern const char kWinHttpProxyResolver
[];
325 extern const char kWinJumplistAction
[];
327 #if defined(OS_ANDROID)
328 extern const char kAuthAndroidNegotiateAccountType
[];
329 extern const char kDisableCast
[];
330 extern const char kDisableContextualSearch
[];
331 extern const char kDisableZeroSuggest
[];
332 extern const char kEnableAccessibilityTabSwitcher
[];
333 extern const char kEnableContextualSearch
[];
334 extern const char kEnableDomDistillerButtonAnimation
[];
335 extern const char kEnableHostedMode
[];
336 extern const char kEnableReaderModeToolbarIcon
[];
337 extern const char kEnableZeroSuggestMostVisited
[];
338 extern const char kEnableZeroSuggestMostVisitedWithoutSerp
[];
339 extern const char kPrefetchSearchResults
[];
340 #endif // defined(OS_ANDROID)
343 extern const char kOpenAsh
[];
346 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_CHROMEOS)
347 extern const char kHelp
[];
348 extern const char kHelpShort
[];
349 extern const char kPasswordStore
[];
352 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
353 extern const char kMigrateDataDirForSxS
[];
356 #if defined(OS_MACOSX)
357 extern const char kAppsKeepChromeAliveInTests
[];
358 extern const char kHostedAppQuitNotification
[];
359 extern const char kDisableAppInfoDialogMac
[];
360 extern const char kDisableAppWindowCycling
[];
361 extern const char kDisableHostedAppShimCreation
[];
362 extern const char kDisableMacViewsNativeAppWindows
[];
363 extern const char kEnableAppInfoDialogMac
[];
364 extern const char kEnableAppWindowCycling
[];
365 extern const char kEnableMacViewsNativeAppWindows
[];
366 extern const char kEnableTranslateNewUX
[];
367 extern const char kMetricsClientID
[];
368 extern const char kRelauncherProcess
[];
369 #endif // defined(OS_MACOSX)
372 extern const char kEnableCloudPrintXps
[];
373 extern const char kEnableProfileShortcutManager
[];
374 extern const char kForceDesktop
[];
375 extern const char kForceImmersive
[];
376 extern const char kHideIcons
[];
377 extern const char kNoNetworkProfileWarning
[];
378 extern const char kRelaunchShortcut
[];
379 extern const char kShowIcons
[];
380 extern const char kUninstall
[];
381 extern const char kViewerLaunchViaAppId
[];
382 extern const char kWaitForMutex
[];
383 extern const char kWindows8Search
[];
384 #endif // defined(OS_WIN)
386 #if defined(OS_WIN) || defined(OS_MACOSX)
387 extern const char kEnableTabDiscarding
[];
388 #endif // defined(OS_WIN) || defined(OS_MACOSX)
390 #if defined(ENABLE_IPC_FUZZER)
391 extern const char kIpcFuzzerTestcase
[];
394 #if defined(ENABLE_PRINT_PREVIEW) && !defined(OFFICIAL_BUILD)
395 extern const char kDebugPrint
[];
398 #if defined(ENABLE_PLUGINS)
399 extern const char kAllowNaClCrxFsAPI
[];
400 extern const char kAllowNaClFileHandleAPI
[];
401 extern const char kAllowNaClSocketAPI
[];
402 extern const char kDisablePluginPowerSaver
[];
403 extern const char kEnablePluginPowerSaver
[];
406 #if defined(ENABLE_TASK_MANAGER)
407 extern const char kEnableNewTaskManager
[];
408 #endif // defined(ENABLE_TASK_MANAGER)
410 bool AboutInSettingsEnabled();
411 bool MdDownloadsEnabled();
412 bool MdSettingsEnabled();
413 bool MediaRouterEnabled();
414 bool PdfMaterialUIEnabled();
415 bool SettingsWindowEnabled();
417 #if defined(OS_CHROMEOS)
418 bool PowerOverlayEnabled();
421 #if defined(ENABLE_TASK_MANAGER)
422 bool NewTaskManagerEnabled();
423 #endif // defined(ENABLE_TASK_MANAGER)
425 // DON'T ADD RANDOM STUFF HERE. Put it in the main section above in
426 // alphabetical order, or in one of the ifdefs (also in order in each section).
428 } // namespace switches
430 #endif // CHROME_COMMON_CHROME_SWITCHES_H_