1 // Copyright 2018 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 "chromeos/constants/chromeos_features.h"
6 
7 #include "base/feature_list.h"
8 #include "base/metrics/field_trial_params.h"
9 
10 namespace chromeos {
11 namespace features {
12 namespace {
13 
14 // Controls whether Instant Tethering supports hosts which use the background
15 // advertisement model.
16 const base::Feature kInstantTetheringBackgroundAdvertisementSupport{
17     "InstantTetheringBackgroundAdvertisementSupport",
18     base::FEATURE_ENABLED_BY_DEFAULT};
19 
20 }  // namespace
21 
22 // Shows settings for adjusting scroll acceleration/sensitivity for
23 // mouse/touchpad.
24 const base::Feature kAllowScrollSettings{"AllowScrollSettings",
25                                          base::FEATURE_DISABLED_BY_DEFAULT};
26 
27 // Controls whether to enable Ambient mode feature.
28 const base::Feature kAmbientModeFeature{"ChromeOSAmbientMode",
29                                         base::FEATURE_ENABLED_BY_DEFAULT};
30 
31 constexpr base::FeatureParam<bool> kAmbientModeCapturedOnPixelAlbumEnabled{
32     &kAmbientModeFeature, "CapturedOnPixelAlbumEnabled", false};
33 
34 constexpr base::FeatureParam<bool> kAmbientModeFineArtAlbumEnabled{
35     &kAmbientModeFeature, "FineArtAlbumEnabled", false};
36 
37 constexpr base::FeatureParam<bool> kAmbientModeFeaturedPhotoAlbumEnabled{
38     &kAmbientModeFeature, "FeaturedPhotoAlbumEnabled", true};
39 
40 constexpr base::FeatureParam<bool> kAmbientModeEarthAndSpaceAlbumEnabled{
41     &kAmbientModeFeature, "EarthAndSpaceAlbumEnabled", false};
42 
43 constexpr base::FeatureParam<bool> kAmbientModeStreetArtAlbumEnabled{
44     &kAmbientModeFeature, "StreetArtAlbumEnabled", false};
45 
46 constexpr base::FeatureParam<bool> kAmbientModeDefaultFeedEnabled{
47     &kAmbientModeFeature, "DefaultFeedEnabled", false};
48 
49 constexpr base::FeatureParam<bool> kAmbientModePersonalPhotosEnabled{
50     &kAmbientModeFeature, "PersonalPhotosEnabled", true};
51 
52 constexpr base::FeatureParam<bool> kAmbientModeFeaturedPhotosEnabled{
53     &kAmbientModeFeature, "FeaturedPhotosEnabled", true};
54 
55 constexpr base::FeatureParam<bool> kAmbientModeGeoPhotosEnabled{
56     &kAmbientModeFeature, "GeoPhotosEnabled", false};
57 
58 constexpr base::FeatureParam<bool> kAmbientModeCulturalInstitutePhotosEnabled{
59     &kAmbientModeFeature, "CulturalInstitutePhotosEnabled", false};
60 
61 constexpr base::FeatureParam<bool> kAmbientModeRssPhotosEnabled{
62     &kAmbientModeFeature, "RssPhotosEnabled", false};
63 
64 constexpr base::FeatureParam<bool> kAmbientModeCapturedOnPixelPhotosEnabled{
65     &kAmbientModeFeature, "CapturedOnPixelPhotosEnabled", false};
66 
67 // Controls whether to enable Ambient mode album selection with photo previews.
68 const base::Feature kAmbientModePhotoPreviewFeature{
69     "ChromeOSAmbientModePhotoPreview", base::FEATURE_ENABLED_BY_DEFAULT};
70 
71 // Controls whether to allow Dev channel to use Prod server feature.
72 const base::Feature kAmbientModeDevUseProdFeature{
73     "ChromeOSAmbientModeDevChannelUseProdServer",
74     base::FEATURE_DISABLED_BY_DEFAULT};
75 
76 // Controls whether to enable ARC ADB sideloading support.
77 const base::Feature kArcAdbSideloadingFeature{
78     "ArcAdbSideloading", base::FEATURE_DISABLED_BY_DEFAULT};
79 
80 // Controls whether to enable support for ARC ADB sideloading for managed
81 // accounts and/or devices.
82 const base::Feature kArcManagedAdbSideloadingSupport{
83     "ArcManagedAdbSideloadingSupport", base::FEATURE_DISABLED_BY_DEFAULT};
84 
85 // Controls whether to enable support for View.onKeyPreIme() of ARC apps.
86 const base::Feature kArcPreImeKeyEventSupport{
87     "ArcPreImeKeyEventSupport", base::FEATURE_DISABLED_BY_DEFAULT};
88 
89 // Enables or disables auto screen-brightness adjustment when ambient light
90 // changes.
91 const base::Feature kAutoScreenBrightness{"AutoScreenBrightness",
92                                           base::FEATURE_ENABLED_BY_DEFAULT};
93 
94 // Controls whether to enable assistive autocorrect.
95 const base::Feature kAssistAutoCorrect{"AssistAutoCorrect",
96                                        base::FEATURE_DISABLED_BY_DEFAULT};
97 
98 // Controls whether to enable assistive personal information.
99 const base::Feature kAssistPersonalInfo{"AssistPersonalInfo",
100                                         base::FEATURE_DISABLED_BY_DEFAULT};
101 
102 // Controls whether to suggest addresses in assistive personal information. This
103 // is only effective when AssistPersonalInfo flag is enabled.
104 const base::Feature kAssistPersonalInfoAddress{
105     "AssistPersonalInfoAddress", base::FEATURE_ENABLED_BY_DEFAULT};
106 
107 // Controls whether to suggest emails in assistive personal information. This is
108 // only effective when AssistPersonalInfo flag is enabled.
109 const base::Feature kAssistPersonalInfoEmail{"AssistPersonalInfoEmail",
110                                              base::FEATURE_ENABLED_BY_DEFAULT};
111 
112 // Controls whether to suggest names in assistive personal information. This is
113 // only effective when AssistPersonalInfo flag is enabled.
114 const base::Feature kAssistPersonalInfoName{"AssistPersonalInfoName",
115                                             base::FEATURE_ENABLED_BY_DEFAULT};
116 
117 // Controls whether to suggest phone numbers in assistive personal information.
118 // This is only effective when AssistPersonalInfo flag is enabled.
119 const base::Feature kAssistPersonalInfoPhoneNumber{
120     "AssistPersonalInfoPhoneNumber", base::FEATURE_ENABLED_BY_DEFAULT};
121 
122 // Displays the avatar toolbar button and the profile menu.
123 // https://crbug.com/1041472
124 extern const base::Feature kAvatarToolbarButton{
125     "AvatarToolbarButton", base::FEATURE_DISABLED_BY_DEFAULT};
126 
127 // Enables better version of the UpdateScreen in OOBE. Displays low battery
128 // warnings during the update downloading and further stages. Provides time
129 // estimates of the update stages.
130 // https://crbug.com/1101317
131 const base::Feature kBetterUpdateScreen{"BetterUpdateScreen",
132                                         base::FEATURE_ENABLED_BY_DEFAULT};
133 
134 // Enables or disables more aggressive filtering out of Bluetooth devices with
135 // "appearances" that are less likely to be pairable or useful.
136 const base::Feature kBluetoothAggressiveAppearanceFilter{
137     "BluetoothAggressiveAppearanceFilter", base::FEATURE_ENABLED_BY_DEFAULT};
138 
139 // Enables or disables Bluetooth WBS microphone be selected as default
140 // audio input option.
141 const base::Feature kBluetoothWbsDogfood{"BluetoothWbsDogfood",
142                                          base::FEATURE_DISABLED_BY_DEFAULT};
143 
144 // Enables or disables the usage of fixed Bluetooth A2DP packet size to improve
145 // audio performance in noisy environment.
146 const base::Feature kBluetoothFixA2dpPacketSize{
147     "BluetoothFixA2dpPacketSize", base::FEATURE_DISABLED_BY_DEFAULT};
148 
149 // Enables or disables more filtering out of phones from the Bluetooth UI.
150 const base::Feature kBluetoothPhoneFilter{"BluetoothPhoneFilter",
151                                           base::FEATURE_ENABLED_BY_DEFAULT};
152 
153 // Enable or disables running the Camera App as a System Web App.
154 const base::Feature kCameraSystemWebApp{"CameraSystemWebApp",
155                                         base::FEATURE_ENABLED_BY_DEFAULT};
156 
157 // If enabled, will use the CDM in the Chrome OS daemon rather than loading the
158 // CDM using the library CDM interface.
159 const base::Feature kCdmFactoryDaemon{"CdmFactoryDaemon",
160                                       base::FEATURE_DISABLED_BY_DEFAULT};
161 
162 // Enables or disables entry point for child account sign in or creation.
163 const base::Feature kChildSpecificSignin{"ChildSpecificSignin",
164                                          base::FEATURE_ENABLED_BY_DEFAULT};
165 
166 // Enables or disables using the new Connectivity Diagnostics WebUI app.
167 const base::Feature kConnectivityDiagnosticsWebUi{
168     "ConnectivityDiagnosticsWebUi", base::FEATURE_DISABLED_BY_DEFAULT};
169 
170 // If enabled, options page for each input method will be opened in ChromeOS
171 // settings. Otherwise it will be opened in a new web page in Chrome browser.
172 const base::Feature kImeOptionsInSettings{"ImeOptionsInSettings",
173                                           base::FEATURE_DISABLED_BY_DEFAULT};
174 
175 // Enables or disables Crostini Disk Resizing.
176 const base::Feature kCrostiniDiskResizing{"CrostiniDiskResizing",
177                                           base::FEATURE_ENABLED_BY_DEFAULT};
178 
179 // Enables or disables Crostini using Buster container images.
180 const base::Feature kCrostiniUseBusterImage{"CrostiniUseBusterImage",
181                                             base::FEATURE_ENABLED_BY_DEFAULT};
182 
183 // Enables or disables Crostini GPU support.
184 const base::Feature kCrostiniGpuSupport{"CrostiniGpuSupport",
185                                         base::FEATURE_DISABLED_BY_DEFAULT};
186 
187 // Enables or disables the new WebUI Crostini upgrader.
188 const base::Feature kCrostiniWebUIUpgrader{"CrostiniWebUIUpgrader",
189                                            base::FEATURE_ENABLED_BY_DEFAULT};
190 
191 // Use DLC instead of component updater for managing the Termina image if set
192 // (and component updater instead of DLC if not).
193 const base::Feature kCrostiniUseDlc{"CrostiniUseDlc",
194                                     base::FEATURE_DISABLED_BY_DEFAULT};
195 
196 // DLC Service is available for use on the board, prerequisite for the UseDlc
197 // flag.
198 const base::Feature kCrostiniEnableDlc{"CrostiniEnableDlc",
199                                        base::FEATURE_DISABLED_BY_DEFAULT};
200 
201 // Enables or disables using Cryptauth's GetDevicesActivityStatus API.
202 const base::Feature kCryptAuthV2DeviceActivityStatus{
203     "CryptAuthV2DeviceActivityStatus", base::FEATURE_DISABLED_BY_DEFAULT};
204 
205 // Disable idle sockets closing on memory pressure for NetworkContexts that
206 // belong to Profiles. It only applies to Profiles because the goal is to
207 // improve perceived performance of web browsing within the Chrome OS user
208 // session by avoiding re-estabshing TLS connections that require client
209 // certificates.
210 const base::Feature kDisableIdleSocketsCloseOnMemoryPressure{
211     "disable_idle_sockets_close_on_memory_pressure",
212     base::FEATURE_DISABLED_BY_DEFAULT};
213 
214 // Enables or disables the CryptAuth v2 DeviceSync flow. Regardless of this
215 // flag, v1 DeviceSync will continue to operate until it is disabled via the
216 // feature flag kDisableCryptAuthV1DeviceSync.
217 const base::Feature kCryptAuthV2DeviceSync{"CryptAuthV2DeviceSync",
218                                            base::FEATURE_ENABLED_BY_DEFAULT};
219 
220 // Enables or disables the CryptAuth v2 Enrollment flow.
221 const base::Feature kCryptAuthV2Enrollment{"CryptAuthV2Enrollment",
222                                            base::FEATURE_ENABLED_BY_DEFAULT};
223 
224 // Enables or disables the Diagnostics app.
225 const base::Feature kDiagnosticsApp{"DiagnosticsApp",
226                                     base::FEATURE_DISABLED_BY_DEFAULT};
227 
228 // Disables the CryptAuth v1 DeviceSync flow. Note: During the first phase
229 // of the v2 DeviceSync rollout, v1 and v2 DeviceSync run in parallel. This flag
230 // is needed to disable the v1 service during the second phase of the rollout.
231 // kCryptAuthV2DeviceSync should be enabled before this flag is flipped.
232 const base::Feature kDisableCryptAuthV1DeviceSync{
233     "DisableCryptAuthV1DeviceSync", base::FEATURE_DISABLED_BY_DEFAULT};
234 
235 // Disables "Office Editing for Docs, Sheets & Slides" component app so handlers
236 // won't be registered, making it possible to install another version for
237 // testing.
238 const base::Feature kDisableOfficeEditingComponentApp{
239     "DisableOfficeEditingComponentApp", base::FEATURE_DISABLED_BY_DEFAULT};
240 
241 // If enabled, DriveFS will be used for Drive sync.
242 const base::Feature kDriveFs{"DriveFS", base::FEATURE_ENABLED_BY_DEFAULT};
243 
244 // Enables duplex native messaging between DriveFS and extensions.
245 const base::Feature kDriveFsBidirectionalNativeMessaging{
246     "DriveFsBidirectionalNativeMessaging", base::FEATURE_DISABLED_BY_DEFAULT};
247 
248 // Enables DriveFS' experimental local files mirroring functionality.
249 const base::Feature kDriveFsMirroring{"DriveFsMirroring",
250                                       base::FEATURE_DISABLED_BY_DEFAULT};
251 
252 // If enabled, emoji suggestion will be shown when user type "space".
253 const base::Feature kEmojiSuggestAddition{"EmojiSuggestAddition",
254                                           base::FEATURE_DISABLED_BY_DEFAULT};
255 
256 // Enables setting the device hostname.
257 const base::Feature kEnableHostnameSetting{"EnableHostnameSetting",
258                                            base::FEATURE_DISABLED_BY_DEFAULT};
259 
260 // Enables Device End Of Lifetime warning notifications.
261 const base::Feature kEolWarningNotifications{"EolWarningNotifications",
262                                              base::FEATURE_ENABLED_BY_DEFAULT};
263 
264 // Enable or disable use of ordinal (unaccelerated) motion by Exo clients.
265 const base::Feature kExoOrdinalMotion{"ExoOrdinalMotion",
266                                       base::FEATURE_DISABLED_BY_DEFAULT};
267 
268 // Enable or disable pointer lock for Crostini windows.
269 const base::Feature kExoPointerLock{"ExoPointerLock",
270                                     base::FEATURE_DISABLED_BY_DEFAULT};
271 
272 // Enables policy that controls feature to allow Family Link accounts on school
273 // owned devices.
274 const base::Feature kFamilyLinkOnSchoolDevice{"FamilyLinkOnSchoolDevice",
275                                               base::FEATURE_ENABLED_BY_DEFAULT};
276 
277 // Enables the camera folder handling in files app.
278 const base::Feature kFilesCameraFolder{"FilesCameraFolder",
279                                        base::FEATURE_ENABLED_BY_DEFAULT};
280 
281 // Enables the next generation file manager.
282 const base::Feature kFilesNG{"FilesNG", base::FEATURE_ENABLED_BY_DEFAULT};
283 
284 // Enables JS modules for Files app.
285 const base::Feature kFilesJsModules{"FilesJsModules",
286                                     base::FEATURE_DISABLED_BY_DEFAULT};
287 
288 // Enables JS modules for Audio Player.
289 const base::Feature kAudioPlayerJsModules{"AudioPlayerJsModules",
290                                           base::FEATURE_DISABLED_BY_DEFAULT};
291 
292 // Enables JS modules for Video Player.
293 const base::Feature kVideoPlayerJsModules{"VideoPlayerJsModules",
294                                           base::FEATURE_DISABLED_BY_DEFAULT};
295 
296 // Enables partitioning of removable disks in file manager.
297 const base::Feature kFilesSinglePartitionFormat{
298     "FilesSinglePartitionFormat", base::FEATURE_DISABLED_BY_DEFAULT};
299 
300 // Enables the System Web App (SWA) version of file manager.
301 const base::Feature kFilesSWA{"FilesSWA", base::FEATURE_DISABLED_BY_DEFAULT};
302 
303 // Enable file transfer details in progress center.
304 const base::Feature kFilesTransferDetails{"FilesTransferDetails",
305                                           base::FEATURE_ENABLED_BY_DEFAULT};
306 
307 // Enable files app trash.
308 const base::Feature kFilesTrash{"FilesTrash",
309                                 base::FEATURE_DISABLED_BY_DEFAULT};
310 
311 // Enables filters in Files app Recents view.
312 const base::Feature kFiltersInRecents{"FiltersInRecents",
313                                       base::FEATURE_DISABLED_BY_DEFAULT};
314 
315 // Enables new ZIP archive handling in Files App.
316 // https://crbug.com/912236
317 const base::Feature kFilesZipMount{"FilesZipMount",
318                                    base::FEATURE_DISABLED_BY_DEFAULT};
319 const base::Feature kFilesZipPack{"FilesZipPack",
320                                   base::FEATURE_DISABLED_BY_DEFAULT};
321 const base::Feature kFilesZipUnpack{"FilesZipUnpack",
322                                     base::FEATURE_DISABLED_BY_DEFAULT};
323 
324 // Controls gamepad vibration in Exo.
325 const base::Feature kGamepadVibration{"ExoGamepadVibration",
326                                       base::FEATURE_DISABLED_BY_DEFAULT};
327 
328 // Enables the use of Mojo by Chrome-process code to communicate with Power
329 // Manager. In order to use mojo, this feature must be turned on and a callsite
330 // must use PowerManagerMojoClient::Get().
331 const base::Feature kMojoDBusRelay{"MojoDBusRelay",
332                                    base::FEATURE_DISABLED_BY_DEFAULT};
333 
334 // Enables pasting a few recently copied items in a menu when pressing search +
335 // v.
336 const base::Feature kClipboardHistory{"ClipboardHistory",
337                                       base::FEATURE_DISABLED_BY_DEFAULT};
338 
339 // If enabled, the clipboard nudge shown prefs will be reset at the start of
340 // each new user session.
341 const base::Feature kClipboardHistoryNudgeSessionReset{
342     "ClipboardHistoryNudgeSessionReset", base::FEATURE_DISABLED_BY_DEFAULT};
343 
344 // Enables rendering html in Clipboard History only if an img or table tag is
345 // present.
346 const base::Feature kClipboardHistorySimpleRender{
347     "ClipboardHistorySimpleRender", base::FEATURE_DISABLED_BY_DEFAULT};
348 
349 // Enables copying an image to the system clipboard to support pasting onto
350 // different surfaces
351 const base::Feature kEnableFilesAppCopyImage{"EnableFilesAppCopyImage",
352                                              base::FEATURE_DISABLED_BY_DEFAULT};
353 
354 // Controls whether to launch IME service with an 'ime' sandbox.
355 const base::Feature kEnableImeSandbox{"EnableImeSandbox",
356                                       base::FEATURE_ENABLED_BY_DEFAULT};
357 
358 // Enable restriction of symlink traversal on user-supplied filesystems.
359 const base::Feature kFsNosymfollow{"FsNosymfollow",
360                                    base::FEATURE_DISABLED_BY_DEFAULT};
361 
362 // Enable a D-Bus service for accessing gesture properties.
363 const base::Feature kGesturePropertiesDBusService{
364     "GesturePropertiesDBusService", base::FEATURE_DISABLED_BY_DEFAULT};
365 
366 // Enable Guest OS external protocol handling.
367 const base::Feature kGuestOsExternalProtocol{"GuestOsExternalProtocol",
368                                              base::FEATURE_ENABLED_BY_DEFAULT};
369 
370 // Enables editing with handwriting gestures within the virtual keyboard.
371 const base::Feature kHandwritingGestureEditing{
372     "HandwritingGestureEditing", base::FEATURE_DISABLED_BY_DEFAULT};
373 
374 // Enable the help app in the first run experience. This opens the help app
375 // after the OOBE, and provides some extra functionality like a getting started
376 // guide inside the app.
377 const base::Feature kHelpAppFirstRun{"HelpAppFirstRun",
378                                      base::FEATURE_ENABLED_BY_DEFAULT};
379 
380 // Enable the search service integration in the Help app.
381 const base::Feature kHelpAppSearchServiceIntegration{
382     "HelpAppSearchServiceIntegration", base::FEATURE_DISABLED_BY_DEFAULT};
383 
384 // Enable or disable IME decoder via Mojo connection on Chrome OS.
385 const base::Feature kImeMojoDecoder{"ImeMojoDecoder",
386                                     base::FEATURE_DISABLED_BY_DEFAULT};
387 
388 // Enables view-based version of multiprofile login, as opposed to Web UI one.
389 const base::Feature kViewBasedMultiprofileLogin{
390     "ViewBasedMultiprofileLogin", base::FEATURE_ENABLED_BY_DEFAULT};
391 
392 // Enable or disable using the floating virtual keyboard as the default option
393 // on Chrome OS.
394 const base::Feature kVirtualKeyboardFloatingDefault{
395     "VirtualKeyboardFloatingDefault", base::FEATURE_DISABLED_BY_DEFAULT};
396 
397 // Enables or disables Instant Tethering on Chrome OS.
398 const base::Feature kInstantTethering{"InstantTethering",
399                                       base::FEATURE_ENABLED_BY_DEFAULT};
400 
401 // Enables the Kerberos Section in ChromeOS settings. When disabled, Kerberos
402 // settings will stay under People Section. https:://crbug.com/983041
403 const base::Feature kKerberosSettingsSection{"KerberosSettingsSection",
404                                              base::FEATURE_DISABLED_BY_DEFAULT};
405 
406 // Enables "Linux and Chrome OS" support. Allows a Linux version of Chrome
407 // ("lacros-chrome") to run as a Wayland client with this instance of Chrome
408 // ("ash-chrome") acting as the Wayland server and window manager.
409 const base::Feature kLacrosSupport{"LacrosSupport",
410                                    base::FEATURE_DISABLED_BY_DEFAULT};
411 
412 // Enables or disables language settings update.
413 const base::Feature kLanguageSettingsUpdate{"LanguageSettingsUpdate",
414                                             base::FEATURE_ENABLED_BY_DEFAULT};
415 
416 // Enables or disables device management disclosure on login / lock screen.
417 const base::Feature kLoginDeviceManagementDisclosure{
418     "LoginDeviceManagementDisclosure", base::FEATURE_ENABLED_BY_DEFAULT};
419 
420 // Enables or disables the display password button on login / lock screen.
421 const base::Feature kLoginDisplayPasswordButton{
422     "LoginDisplayPasswordButton", base::FEATURE_ENABLED_BY_DEFAULT};
423 
424 // Controls whether to enable the requirement of a minimum chrome version on the
425 // device through the policy DeviceMinimumVersion. If the requirement is
426 // not met and the warning time in the policy has expired, the user is
427 // restricted from using the session.
428 const base::Feature kMinimumChromeVersion{"MinimumChromeVersion",
429                                           base::FEATURE_ENABLED_BY_DEFAULT};
430 
431 // ChromeOS Media App. https://crbug.com/996088.
432 const base::Feature kMediaApp{"MediaApp", base::FEATURE_ENABLED_BY_DEFAULT};
433 
434 // Whether image annotation is enabled in the ChromeOS media app.
435 const base::Feature kMediaAppAnnotation{"MediaAppAnnotation",
436                                         base::FEATURE_DISABLED_BY_DEFAULT};
437 
438 // Whether known extensions for RAW image formats are handled by the ChromeOS
439 // Media App.
440 const base::Feature kMediaAppHandlesRaw{"MediaAppHandlesRaw",
441                                         base::FEATURE_ENABLED_BY_DEFAULT};
442 
443 // Whether Pdf files loading ink is enabled in the ChromeOS media app.
444 const base::Feature kMediaAppPdfInInk{"MediaAppPdfInInk",
445                                       base::FEATURE_DISABLED_BY_DEFAULT};
446 
447 // Enables a unique URL for each path in CrOS settings.
448 // This allows deep linking to individual settings, i.e. in settings search.
449 const base::Feature kOsSettingsDeepLinking{"OsSettingsDeepLinking",
450                                            base::FEATURE_ENABLED_BY_DEFAULT};
451 
452 // Flips chrome://os-settings to show Polymer 3 version
453 const base::Feature kOsSettingsPolymer3{"OsSettingsPolymer3",
454                                         base::FEATURE_DISABLED_BY_DEFAULT};
455 
456 // Provides a UI for users to view information about their Android phone
457 // and perform phone-side actions within Chrome OS.
458 const base::Feature kPhoneHub{"PhoneHub", base::FEATURE_DISABLED_BY_DEFAULT};
459 
460 // Controls whether Phone Hub will exclusively use BLE for its connection with
461 // the user's phone.
462 const base::Feature kPhoneHubUseBle{"PhoneHubUseBle",
463                                     base::FEATURE_DISABLED_BY_DEFAULT};
464 
465 // Controls whether the camera permissions should be shown in the Plugin
466 // VM app settings.
467 const base::Feature kPluginVmShowCameraPermissions{
468     "PluginVmShowCameraPermissions", base::FEATURE_DISABLED_BY_DEFAULT};
469 
470 // Controls whether the microphone permissions should be shown in the Plugin
471 // VM app settings.
472 const base::Feature kPluginVmShowMicrophonePermissions{
473     "PluginVmShowMicrophonePermissions", base::FEATURE_DISABLED_BY_DEFAULT};
474 
475 // Controls whether to show printer statuses.
476 const base::Feature kPrinterStatus{"PrinterStatus",
477                                    base::FEATURE_ENABLED_BY_DEFAULT};
478 
479 // Controls whether to show printer statuses on the Print Preview destination
480 // dialog.
481 const base::Feature kPrinterStatusDialog{"PrinterStatusDialog",
482                                          base::FEATURE_ENABLED_BY_DEFAULT};
483 
484 // Controls whether to enable the Print Job Management App.
485 const base::Feature kPrintJobManagementApp{"PrintJobManagementApp",
486                                            base::FEATURE_ENABLED_BY_DEFAULT};
487 
488 // Changes Print Preview Save to Drive to use local Drive.
489 const base::Feature kPrintSaveToDrive{"PrintSaveToDrive",
490                                       base::FEATURE_ENABLED_BY_DEFAULT};
491 
492 // Allows print servers to be selected when beyond a specified limit.
493 const base::Feature kPrintServerScaling{"PrintServerScaling",
494                                         base::FEATURE_DISABLED_BY_DEFAULT};
495 
496 // Controls whether to enable quick answers.
497 const base::Feature kQuickAnswers{"QuickAnswers",
498                                   base::FEATURE_DISABLED_BY_DEFAULT};
499 
500 // Controls whether dogfood version of quick answers.
501 const base::Feature kQuickAnswersDogfood{"QuickAnswersDogfood",
502                                          base::FEATURE_DISABLED_BY_DEFAULT};
503 
504 // Controls whether to enable quick answers text annotator.
505 const base::Feature kQuickAnswersTextAnnotator{
506     "QuickAnswersTextAnnotator", base::FEATURE_DISABLED_BY_DEFAULT};
507 
508 // Controls whether to enable quick answers translation.
509 const base::Feature kQuickAnswersTranslation{"QuickAnswersTranslation",
510                                              base::FEATURE_DISABLED_BY_DEFAULT};
511 
512 // Controls whether to enable quick answers translation using Cloud API.
513 const base::Feature kQuickAnswersTranslationCloudAPI{
514     "QuickAnswersTranslationCloudAPI", base::FEATURE_DISABLED_BY_DEFAULT};
515 
516 // Controls whether to trigger quick answers on editable text selection.
517 const base::Feature kQuickAnswersOnEditableText{
518     "QuickAnswersOnEditableText", base::FEATURE_DISABLED_BY_DEFAULT};
519 
520 // Controls whether the PIN auto submit feature is enabled.
521 const base::Feature kQuickUnlockPinAutosubmit{"QuickUnlockPinAutosubmit",
522                                               base::FEATURE_ENABLED_BY_DEFAULT};
523 
524 // TODO(crbug.com/1104164) - Remove this once most
525 // users have their preferences backfilled.
526 // Controls whether the PIN auto submit backfill operation should be performed.
527 const base::Feature kQuickUnlockPinAutosubmitBackfill{
528     "QuickUnlockPinAutosubmitBackfill", base::FEATURE_ENABLED_BY_DEFAULT};
529 
530 // Enables or disables Release Notes notifications on Chrome OS.
531 const base::Feature kReleaseNotesNotification{"ReleaseNotesNotification",
532                                               base::FEATURE_ENABLED_BY_DEFAULT};
533 
534 // Enables or disables Release Notes notifications on non-stable Chrome OS
535 // channels. Used for testing.
536 const base::Feature kReleaseNotesNotificationAllChannels{
537     "ReleaseNotesNotificationAllChannels", base::FEATURE_DISABLED_BY_DEFAULT};
538 
539 // Enables or disables Release Notes suggestion chip on Chrome OS.
540 const base::Feature kReleaseNotesSuggestionChip{
541     "ReleaseNotesSuggestionChip", base::FEATURE_ENABLED_BY_DEFAULT};
542 
543 // Enables or disables an experimental scanning UI on Chrome OS.
544 const base::Feature kScanningUI{"ScanningUI",
545                                 base::FEATURE_DISABLED_BY_DEFAULT};
546 
547 // Enables or disables long kill timeout for session manager daemon. When
548 // enabled, session manager daemon waits for a longer time (e.g. 12s) for chrome
549 // to exit before sending SIGABRT. Otherwise, it uses the default time out
550 // (currently 3s).
551 const base::Feature kSessionManagerLongKillTimeout{
552     "SessionManagerLongKillTimeout", base::FEATURE_DISABLED_BY_DEFAULT};
553 
554 // Enables or disables a toggle to enable Bluetooth debug logs.
555 const base::Feature kShowBluetoothDebugLogToggle{
556     "ShowBluetoothDebugLogToggle", base::FEATURE_DISABLED_BY_DEFAULT};
557 
558 // Enables or disables showing the battery level in the System Tray and Settings
559 // UI for supported Bluetooth Devices.
560 const base::Feature kShowBluetoothDeviceBattery{
561     "ShowBluetoothDeviceBattery", base::FEATURE_ENABLED_BY_DEFAULT};
562 
563 // Shows the Play Store icon in Demo Mode.
564 const base::Feature kShowPlayInDemoMode{"ShowPlayInDemoMode",
565                                         base::FEATURE_ENABLED_BY_DEFAULT};
566 
567 // Shows individual steps during Demo Mode setup.
568 const base::Feature kShowStepsInDemoModeSetup{"ShowStepsInDemoModeSetup",
569                                               base::FEATURE_ENABLED_BY_DEFAULT};
570 
571 // Uses experimental component version for smart dim.
572 const base::Feature kSmartDimExperimentalComponent{
573     "SmartDimExperimentalComponent", base::FEATURE_DISABLED_BY_DEFAULT};
574 
575 // Uses the smart dim component updater to provide smart dim model and
576 // preprocessor configuration.
577 const base::Feature kSmartDimNewMlAgent{"SmartDimNewMlAgent",
578                                         base::FEATURE_ENABLED_BY_DEFAULT};
579 
580 // Uses the V3 (~2019-05 era) Smart Dim model instead of the default V2
581 // (~2018-11) model.
582 const base::Feature kSmartDimModelV3{"SmartDimModelV3",
583                                      base::FEATURE_DISABLED_BY_DEFAULT};
584 
585 // This feature:
586 // - Creates a new "Sync your settings" section in Chrome OS settings
587 // - Moves app, wallpaper and Wi-Fi sync to OS settings
588 // - Provides a separate toggle for OS preferences, distinct from browser
589 //   preferences
590 // - Makes the OS ModelTypes run in sync transport mode, controlled by a
591 //   master pref for the OS sync feature
592 // - Updates the OOBE sync consent screen
593 //
594 // NOTE: The feature is rolling out via a client-side Finch trial, so the actual
595 // state will vary. See config in
596 // chrome/browser/chromeos/sync/split_settings_sync_field_trial.cc
597 const base::Feature kSplitSettingsSync{"SplitSettingsSync",
598                                        base::FEATURE_DISABLED_BY_DEFAULT};
599 
600 // Enables a settings UI toggle that controls Suggested Content status. Also
601 // enables a corresponding notice in the Launcher about Suggested Content.
602 const base::Feature kSuggestedContentToggle{"SuggestedContentToggle",
603                                             base::FEATURE_ENABLED_BY_DEFAULT};
604 
605 // Enables or disables using the system input engine for physical typing in
606 // languages based on latin script.
607 const base::Feature kSystemLatinPhysicalTyping{
608     "SystemLatinPhysicalTyping", base::FEATURE_DISABLED_BY_DEFAULT};
609 
610 // Enables Chrome OS Telemetry Extension.
611 const base::Feature kTelemetryExtension{"TelemetryExtension",
612                                         base::FEATURE_DISABLED_BY_DEFAULT};
613 
614 // Enables unified media view in Files app to browse recently-modified media
615 // files from local local, Google Drive, and Android.
616 const base::Feature kUnifiedMediaView{"UnifiedMediaView",
617                                       base::FEATURE_ENABLED_BY_DEFAULT};
618 
619 // Enables the updated cellular activation UI; see go/cros-cellular-design.
620 const base::Feature kUpdatedCellularActivationUi{
621     "UpdatedCellularActivationUi", base::FEATURE_DISABLED_BY_DEFAULT};
622 
623 // Uses the same browser sync consent dialog as Windows/Mac/Linux. Allows the
624 // user to fully opt-out of browser sync, including marking the IdentityManager
625 // primary account as unconsented. Requires SplitSettingsSync.
626 // NOTE: Call UseBrowserSyncConsent() to test the flag, see implementation.
627 const base::Feature kUseBrowserSyncConsent{"UseBrowserSyncConsent",
628                                            base::FEATURE_DISABLED_BY_DEFAULT};
629 
630 // Use the staging server as part of the Wallpaper App to verify
631 // additions/removals of wallpapers.
632 const base::Feature kUseWallpaperStagingUrl{"UseWallpaperStagingUrl",
633                                             base::FEATURE_DISABLED_BY_DEFAULT};
634 
635 // Use the staging URL as part of the "Messages" feature under "Connected
636 // Devices" settings.
637 const base::Feature kUseMessagesStagingUrl{"UseMessagesStagingUrl",
638                                            base::FEATURE_DISABLED_BY_DEFAULT};
639 
640 // Enables or disables user activity prediction for power management on
641 // Chrome OS.
642 // Defined here rather than in //chrome alongside other related features so that
643 // PowerPolicyController can check it.
644 const base::Feature kUserActivityPrediction{"UserActivityPrediction",
645                                             base::FEATURE_ENABLED_BY_DEFAULT};
646 
647 // Remap search+click to right click instead of the legacy alt+click on
648 // Chrome OS.
649 const base::Feature kUseSearchClickForRightClick{
650     "UseSearchClickForRightClick", base::FEATURE_DISABLED_BY_DEFAULT};
651 
652 // Enable or disable bordered key for virtual keyboard on Chrome OS.
653 const base::Feature kVirtualKeyboardBorderedKey{
654     "VirtualKeyboardBorderedKey", base::FEATURE_DISABLED_BY_DEFAULT};
655 
656 // Enable or disable the camera/mic indicators/notifications for VMs.
657 const base::Feature kVmCameraMicIndicatorsAndNotifications{
658     "VmCameraMicIndicatorsAndNotifications", base::FEATURE_DISABLED_BY_DEFAULT};
659 
660 // Controls whether to enable syncing of Wi-Fi configurations between
661 // ChromeOS and a connected Android phone.
662 const base::Feature kWifiSyncAndroid{"WifiSyncAndroid",
663                                      base::FEATURE_DISABLED_BY_DEFAULT};
664 
665 // Enable or disable MOZC IME to use protobuf as interactive message format.
666 const base::Feature kImeMozcProto{"ImeMozcProto",
667                                   base::FEATURE_ENABLED_BY_DEFAULT};
668 
669 // Force enable recreating the LXD DB at LXD launch.
670 const base::Feature kCrostiniResetLxdDb{"CrostiniResetLxdDb",
671                                         base::FEATURE_DISABLED_BY_DEFAULT};
672 
673 ////////////////////////////////////////////////////////////////////////////////
674 
IsAmbientModeEnabled()675 bool IsAmbientModeEnabled() {
676   return base::FeatureList::IsEnabled(kAmbientModeFeature);
677 }
678 
IsAmbientModePhotoPreviewEnabled()679 bool IsAmbientModePhotoPreviewEnabled() {
680   return base::FeatureList::IsEnabled(kAmbientModePhotoPreviewFeature);
681 }
682 
IsAmbientModeDevUseProdEnabled()683 bool IsAmbientModeDevUseProdEnabled() {
684   return base::FeatureList::IsEnabled(kAmbientModeDevUseProdFeature);
685 }
686 
IsBetterUpdateEnabled()687 bool IsBetterUpdateEnabled() {
688   return base::FeatureList::IsEnabled(kBetterUpdateScreen);
689 }
690 
IsChildSpecificSigninEnabled()691 bool IsChildSpecificSigninEnabled() {
692   return base::FeatureList::IsEnabled(kChildSpecificSignin);
693 }
694 
IsDeepLinkingEnabled()695 bool IsDeepLinkingEnabled() {
696   return base::FeatureList::IsEnabled(kOsSettingsDeepLinking);
697 }
698 
IsDiagnosticsAppEnabled()699 bool IsDiagnosticsAppEnabled() {
700   return base::FeatureList::IsEnabled(kDiagnosticsApp);
701 }
702 
IsHostnameSettingEnabled()703 bool IsHostnameSettingEnabled() {
704   return base::FeatureList::IsEnabled(kEnableHostnameSetting);
705 }
706 
IsFamilyLinkOnSchoolDeviceEnabled()707 bool IsFamilyLinkOnSchoolDeviceEnabled() {
708   return base::FeatureList::IsEnabled(kFamilyLinkOnSchoolDevice);
709 }
710 
IsImeSandboxEnabled()711 bool IsImeSandboxEnabled() {
712   return base::FeatureList::IsEnabled(kEnableImeSandbox);
713 }
714 
IsInstantTetheringBackgroundAdvertisingSupported()715 bool IsInstantTetheringBackgroundAdvertisingSupported() {
716   return base::FeatureList::IsEnabled(
717       kInstantTetheringBackgroundAdvertisementSupport);
718 }
719 
IsKerberosSettingsSectionEnabled()720 bool IsKerberosSettingsSectionEnabled() {
721   return base::FeatureList::IsEnabled(kKerberosSettingsSection);
722 }
723 
IsLacrosSupportEnabled()724 bool IsLacrosSupportEnabled() {
725   return base::FeatureList::IsEnabled(kLacrosSupport);
726 }
727 
IsLoginDeviceManagementDisclosureEnabled()728 bool IsLoginDeviceManagementDisclosureEnabled() {
729   return base::FeatureList::IsEnabled(kLoginDeviceManagementDisclosure);
730 }
731 
IsLoginDisplayPasswordButtonEnabled()732 bool IsLoginDisplayPasswordButtonEnabled() {
733   return base::FeatureList::IsEnabled(kLoginDisplayPasswordButton);
734 }
735 
IsMinimumChromeVersionEnabled()736 bool IsMinimumChromeVersionEnabled() {
737   return base::FeatureList::IsEnabled(kMinimumChromeVersion);
738 }
739 
IsClipboardHistoryEnabled()740 bool IsClipboardHistoryEnabled() {
741   return base::FeatureList::IsEnabled(kClipboardHistory) ||
742          base::FeatureList::IsEnabled(kClipboardHistorySimpleRender);
743 }
744 
IsClipboardHistoryNudgeSessionResetEnabled()745 bool IsClipboardHistoryNudgeSessionResetEnabled() {
746   return base::FeatureList::IsEnabled(kClipboardHistoryNudgeSessionReset);
747 }
748 
IsClipboardHistorySimpleRenderEnabled()749 bool IsClipboardHistorySimpleRenderEnabled() {
750   return base::FeatureList::IsEnabled(kClipboardHistory) ||
751          base::FeatureList::IsEnabled(kClipboardHistorySimpleRender);
752 }
753 
IsPhoneHubEnabled()754 bool IsPhoneHubEnabled() {
755   return base::FeatureList::IsEnabled(kPhoneHub);
756 }
757 
IsPhoneHubUseBleEnabled()758 bool IsPhoneHubUseBleEnabled() {
759   return base::FeatureList::IsEnabled(kPhoneHubUseBle) && IsPhoneHubEnabled();
760 }
761 
IsPinAutosubmitFeatureEnabled()762 bool IsPinAutosubmitFeatureEnabled() {
763   return base::FeatureList::IsEnabled(kQuickUnlockPinAutosubmit);
764 }
765 
IsPinAutosubmitBackfillFeatureEnabled()766 bool IsPinAutosubmitBackfillFeatureEnabled() {
767   return base::FeatureList::IsEnabled(kQuickUnlockPinAutosubmitBackfill);
768 }
769 
IsQuickAnswersDogfood()770 bool IsQuickAnswersDogfood() {
771   return base::FeatureList::IsEnabled(kQuickAnswersDogfood);
772 }
773 
IsQuickAnswersEnabled()774 bool IsQuickAnswersEnabled() {
775   return base::FeatureList::IsEnabled(kQuickAnswers);
776 }
777 
IsQuickAnswersTextAnnotatorEnabled()778 bool IsQuickAnswersTextAnnotatorEnabled() {
779   return base::FeatureList::IsEnabled(kQuickAnswersTextAnnotator);
780 }
781 
IsQuickAnswersTranslationEnabled()782 bool IsQuickAnswersTranslationEnabled() {
783   return base::FeatureList::IsEnabled(kQuickAnswersTranslation);
784 }
785 
IsQuickAnswersTranslationCloudAPIEnabled()786 bool IsQuickAnswersTranslationCloudAPIEnabled() {
787   return base::FeatureList::IsEnabled(kQuickAnswersTranslationCloudAPI);
788 }
789 
IsQuickAnswersOnEditableTextEnabled()790 bool IsQuickAnswersOnEditableTextEnabled() {
791   return base::FeatureList::IsEnabled(kQuickAnswersOnEditableText);
792 }
793 
IsSplitSettingsSyncEnabled()794 bool IsSplitSettingsSyncEnabled() {
795   return base::FeatureList::IsEnabled(kSplitSettingsSync);
796 }
797 
IsViewBasedMultiprofileLoginEnabled()798 bool IsViewBasedMultiprofileLoginEnabled() {
799   return base::FeatureList::IsEnabled(kViewBasedMultiprofileLogin);
800 }
801 
IsWifiSyncAndroidEnabled()802 bool IsWifiSyncAndroidEnabled() {
803   return base::FeatureList::IsEnabled(kWifiSyncAndroid);
804 }
805 
ShouldShowPlayStoreInDemoMode()806 bool ShouldShowPlayStoreInDemoMode() {
807   return base::FeatureList::IsEnabled(kShowPlayInDemoMode);
808 }
809 
ShouldUseBrowserSyncConsent()810 bool ShouldUseBrowserSyncConsent() {
811   // UseBrowserSyncConsent requires SplitSettingsSync.
812   return base::FeatureList::IsEnabled(kSplitSettingsSync) &&
813          base::FeatureList::IsEnabled(kUseBrowserSyncConsent);
814 }
815 
ShouldUseV1DeviceSync()816 bool ShouldUseV1DeviceSync() {
817   return !ShouldUseV2DeviceSync() ||
818          !base::FeatureList::IsEnabled(
819              chromeos::features::kDisableCryptAuthV1DeviceSync);
820 }
821 
ShouldUseV2DeviceSync()822 bool ShouldUseV2DeviceSync() {
823   return base::FeatureList::IsEnabled(
824              chromeos::features::kCryptAuthV2Enrollment) &&
825          base::FeatureList::IsEnabled(
826              chromeos::features::kCryptAuthV2DeviceSync);
827 }
828 
829 }  // namespace features
830 }  // namespace chromeos
831