ash_switches.cc 43 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027
  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. #include "ash/constants/ash_switches.h"
  5. #include <string>
  6. #include "base/command_line.h"
  7. #include "base/cxx17_backports.h"
  8. #include "base/metrics/field_trial.h"
  9. #include "base/strings/string_number_conversions.h"
  10. #include "base/time/time.h"
  11. namespace ash {
  12. namespace switches {
  13. namespace {
  14. // Max and min number of seconds that must pass between showing user contextual
  15. // nudges when override switch is set.
  16. constexpr base::TimeDelta kAshContextualNudgesMinInterval = base::Seconds(0);
  17. constexpr base::TimeDelta kAshContextualNudgesMaxInterval = base::Seconds(60);
  18. } // namespace
  19. // Please keep the order of these switches synchronized with the header file
  20. // (i.e. in alphabetical order).
  21. const char kAggressiveCacheDiscardThreshold[] = "aggressive-cache-discard";
  22. // If this flag is passed, failed policy fetches will not cause profile
  23. // initialization to fail. This is useful for tests because it means that
  24. // tests don't have to mock out the policy infrastructure.
  25. const char kAllowFailedPolicyFetchForTest[] =
  26. "allow-failed-policy-fetch-for-test";
  27. // When this flag is set, the OS installation UI can be accessed. This
  28. // allows the user to install from USB to disk.
  29. const char kAllowOsInstall[] = "allow-os-install";
  30. // Allows remote attestation (RA) in dev mode for testing purpose. Usually RA
  31. // is disabled in dev mode because it will always fail. However, there are cases
  32. // in testing where we do want to go through the permission flow even in dev
  33. // mode. This can be enabled by this flag.
  34. const char kAllowRAInDevMode[] = "allow-ra-in-dev-mode";
  35. // Causes HDCP of the specified type to always be enabled when an external
  36. // display is connected. Used for HDCP compliance testing on ChromeOS.
  37. const char kAlwaysEnableHdcp[] = "always-enable-hdcp";
  38. // Specifies whether an app launched in kiosk mode was auto launched with zero
  39. // delay. Used in order to properly restore auto-launched state during session
  40. // restore flow.
  41. const char kAppAutoLaunched[] = "app-auto-launched";
  42. // Path for app's OEM manifest file.
  43. const char kAppOemManifestFile[] = "app-mode-oem-manifest";
  44. // Signals ARC support status on this device. This can take one of the
  45. // following three values.
  46. // - none: ARC is not installed on this device. (default)
  47. // - installed: ARC is installed on this device, but not officially supported.
  48. // Users can enable ARC only when Finch experiment is turned on.
  49. // - officially-supported: ARC is installed and supported on this device. So
  50. // users can enable ARC via settings etc.
  51. const char kArcAvailability[] = "arc-availability";
  52. // DEPRECATED: Please use --arc-availability=installed.
  53. // Signals the availability of the ARC instance on this device.
  54. const char kArcAvailable[] = "arc-available";
  55. // Flag that forces ARC data be cleaned on each start.
  56. const char kArcDataCleanupOnStart[] = "arc-data-cleanup-on-start";
  57. // Flag that disables ARC app sync flow that installs some apps silently. Used
  58. // in autotests to resolve racy conditions.
  59. const char kArcDisableAppSync[] = "arc-disable-app-sync";
  60. // Flag that disables ARC download provider that prevents extra content to be
  61. // downloaded and installed in context of Play Store and GMS Core.
  62. const char kArcDisableDownloadProvider[] = "arc-disable-download-provider";
  63. // Used in autotest to disable GMS-core caches which is on by default.
  64. const char kArcDisableGmsCoreCache[] = "arc-disable-gms-core-cache";
  65. // Flag that disables ARC locale sync with Android container. Used in autotest
  66. // to prevent conditions when certain apps, including Play Store may get
  67. // restarted. Restarting Play Store may cause random test failures. Enabling
  68. // this flag would also forces ARC container to use 'en-US' as a locale and
  69. // 'en-US,en' as preferred languages.
  70. const char kArcDisableLocaleSync[] = "arc-disable-locale-sync";
  71. // Used to disable GMS scheduling of media store periodic indexing and corpora
  72. // maintenance tasks. Used in performance tests to prevent running during
  73. // testing which can cause unstable results or CPU not idle pre-test failures.
  74. const char kArcDisableMediaStoreMaintenance[] =
  75. "arc-disable-media-store-maintenance";
  76. // Flag that disables ARC Play Auto Install flow that installs set of predefined
  77. // apps silently. Used in autotests to resolve racy conditions.
  78. const char kArcDisablePlayAutoInstall[] = "arc-disable-play-auto-install";
  79. // Used in autotest to disable TTS cache which is on by default.
  80. const char kArcDisableTtsCache[] = "arc-disable-tts-cache";
  81. // Flag that disables ureadahead completely, including host and guest parts.
  82. // See also |kArcVmUreadaheadMode|.
  83. const char kArcDisableUreadahead[] = "arc-disable-ureadahead";
  84. // Flag that forces the OptIn ui to be shown. Used in tests.
  85. const char kArcForceShowOptInUi[] = "arc-force-show-optin-ui";
  86. // Flag that enables developer options needed to generate an ARC Play Auto
  87. // Install roster. Used manually by developers.
  88. const char kArcGeneratePlayAutoInstall[] = "arc-generate-play-auto-install";
  89. // Write ARC++ install events to chrome log for integration test.
  90. const char kArcInstallEventChromeLogForTests[] =
  91. "arc-install-event-chrome-log-for-tests";
  92. // Used in autotest to specifies how to handle packages cache. Can be
  93. // copy - copy resulting packages.xml to the temporary directory.
  94. // skip-copy - skip initial packages cache setup and copy resulting packages.xml
  95. // to the temporary directory.
  96. const char kArcPackagesCacheMode[] = "arc-packages-cache-mode";
  97. // Used in autotest to forces Play Store auto-update state. Can be
  98. // on - auto-update is forced on.
  99. // off - auto-update is forced off.
  100. const char kArcPlayStoreAutoUpdate[] = "arc-play-store-auto-update";
  101. // Set the scale for ARC apps. This is in DPI. e.g. 280 DPI is ~ 1.75 device
  102. // scale factor.
  103. // See
  104. // https://source.android.com/compatibility/android-cdd#3_7_runtime_compatibility
  105. // for list of supported DPI values.
  106. const char kArcScale[] = "arc-scale";
  107. // Defines how to start ARC. This can take one of the following values:
  108. // - always-start automatically start with Play Store UI support.
  109. // - always-start-with-no-play-store automatically start without Play Store UI.
  110. // If it is not set, then ARC is started in default mode.
  111. const char kArcStartMode[] = "arc-start-mode";
  112. // Sets ARC Terms Of Service hostname url for testing.
  113. const char kArcTosHostForTests[] = "arc-tos-host-for-tests";
  114. // Sets the mode of operation for ureadahead during ARCVM boot. If this switch
  115. // is not set, ARCVM ureadahead will check for the presence and age of pack
  116. // file and reads ahead files to page cache for improved boot performance.
  117. // generate - used during Android PFQ data collector to pre-generate pack file
  118. // and upload to Google Cloud as build artifact for CrOS build image.
  119. // disabled - used for test purpose to disable ureadahead during ARCVM boot.
  120. // note, |kArcDisableUreadahead| also disables both, guest and host
  121. // parts of ureadahead.
  122. const char kArcVmUreadaheadMode[] = "arcvm-ureadahead-mode";
  123. // Madvises the kernel to use Huge Pages for guest memory.
  124. const char kArcVmUseHugePages[] = "arcvm-use-hugepages";
  125. // Clear the fast ink buffer upon creation. This is needed on some devices that
  126. // do not zero out new buffers.
  127. const char kAshClearFastInkBuffer[] = "ash-clear-fast-ink-buffer";
  128. // Force the pointer (cursor) position to be kept inside root windows.
  129. const char kAshConstrainPointerToRoot[] = "ash-constrain-pointer-to-root";
  130. // Overrides the minimum time that must pass between showing user contextual
  131. // nudges. Unit of time is in seconds.
  132. const char kAshContextualNudgesInterval[] = "ash-contextual-nudges-interval";
  133. // Reset contextual nudge shown count on login.
  134. const char kAshContextualNudgesResetShownCount[] =
  135. "ash-contextual-nudges-reset-shown-count";
  136. // Enable keyboard shortcuts useful for debugging.
  137. const char kAshDebugShortcuts[] = "ash-debug-shortcuts";
  138. // Enable keyboard shortcuts used by developers only.
  139. const char kAshDeveloperShortcuts[] = "ash-dev-shortcuts";
  140. // Disable the Touch Exploration Mode. Touch Exploration Mode will no longer be
  141. // turned on automatically when spoken feedback is enabled when this flag is
  142. // set.
  143. const char kAshDisableTouchExplorationMode[] =
  144. "ash-disable-touch-exploration-mode";
  145. // Enable cursor motion blur.
  146. const char kAshEnableCursorMotionBlur[] = "ash-enable-cursor-motion-blur";
  147. // Enables key bindings to scroll magnified screen.
  148. const char kAshEnableMagnifierKeyScroller[] =
  149. "ash-enable-magnifier-key-scroller";
  150. // Enables the palette on every display, instead of only the internal one.
  151. const char kAshEnablePaletteOnAllDisplays[] =
  152. "ash-enable-palette-on-all-displays";
  153. // If the flag is present, it indicates 1) the device has accelerometer and 2)
  154. // the device is a convertible device or a tablet device (thus is capable of
  155. // entering tablet mode). If this flag is not set, then the device is not
  156. // capable of entering tablet mode. For example, Samus has accelerometer, but
  157. // is not a covertible or tablet, thus doesn't have this flag set, thus can't
  158. // enter tablet mode.
  159. const char kAshEnableTabletMode[] = "enable-touchview";
  160. // Enable the wayland server.
  161. const char kAshEnableWaylandServer[] = "enable-wayland-server";
  162. // Enables the stylus tools next to the status area.
  163. const char kAshForceEnableStylusTools[] = "force-enable-stylus-tools";
  164. // Forces the status area to allow collapse/expand regardless of the current
  165. // state.
  166. const char kAshForceStatusAreaCollapsible[] = "force-status-area-collapsible";
  167. // Hides notifications that are irrelevant to Chrome OS device factory testing,
  168. // such as battery level updates.
  169. const char kAshHideNotificationsForFactory[] =
  170. "ash-hide-notifications-for-factory";
  171. // Hides educational nudges that can interfere with tast integration tests.
  172. // Somewhat similar to --no-first-run but affects system UI behavior, not
  173. // browser behavior.
  174. const char kAshNoNudges[] = "ash-no-nudges";
  175. // Power button position includes the power button's physical display side and
  176. // the percentage for power button center position to the display's
  177. // width/height in landscape_primary screen orientation. The value is a JSON
  178. // object containing a "position" property with the value "left", "right",
  179. // "top", or "bottom". For "left" and "right", a "y" property specifies the
  180. // button's center position as a fraction of the display's height (in [0.0,
  181. // 1.0]) relative to the top of the display. For "top" and "bottom", an "x"
  182. // property gives the position as a fraction of the display's width relative to
  183. // the left side of the display.
  184. const char kAshPowerButtonPosition[] = "ash-power-button-position";
  185. // The physical position info of the side volume button while in landscape
  186. // primary screen orientation. The value is a JSON object containing a "region"
  187. // property with the value "keyboard", "screen" and a "side" property with the
  188. // value "left", "right", "top", "bottom".
  189. const char kAshSideVolumeButtonPosition[] = "ash-side-volume-button-position";
  190. // Enables the heads-up display for tracking touch points.
  191. const char kAshTouchHud[] = "ash-touch-hud";
  192. // Enables required things for the selected UI mode, regardless of whether the
  193. // Chromebook is currently in the selected UI mode.
  194. const char kAshUiMode[] = "force-tablet-mode";
  195. // Values for the kAshUiMode flag.
  196. const char kAshUiModeClamshell[] = "clamshell";
  197. const char kAshUiModeTablet[] = "touch_view";
  198. // Makes ash use ChromeOS mojo service manager as the mojo broker.
  199. const char kAshUseCrOSMojoServiceManager[] =
  200. "ash-use-cros-mojo-service-manager";
  201. // (Most) Chrome OS hardware reports ACPI power button releases correctly.
  202. // Standard hardware reports releases immediately after presses. If set, we
  203. // lock the screen or shutdown the system immediately in response to a press
  204. // instead of displaying an interactive animation.
  205. const char kAuraLegacyPowerButton[] = "aura-legacy-power-button";
  206. // If this flag is set, it indicates that this device is a "Cellular First"
  207. // device. Cellular First devices use cellular telephone data networks as
  208. // their primary means of connecting to the internet.
  209. // Setting this flag has two consequences:
  210. // 1. Cellular data roaming will be enabled by default.
  211. // 2. UpdateEngine will be instructed to allow auto-updating over cellular
  212. // data connections.
  213. const char kCellularFirst[] = "cellular-first";
  214. // Default large wallpaper to use for kids accounts (as path to trusted,
  215. // non-user-writable JPEG file).
  216. const char kChildWallpaperLarge[] = "child-wallpaper-large";
  217. // Default small wallpaper to use for kids accounts (as path to trusted,
  218. // non-user-writable JPEG file).
  219. const char kChildWallpaperSmall[] = "child-wallpaper-small";
  220. // Forces CrOS region value.
  221. const char kCrosRegion[] = "cros-region";
  222. // Overrides the url for fetching a reauth request token for Cryptohome recovery
  223. // flow.
  224. const char kCryptohomeRecoveryReauthUrl[] = "cryptohome-recovery-reauth-url";
  225. // Controls if AuthSession API should be used when interacting with cryptohomed.
  226. const char kCryptohomeUseAuthSession[] = "cryptohome-use-authsession";
  227. // Forces cryptohome to create new users using old (ecryptfs) encryption.
  228. // This switch can be used to set up configurations that can be used to
  229. // test encryption migration scenarios.
  230. const char kCryptohomeUseOldEncryptionForTesting[] =
  231. "cryptohome-use-old-encryption-for-testing";
  232. // Indicates that the wallpaper images specified by
  233. // kAshDefaultWallpaper{Large,Small} are OEM-specific (i.e. they are not
  234. // downloadable from Google).
  235. const char kDefaultWallpaperIsOem[] = "default-wallpaper-is-oem";
  236. // Default large wallpaper to use (as path to trusted, non-user-writable JPEG
  237. // file).
  238. const char kDefaultWallpaperLarge[] = "default-wallpaper-large";
  239. // Default small wallpaper to use (as path to trusted, non-user-writable JPEG
  240. // file).
  241. const char kDefaultWallpaperSmall[] = "default-wallpaper-small";
  242. // App ID to use for highlights app in demo mode.
  243. const char kDemoModeHighlightsApp[] = "demo-mode-highlights-extension";
  244. // App ID to use for screensaver app in demo mode.
  245. const char kDemoModeScreensaverApp[] = "demo-mode-screensaver-extension";
  246. // Time in seconds before a machine at OOBE is considered derelict.
  247. const char kDerelictDetectionTimeout[] = "derelict-detection-timeout";
  248. // Time in seconds before a derelict machines starts demo mode.
  249. const char kDerelictIdleTimeout[] = "derelict-idle-timeout";
  250. // Prevents any CPU restrictions being set on ARC[VM]. Only meant to be used by
  251. // tests as some tests may time out if the ARC container is throttled.
  252. const char kDisableArcCpuRestriction[] = "disable-arc-cpu-restriction";
  253. // Disables android user data wipe on opt out.
  254. const char kDisableArcDataWipe[] = "disable-arc-data-wipe";
  255. // Disables ARC Opt-in verification process and ARC is enabled by default.
  256. const char kDisableArcOptInVerification[] = "disable-arc-opt-in-verification";
  257. // Disables the Chrome OS demo.
  258. const char kDisableDemoMode[] = "disable-demo-mode";
  259. // If this switch is set, the device cannot be remotely disabled by its owner.
  260. const char kDisableDeviceDisabling[] = "disable-device-disabling";
  261. // Disables fine grained time zone detection.
  262. const char kDisableFineGrainedTimeZoneDetection[] =
  263. "disable-fine-grained-time-zone-detection";
  264. // Disables GAIA services such as enrollment and OAuth session restore. Used by
  265. // 'fake' telemetry login.
  266. const char kDisableGaiaServices[] = "disable-gaia-services";
  267. // Disables HID-detection OOBE screen.
  268. const char kDisableHIDDetectionOnOOBEForTesting[] =
  269. "disable-hid-detection-on-oobe";
  270. // Disables the Lacros keep alive for testing.
  271. const char kDisableLacrosKeepAliveForTesting[] = "disable-lacros-keep-alive";
  272. // Avoid doing expensive animations upon login.
  273. const char kDisableLoginAnimations[] = "disable-login-animations";
  274. // If Lacros is set to the primary web browser, on session login, it is
  275. // automatically launched. This disables the feature, i.e., if this flag is
  276. // set, even if lacros is the primary web browser, it won't automatically
  277. // launch on session login. This is for testing purpose, specifically for Tast.
  278. const char kDisableLoginLacrosOpening[] = "disable-login-lacros-opening";
  279. // Disables requests for an enterprise machine certificate during attestation.
  280. const char kDisableMachineCertRequest[] = "disable-machine-cert-request";
  281. // Disables the ChromeVox hint idle detection in OOBE, which can lead to
  282. // unexpected behavior during tests.
  283. const char kDisableOOBEChromeVoxHintTimerForTesting[] =
  284. "disable-oobe-chromevox-hint-timer-for-testing";
  285. // Disables network screen skip check which is based on ethernet connection.
  286. const char kDisableOOBENetworkScreenSkippingForTesting[] =
  287. "disable-oobe-network-screen-skipping-for-testing";
  288. // Disables per-user timezone.
  289. const char kDisablePerUserTimezone[] = "disable-per-user-timezone";
  290. // Disables rollback option on reset screen.
  291. const char kDisableRollbackOption[] = "disable-rollback-option";
  292. // Disables client certificate authentication on the sign-in frame on the Chrome
  293. // OS sign-in profile.
  294. // TODO(https://crbug.com/844022): Remove this flag when reaching endpoints that
  295. // request client certs does not hang anymore when there is no system token yet.
  296. const char kDisableSigninFrameClientCerts[] =
  297. "disable-signin-frame-client-certs";
  298. // Disables volume adjust sound.
  299. const char kDisableVolumeAdjustSound[] = "disable-volume-adjust-sound";
  300. // DEPRECATED. Please use --arc-availability=officially-supported.
  301. // Enables starting the ARC instance upon session start.
  302. const char kEnableArc[] = "enable-arc";
  303. // Enables ARCVM.
  304. const char kEnableArcVm[] = "enable-arcvm";
  305. // Enables ARCVM realtime VCPU feature.
  306. const char kEnableArcVmRtVcpu[] = "enable-arcvm-rt-vcpu";
  307. // Enables the Cast Receiver.
  308. const char kEnableCastReceiver[] = "enable-cast-receiver";
  309. // Enables consumer kiosk mode for Chrome OS.
  310. const char kEnableConsumerKiosk[] = "enable-consumer-kiosk";
  311. // Enables Shelf Dimming for ChromeOS.
  312. const char kEnableDimShelf[] = "enable-dim-shelf";
  313. // Enables sharing assets for installed default apps.
  314. const char kEnableExtensionAssetsSharing[] = "enable-extension-assets-sharing";
  315. // Enables the use of 32-bit Houdini library for ARM binary translation.
  316. const char kEnableHoudini[] = "enable-houdini";
  317. // Enables the use of 64-bit Houdini library for ARM binary translation.
  318. const char kEnableHoudini64[] = "enable-houdini64";
  319. // Enables the use of Houdini DLC library for ARM binary translation. This is
  320. // independent of choosing between the 32-bit vs 64-bit Houdini library. Houdini
  321. // DLC library will be downloaded and installed at run-time instead of at build
  322. // time.
  323. const char kEnableHoudiniDlc[] = "enable-houdini-dlc";
  324. // Enables the use of 32-bit NDK translation library for ARM binary translation.
  325. const char kEnableNdkTranslation[] = "enable-ndk-translation";
  326. // Enables the use of 64-bit NDK translation library for ARM binary translation.
  327. const char kEnableNdkTranslation64[] = "enable-ndk-translation64";
  328. // Enables the ChromeVox hint in OOBE for dev mode. This flag is used
  329. // to override the default dev mode behavior of disabling the feature.
  330. // If both kEnableOOBEChromeVoxHintForDevMode and
  331. // kDisableOOBEChromeVoxHintTimerForTesting are present, the ChromeVox hint
  332. // will be disabled, since the latter flag takes precedence over the former.
  333. const char kEnableOOBEChromeVoxHintForDevMode[] =
  334. "enable-oobe-chromevox-hint-timer-for-dev-mode";
  335. // Enables OOBE testing API for tast tests.
  336. const char kEnableOobeTestAPI[] = "enable-oobe-test-api";
  337. // Enables configuring the OEM Device Requisition in the OOBE.
  338. const char kEnableRequisitionEdits[] = "enable-requisition-edits";
  339. // Enables tablet form factor.
  340. const char kEnableTabletFormFactor[] = "enable-tablet-form-factor";
  341. // Enables the touch calibration option in MD settings UI for valid touch
  342. // displays.
  343. const char kEnableTouchCalibrationSetting[] =
  344. "enable-touch-calibration-setting";
  345. // Enables touchpad three-finger-click as middle button.
  346. const char kEnableTouchpadThreeFingerClick[] =
  347. "enable-touchpad-three-finger-click";
  348. // Disables ARC for managed accounts.
  349. const char kEnterpriseDisableArc[] = "enterprise-disable-arc";
  350. // Whether to enable forced enterprise re-enrollment.
  351. const char kEnterpriseEnableForcedReEnrollment[] =
  352. "enterprise-enable-forced-re-enrollment";
  353. // Whether to enable initial enterprise enrollment.
  354. const char kEnterpriseEnableInitialEnrollment[] =
  355. "enterprise-enable-initial-enrollment";
  356. // Whether to use fake PSM (private set membership) RLWE client for testing
  357. // purposes.
  358. const char kEnterpriseUseFakePsmRlweClientForTesting[] =
  359. "enterprise-use-fake-psm-rlwe-client-for-testing";
  360. // Enables the zero-touch enterprise enrollment flow.
  361. const char kEnterpriseEnableZeroTouchEnrollment[] =
  362. "enterprise-enable-zero-touch-enrollment";
  363. // Power of the power-of-2 initial modulus that will be used by the
  364. // auto-enrollment client. E.g. "4" means the modulus will be 2^4 = 16.
  365. const char kEnterpriseEnrollmentInitialModulus[] =
  366. "enterprise-enrollment-initial-modulus";
  367. // Power of the power-of-2 maximum modulus that will be used by the
  368. // auto-enrollment client.
  369. const char kEnterpriseEnrollmentModulusLimit[] =
  370. "enterprise-enrollment-modulus-limit";
  371. // Disallow blocking developer mode through enterprise device policy:
  372. // - Fail enterprise enrollment if enrolling would block dev mode.
  373. // - Don't apply new device policy if it would block dev mode.
  374. // This is only usable on test builds.
  375. const char kDisallowPolicyBlockDevMode[] = "disallow-policy-block-dev-mode";
  376. // Write extension install events to chrome log for integration test.
  377. const char kExtensionInstallEventChromeLogForTests[] =
  378. "extension-install-event-chrome-log-for-tests";
  379. // Interval in seconds between Chrome reading external metrics from
  380. // /var/lib/metrics/uma-events.
  381. const char kExternalMetricsCollectionInterval[] =
  382. "external-metrics-collection-interval";
  383. // Name of a subdirectory of the main external web apps directory which
  384. // additional web apps configs should be loaded from. Used to load
  385. // device-specific web apps.
  386. const char kExtraWebAppsDir[] = "extra-web-apps-dir";
  387. // Specifies number of recommended (fake) ARC apps during user onboarding.
  388. // App descriptions are generated locally instead of being fetched from server.
  389. // Limited to ChromeOS-on-linux and test images only.
  390. const char kFakeArcRecommendedAppsForTesting[] =
  391. "fake-arc-recommended-apps-for-testing";
  392. // An absolute path to the chroot hosting the DriveFS to use. This is only used
  393. // when running on Linux, i.e. when IsRunningOnChromeOS() returns false.
  394. const char kFakeDriveFsLauncherChrootPath[] =
  395. "fake-drivefs-launcher-chroot-path";
  396. // A relative path to socket to communicat with the fake DriveFS launcher within
  397. // the chroot specified by kFakeDriveFsLauncherChrootPath. This is only used
  398. // when running on Linux, i.e. when IsRunningOnChromeOS() returns false.
  399. const char kFakeDriveFsLauncherSocketPath[] =
  400. "fake-drivefs-launcher-socket-path";
  401. // Fingerprint sensor location indicates the physical sensor's location. The
  402. // value is a string with possible values: "power-button-top-left",
  403. // "keyboard-bottom-left", keyboard-bottom-right", "keyboard-top-right".
  404. const char kFingerprintSensorLocation[] = "fingerprint-sensor-location";
  405. // Passed to Chrome the first time that it's run after the system boots.
  406. // Not passed on restart after sign out.
  407. const char kFirstExecAfterBoot[] = "first-exec-after-boot";
  408. // Forces fetching tokens for Cryptohome Recovery.
  409. const char kForceCryptohomeRecoveryForTesting[] =
  410. "force-cryptohome-recovery-for-testing";
  411. // Forces developer tools availability, no matter what values the enterprise
  412. // policies DeveloperToolsDisabled and DeveloperToolsAvailability are set to.
  413. const char kForceDevToolsAvailable[] = "force-devtools-available";
  414. // Forces first-run UI to be shown for every login.
  415. const char kForceFirstRunUI[] = "force-first-run-ui";
  416. // Forces Hardware ID check (happens during OOBE) to fail or succeed. Possible
  417. // values: "failure" or "success". Should be used only for testing.
  418. const char kForceHWIDCheckResultForTest[] = "force-hwid-check-result-for-test";
  419. // Force enables the Happiness Tracking System for the device. This ignores
  420. // user profile check and time limits and shows the notification every time
  421. // for any type of user. Should be used only for testing.
  422. const char kForceHappinessTrackingSystem[] = "force-happiness-tracking-system";
  423. // Forces FullRestoreService to launch browser for telemetry tests.
  424. const char kForceLaunchBrowser[] = "force-launch-browser";
  425. // Usually in browser tests the usual login manager bringup is skipped so that
  426. // tests can change how it's brought up. This flag disables that.
  427. const char kForceLoginManagerInTests[] = "force-login-manager-in-tests";
  428. // Force system compositor mode when set.
  429. const char kForceSystemCompositorMode[] = "force-system-compositor-mode";
  430. // If set, tablet-like power button behavior (i.e. tapping the button turns the
  431. // screen off) is used even if the device is in laptop mode.
  432. const char kForceTabletPowerButton[] = "force-tablet-power-button";
  433. // Specifies the device's form factor. If provided, this flag overrides the
  434. // value from the LSB release info. Possible values are: "CHROMEBASE",
  435. // "CHROMEBIT", "CHROMEBOOK", "REFERENCE", "CHROMEBOX"
  436. const char kFormFactor[] = "form-factor";
  437. // Sets the throttle fps for compositor frame submission.
  438. const char kFrameThrottleFps[] = "frame-throttle-fps";
  439. // Indicates that the browser is in "browse without sign-in" (Guest session)
  440. // mode. Should completely disable extensions, sync and bookmarks.
  441. const char kGuestSession[] = "bwsi";
  442. // Large wallpaper to use in guest mode (as path to trusted, non-user-writable
  443. // JPEG file).
  444. const char kGuestWallpaperLarge[] = "guest-wallpaper-large";
  445. // Small wallpaper to use in guest mode (as path to trusted, non-user-writable
  446. // JPEG file).
  447. const char kGuestWallpaperSmall[] = "guest-wallpaper-small";
  448. // If set, the system is a Chromebook with a "standard Chrome OS keyboard",
  449. // which generally means one with a Search key in the standard Caps Lock
  450. // location above the Left Shift key. It should be unset for Chromebooks with
  451. // both Search and Caps Lock keys (e.g. stout) and for devices like Chromeboxes
  452. // that only use external keyboards.
  453. const char kHasChromeOSKeyboard[] = "has-chromeos-keyboard";
  454. // Whether this device that has hps.
  455. const char kHasHps[] = "has-hps";
  456. // Whether this device has an internal stylus.
  457. const char kHasInternalStylus[] = "has-internal-stylus";
  458. // If set, the system is a Chromebook with a number pad as part of its internal
  459. // keyboard.
  460. const char kHasNumberPad[] = "has-number-pad";
  461. // Defines user homedir. This defaults to primary user homedir.
  462. const char kHomedir[] = "homedir";
  463. // If set, the "ignore_dev_conf" field in StartArcVmRequest message will
  464. // consequently be set such that all development configuration directives in
  465. // /usr/local/vms/etc/arcvm_dev.conf will be ignored during ARCVM start.
  466. const char kIgnoreArcVmDevConf[] = "ignore-arcvm-dev-conf";
  467. // If true, profile selection in UserManager will always return active user's
  468. // profile.
  469. // TODO(nkostlyev): http://crbug.com/364604 - Get rid of this switch after we
  470. // turn on multi-profile feature on ChromeOS.
  471. const char kIgnoreUserProfileMappingForTests[] =
  472. "ignore-user-profile-mapping-for-tests";
  473. // If true, the time dependent views (such as the time view) show with the
  474. // predefined fixed time.
  475. const char kStabilizeTimeDependentViewForTests[] =
  476. "stabilize-time-dependent-view-for-tests";
  477. // Decreases delay in uploading installation event logs for integration test.
  478. const char kInstallLogFastUploadForTests[] =
  479. "install-log-fast-upload-for-tests";
  480. // When specified, Chrome OS will install a System Extension from the specified
  481. // directory. For now, only one extension can be specified.
  482. const char kInstallSystemExtension[] = "install-system-extension";
  483. // When this flag is set, the lacros-availability policy is ignored.
  484. const char kLacrosAvailabilityIgnore[] = "lacros-availability-ignore";
  485. // If this switch is set, then ash-chrome will pass additional arguments when
  486. // launching lacros-chrome. The string '####' is used as a delimiter. Example:
  487. // --lacros-chrome-additional-args="--foo=5####--bar=/tmp/dir name". Will
  488. // result in two arguments passed to lacros-chrome:
  489. // --foo=5
  490. // --bar=/tmp/dir name
  491. const char kLacrosChromeAdditionalArgs[] = "lacros-chrome-additional-args";
  492. // If this switch is set, then ash-chrome will read from the provided path
  493. // and pass additional arguments when launching lacros-chrome. Each non-empty
  494. // line in the file will be treated as an argument. Example file contents:
  495. // --foo=5
  496. // --bar=/tmp/dir name
  497. const char kLacrosChromeAdditionalArgsFile[] =
  498. "lacros-chrome-additional-args-file";
  499. // Additional environment variables set for lacros-chrome. The string '####' is
  500. // used as a delimiter. For example:
  501. // --lacros-chrome-additional-env=WAYLAND_DEBUG=client####FOO=bar
  502. // will enable Wayland protocol logging and set FOO=bar.
  503. const char kLacrosChromeAdditionalEnv[] = "lacros-chrome-additional-env";
  504. // If this switch is set, then ash-chrome will exec the lacros-chrome binary
  505. // from the indicated path rather than from component updater. Note that the
  506. // path should be to a directory that contains a binary named 'chrome'.
  507. const char kLacrosChromePath[] = "lacros-chrome-path";
  508. // If set, ash-chrome will drop a Unix domain socket to wait for a process to
  509. // connect to it, and the connection will be used to request file descriptors
  510. // from ash-chrome, and when the process forks to start a lacros-chrome, the
  511. // obtained file descriptor will be used by lacros-chrome to set up the mojo
  512. // connection with ash-chrome. There are mainly two use cases:
  513. // 1. Test launcher to run browser tests in testing environment.
  514. // 2. A terminal to start lacros-chrome with a debugger.
  515. const char kLacrosMojoSocketForTesting[] = "lacros-mojo-socket-for-testing";
  516. // Start Chrome in RMA mode. Launches RMA app automatically.
  517. // kRmaNotAllowed switch takes priority over this one.
  518. const char kLaunchRma[] = "launch-rma";
  519. // Enables Chrome-as-a-login-manager behavior.
  520. const char kLoginManager[] = "login-manager";
  521. // Specifies the profile to use once a chromeos user is logged in.
  522. // This parameter is ignored if user goes through login screen since user_id
  523. // hash defines which profile directory to use.
  524. // In case of browser restart within active session this parameter is used
  525. // to pass user_id hash for primary user.
  526. const char kLoginProfile[] = "login-profile";
  527. // Specifies the user which is already logged in.
  528. const char kLoginUser[] = "login-user";
  529. // Specifies the user that the browser data migration should happen for.
  530. const char kBrowserDataMigrationForUser[] = "browser-data-migration-for-user";
  531. // Run move migration instead of copy. Passed with
  532. // `kBrowserDataMigrationForUser`.
  533. const char kBrowserDataMigrationMoveMode[] = "browser-data-migration-move-mode";
  534. // Force skip or force migration. Should only be used for testing.
  535. const char kForceBrowserDataMigrationForTesting[] =
  536. "force-browser-data-migration-for-testing";
  537. // Determines the URL to be used when calling the backend.
  538. const char kMarketingOptInUrl[] = "marketing-opt-in-url";
  539. // Enables natural scroll by default.
  540. const char kNaturalScrollDefault[] = "enable-natural-scroll-default";
  541. // An optional comma-separated list of IDs of apps that can be used to take
  542. // notes. If unset, a hardcoded list is used instead.
  543. const char kNoteTakingAppIds[] = "note-taking-app-ids";
  544. // Used for overriding the time limit imposed by the policies
  545. // SAMLOfflineSigninTimeLimit & GaiaOfflineSigninTimeLimitDays when testing.
  546. // TODO(crbug.com/1177416): Clean up once testing is complete
  547. const char kOfflineSignInTimeLimitInSecondsOverrideForTesting[] =
  548. "offline-signin-timelimit-in-seconds-override-for-testing";
  549. // Allows the eula url to be overridden for tests.
  550. const char kOobeEulaUrlForTests[] = "oobe-eula-url-for-tests";
  551. // Indicates that the first user run flow (sequence of OOBE screens after the
  552. // first user login) should show tablet mode centric screens, even if the device
  553. // is not in tablet mode.
  554. const char kOobeForceTabletFirstRun[] = "oobe-force-tablet-first-run";
  555. // Indicates that OOBE should be scaled for big displays similar to how Meets
  556. // app scales UI.
  557. // TODO(crbug.com/1205364): Remove after adding new scheme.
  558. const char kOobeLargeScreenSpecialScaling[] =
  559. "oobe-large-screen-special-scaling";
  560. // Specifies directory for screenshots taken with OOBE UI Debugger.
  561. const char kOobeScreenshotDirectory[] = "oobe-screenshot-dir";
  562. // Skips all other OOBE pages after user login.
  563. const char kOobeSkipPostLogin[] = "oobe-skip-postlogin";
  564. // Skip to login screen.
  565. const char kOobeSkipToLogin[] = "oobe-skip-to-login";
  566. // Interval at which we check for total time on OOBE.
  567. const char kOobeTimerInterval[] = "oobe-timer-interval";
  568. // Allows the timezone to be overridden on the marketing opt-in screen.
  569. const char kOobeTimezoneOverrideForTests[] = "oobe-timezone-override-for-tests";
  570. // Trigger sync engine initialization timeout in OOBE for testing.
  571. const char kOobeTriggerSyncTimeoutForTests[] =
  572. "oobe-trigger-sync-timeout-for-tests";
  573. // If set to "true", the profile requires policy during restart (policy load
  574. // must succeed, otherwise session restart should fail).
  575. const char kProfileRequiresPolicy[] = "profile-requires-policy";
  576. // SAML assertion consumer URL, used to detect when Gaia-less SAML flows end
  577. // (e.g. for SAML managed guest sessions)
  578. // TODO(984021): Remove when URL is sent by DMServer.
  579. const char kPublicAccountsSamlAclUrl[] = "public-accounts-saml-acl-url";
  580. // The name of the per-model directory which contains per-region
  581. // subdirectories with regulatory label files for this model.
  582. // The per-model directories (if there are any) are located under
  583. // "/usr/share/chromeos-assets/regulatory_labels/".
  584. const char kRegulatoryLabelDir[] = "regulatory-label-dir";
  585. // Indicates that reven UI strings and features should be shown.
  586. const char kRevenBranding[] = "reven-branding";
  587. // The rlz ping delay (in seconds) that overwrites the default value.
  588. const char kRlzPingDelay[] = "rlz-ping-delay";
  589. // Start Chrome without opening RMA or checking the current RMA state.
  590. const char kRmaNotAllowed[] = "rma-not-allowed";
  591. // The switch added by session_manager daemon when chrome crashes 3 times or
  592. // more within the first 60 seconds on start.
  593. // See BrowserJob::ExportArgv in platform2/login_manager/browser_job.cc.
  594. const char kSafeMode[] = "safe-mode";
  595. // Used for overriding the preference set by the policy
  596. // kSamlLockScreenReauthenticationEnabled to true.
  597. // TODO(crbug.com/1177416): Clean up once testing is complete
  598. const char kSamlLockScreenReauthenticationEnabledOverrideForTesting[] =
  599. "saml-lockscreen-reauthentication-enabled-override-for-testing";
  600. // Password change url for SAML users.
  601. // TODO(941489): Remove when the bug is fixed.
  602. const char kSamlPasswordChangeUrl[] = "saml-password-change-url";
  603. // New modular design for the shelf with apps separated into a hotseat UI and
  604. // smaller shelf in clamshell mode.
  605. const char kShelfHotseat[] = "shelf-hotseat";
  606. // App window previews when hovering over the shelf.
  607. const char kShelfHoverPreviews[] = "shelf-hover-previews";
  608. // If true, the developer tool overlay will be shown for the login/lock screen.
  609. // This makes it easier to test layout logic.
  610. const char kShowLoginDevOverlay[] = "show-login-dev-overlay";
  611. // Enables OOBE UI Debugger for ease of navigation between screens during manual
  612. // testing. Limited to ChromeOS-on-linux and test images only.
  613. const char kShowOobeDevOverlay[] = "show-oobe-dev-overlay";
  614. // Draws a circle at each touch point, similar to the Android OS developer
  615. // option "Show taps".
  616. const char kShowTaps[] = "show-taps";
  617. // Disables online sign-in enforcement in tast tests.
  618. const char kSkipForceOnlineSignInForTesting[] =
  619. "skip-force-online-signin-for-testing";
  620. // Used to skip the threshold duration that the reorder nudge has to show before
  621. // the nudge is considered as shown.
  622. const char kSkipReorderNudgeShowThresholdDurationForTest[] =
  623. "skip-reorder-nudge-show-threshold-duration";
  624. // If set, the device will be forced to stay in clamshell UI mode but screen
  625. // auto rotation will be supported. E.g, chromebase device Dooly.
  626. const char kSupportsClamshellAutoRotation[] =
  627. "supports-clamshell-auto-rotation";
  628. // Hides all Message Center notification popups (toasts). Used for testing.
  629. const char kSuppressMessageCenterPopups[] = "suppress-message-center-popups";
  630. // Enables System Extensions Debug mode e.g Force enable System Extensions APIs
  631. // on all Service Workers.
  632. const char kSystemExtensionsDebug[] = "system-extensions-debug";
  633. // Specifies directory for the Telemetry System Web Extension.
  634. const char kTelemetryExtensionDirectory[] = "telemetry-extension-dir";
  635. // Enables testing for encryption migration UI.
  636. const char kTestEncryptionMigrationUI[] = "test-encryption-migration-ui";
  637. // Enables the wallpaper picker to fetch images from the test server.
  638. const char kTestWallpaperServer[] = "test-wallpaper-server";
  639. // Tells the Chromebook to scan for a tethering host even if there is already a
  640. // wired connection. This allows end-to-end tests to be deployed over ethernet
  641. // without that connection preventing scans and thereby blocking the testing of
  642. // cases with no preexisting connection. Should be used only for testing.
  643. const char kTetherHostScansIgnoreWiredConnections[] =
  644. "tether-host-scans-ignore-wired-connections";
  645. // Overrides Tether with stub service. Provide integer arguments for the number
  646. // of fake networks desired, e.g. 'tether-stub=2'.
  647. const char kTetherStub[] = "tether-stub";
  648. // Used for overriding the required user activity time before running the
  649. // onboarding survey.
  650. const char kTimeBeforeOnboardingSurveyInSecondsForTesting[] =
  651. "time-before-onboarding-survey-in-seconds-for-testing";
  652. // Chromebases' touchscreens can be used to wake from suspend, unlike the
  653. // touchscreens on other Chrome OS devices. If set, the touchscreen is kept
  654. // enabled while the screen is off so that it can be used to turn the screen
  655. // back on after it has been turned off for inactivity but before the system has
  656. // suspended.
  657. const char kTouchscreenUsableWhileScreenOff[] =
  658. "touchscreen-usable-while-screen-off";
  659. // Enables TPM selection in runtime.
  660. const char kTpmIsDynamic[] = "tpm-is-dynamic";
  661. // Shows all Bluetooth devices in UI (System Tray/Settings Page.)
  662. const char kUnfilteredBluetoothDevices[] = "unfiltered-bluetooth-devices";
  663. // If this switch is passed, the device policy DeviceMinimumVersion
  664. // assumes that the device has reached Auto Update Expiration. This is useful
  665. // for testing the policy behaviour on the DUT.
  666. const char kUpdateRequiredAueForTest[] = "aue-reached-for-update-required-test";
  667. // Used to tell the policy infrastructure to not let profile initialization
  668. // complete until policy is manually set by a test. This is used to provide
  669. // backward compatibility with a few tests that incorrectly use the
  670. // synchronously-initialized login profile to run their tests - do not add new
  671. // uses of this flag.
  672. const char kWaitForInitialPolicyFetchForTest[] =
  673. "wait-for-initial-policy-fetch-for-test";
  674. // Used to determine if and how on-device handwriting recognition is supported
  675. // (e.g. via rootfs or downloadable content).
  676. const char kOndeviceHandwritingSwitch[] = "ondevice_handwriting";
  677. // Enable the getAccessToken autotest API which creates access tokens using
  678. // the internal OAuth client ID.
  679. const char kGetAccessTokenForTest[] = "get-access-token-for-test";
  680. bool IsAuthSessionCryptohomeEnabled() {
  681. return base::CommandLine::ForCurrentProcess()->HasSwitch(
  682. kCryptohomeUseAuthSession);
  683. }
  684. bool IsCellularFirstDevice() {
  685. return base::CommandLine::ForCurrentProcess()->HasSwitch(kCellularFirst);
  686. }
  687. bool IsRevenBranding() {
  688. return base::CommandLine::ForCurrentProcess()->HasSwitch(kRevenBranding);
  689. }
  690. bool IsSigninFrameClientCertsEnabled() {
  691. return !base::CommandLine::ForCurrentProcess()->HasSwitch(
  692. kDisableSigninFrameClientCerts);
  693. }
  694. bool ShouldShowShelfHoverPreviews() {
  695. return base::CommandLine::ForCurrentProcess()->HasSwitch(kShelfHoverPreviews);
  696. }
  697. bool ShouldTetherHostScansIgnoreWiredConnections() {
  698. return base::CommandLine::ForCurrentProcess()->HasSwitch(
  699. kTetherHostScansIgnoreWiredConnections);
  700. }
  701. bool ShouldSkipOobePostLogin() {
  702. return base::CommandLine::ForCurrentProcess()->HasSwitch(kOobeSkipPostLogin);
  703. }
  704. bool IsTabletFormFactor() {
  705. return base::CommandLine::ForCurrentProcess()->HasSwitch(
  706. kEnableTabletFormFactor);
  707. }
  708. bool IsGaiaServicesDisabled() {
  709. return base::CommandLine::ForCurrentProcess()->HasSwitch(
  710. kDisableGaiaServices);
  711. }
  712. bool IsArcCpuRestrictionDisabled() {
  713. return base::CommandLine::ForCurrentProcess()->HasSwitch(
  714. kDisableArcCpuRestriction);
  715. }
  716. bool IsTpmDynamic() {
  717. return base::CommandLine::ForCurrentProcess()->HasSwitch(kTpmIsDynamic);
  718. }
  719. bool IsUnfilteredBluetoothDevicesEnabled() {
  720. return base::CommandLine::ForCurrentProcess()->HasSwitch(
  721. kUnfilteredBluetoothDevices);
  722. }
  723. bool ShouldOobeUseTabletModeFirstRun() {
  724. return base::CommandLine::ForCurrentProcess()->HasSwitch(
  725. kOobeForceTabletFirstRun);
  726. }
  727. bool ShouldScaleOobe() {
  728. return base::CommandLine::ForCurrentProcess()->HasSwitch(
  729. kOobeLargeScreenSpecialScaling);
  730. }
  731. bool IsAueReachedForUpdateRequiredForTest() {
  732. return base::CommandLine::ForCurrentProcess()->HasSwitch(
  733. kUpdateRequiredAueForTest);
  734. }
  735. bool IsOOBEChromeVoxHintTimerDisabledForTesting() {
  736. return base::CommandLine::ForCurrentProcess()->HasSwitch(
  737. kDisableOOBEChromeVoxHintTimerForTesting);
  738. }
  739. bool IsOOBENetworkScreenSkippingDisabledForTesting() {
  740. return base::CommandLine::ForCurrentProcess()->HasSwitch(
  741. kDisableOOBENetworkScreenSkippingForTesting);
  742. }
  743. bool IsOOBEChromeVoxHintEnabledForDevMode() {
  744. return base::CommandLine::ForCurrentProcess()->HasSwitch(
  745. kEnableOOBEChromeVoxHintForDevMode);
  746. }
  747. bool IsDeviceRequisitionConfigurable() {
  748. return base::CommandLine::ForCurrentProcess()->HasSwitch(
  749. kEnableRequisitionEdits);
  750. }
  751. bool IsOsInstallAllowed() {
  752. return base::CommandLine::ForCurrentProcess()->HasSwitch(kAllowOsInstall);
  753. }
  754. absl::optional<base::TimeDelta> ContextualNudgesInterval() {
  755. int numeric_cooldown_time;
  756. if (base::CommandLine::ForCurrentProcess()->HasSwitch(
  757. kAshContextualNudgesInterval) &&
  758. base::StringToInt(
  759. base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
  760. kAshContextualNudgesInterval),
  761. &numeric_cooldown_time)) {
  762. base::TimeDelta cooldown_time = base::Seconds(numeric_cooldown_time);
  763. cooldown_time = base::clamp(cooldown_time, kAshContextualNudgesMinInterval,
  764. kAshContextualNudgesMaxInterval);
  765. return absl::optional<base::TimeDelta>(cooldown_time);
  766. }
  767. return absl::nullopt;
  768. }
  769. bool ContextualNudgesResetShownCount() {
  770. return base::CommandLine::ForCurrentProcess()->HasSwitch(
  771. kAshContextualNudgesResetShownCount);
  772. }
  773. bool IsUsingShelfAutoDim() {
  774. return base::CommandLine::ForCurrentProcess()->HasSwitch(kEnableDimShelf);
  775. }
  776. bool ShouldClearFastInkBuffer() {
  777. return base::CommandLine::ForCurrentProcess()->HasSwitch(
  778. kAshClearFastInkBuffer);
  779. }
  780. bool HasHps() {
  781. return base::CommandLine::ForCurrentProcess()->HasSwitch(kHasHps);
  782. }
  783. bool IsSkipRecorderNudgeShowThresholdDurationEnabled() {
  784. return base::CommandLine::ForCurrentProcess()->HasSwitch(
  785. kSkipReorderNudgeShowThresholdDurationForTest);
  786. }
  787. bool IsStabilizeTimeDependentViewForTestsEnabled() {
  788. return base::CommandLine::ForCurrentProcess()->HasSwitch(
  789. kStabilizeTimeDependentViewForTests);
  790. }
  791. } // namespace switches
  792. } // namespace ash