blob: 2a631adcb8c8acff4c57ceb7ce9be4d3deee2e6c [file] [log] [blame]
Matt Falkenhagen5cc652792018-06-21 10:34:331// 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 "third_party/blink/public/common/features.h"
6
Aran Gilman5e9672bed2019-08-02 19:07:497#include "base/feature_list.h"
Scott Haseley8eefdcd2018-08-22 16:50:198#include "build/build_config.h"
Hiroki Nakagawa893ee502019-02-04 06:49:539#include "services/network/public/cpp/features.h"
Aran Gilman5e9672bed2019-08-02 19:07:4910#include "third_party/blink/public/common/forcedark/forcedark_switches.h"
Scott Haseley8eefdcd2018-08-22 16:50:1911
Matt Falkenhagen5cc652792018-06-21 10:34:3312namespace blink {
13namespace features {
14
Yao Xiao2c1171a2019-04-01 23:44:3215// Enable intervention for download that was initiated from or occurred in an ad
16// frame without user activation.
17const base::Feature kBlockingDownloadsInAdFrameWithoutUserActivation{
18 "BlockingDownloadsInAdFrameWithoutUserActivation",
Yao Xiao3f9e4272019-05-23 15:22:4619 base::FEATURE_ENABLED_BY_DEFAULT};
Yao Xiao2c1171a2019-04-01 23:44:3220
Stephen Chenney8c442a582020-06-25 18:18:3921// Enable defer commits to avoid flash of unstyled content, for same origin
22// navigation only.
Stephen Chenney1bcaec832019-10-10 18:31:0123const base::Feature kPaintHolding{"PaintHolding",
24 base::FEATURE_ENABLED_BY_DEFAULT};
Stephen Chenneyde6e5c82019-01-21 01:56:0425
Stephen Chenney8c442a582020-06-25 18:18:3926// Enable defer commits to avoid flash of unstyled content, for all navigation.
27const base::Feature kPaintHoldingCrossOrigin{"PaintHoldingCrossOrigin",
28 base::FEATURE_DISABLED_BY_DEFAULT};
29
Matt Falkenhagenc25fea42018-07-17 07:13:5230// Enable eagerly setting up a CacheStorage interface pointer and
31// passing it to service workers on startup as an optimization.
Ben Kelly2c1cdd62020-05-04 22:05:0432// TODO(crbug/1077916): Re-enable once the issue with COOP/COEP is fixed.
Matt Falkenhagenc25fea42018-07-17 07:13:5233const base::Feature kEagerCacheStorageSetupForServiceWorkers{
34 "EagerCacheStorageSetupForServiceWorkers",
Ben Kelly2c1cdd62020-05-04 22:05:0435 base::FEATURE_DISABLED_BY_DEFAULT};
Matt Falkenhagenc25fea42018-07-17 07:13:5236
Peter Kvitek197eaf72018-12-04 19:14:5637// Controls script streaming.
38const base::Feature kScriptStreaming{"ScriptStreaming",
39 base::FEATURE_ENABLED_BY_DEFAULT};
40
Leszek Swirskif75c1912019-05-29 10:08:2541// Allow streaming small (<30kB) scripts.
42const base::Feature kSmallScriptStreaming{"SmallScriptStreaming",
43 base::FEATURE_DISABLED_BY_DEFAULT};
44
Keishi Hattori9e106922019-04-15 09:06:0345// Enables user level memory pressure signal generation on Android.
46const base::Feature kUserLevelMemoryPressureSignal{
47 "UserLevelMemoryPressureSignal", base::FEATURE_DISABLED_BY_DEFAULT};
48
Aditya Keerthi6a933902019-03-14 21:09:2749// Perform memory purges after freezing only if all pages are frozen.
50const base::Feature kFreezePurgeMemoryAllPagesFrozen{
51 "FreezePurgeMemoryAllPagesFrozen", base::FEATURE_DISABLED_BY_DEFAULT};
52
John Delaneyac24e572019-04-30 19:47:0253// Freezes the user-agent as part of https://github.com/WICG/ua-client-hints.
54const base::Feature kFreezeUserAgent{"FreezeUserAgent",
55 base::FEATURE_DISABLED_BY_DEFAULT};
56
Ulan Degenbaev13d709c2020-07-14 20:15:2457const base::Feature kMeasureMemoryExperiment{"MeasureMemoryExperiment",
58 base::FEATURE_DISABLED_BY_DEFAULT};
59
Vladimir Levin43758ecc2019-05-09 18:04:0360// Enable Display Locking JavaScript APIs.
61const base::Feature kDisplayLocking{"DisplayLocking",
62 base::FEATURE_DISABLED_BY_DEFAULT};
63
Sam Sebree2dd45c4f2019-12-13 05:51:4964const base::Feature kJSONModules{"JSONModules",
65 base::FEATURE_DISABLED_BY_DEFAULT};
66
Mason Freedd71a9642020-06-03 01:35:0767const base::Feature kForceSynchronousHTMLParsing{
68 "ForceSynchronousHTMLParsing", base::FEATURE_DISABLED_BY_DEFAULT};
69
Camillo Brunia19d7fc2020-03-17 07:53:3570// Enables top-level await in modules.
71const base::Feature kTopLevelAwait{"TopLevelAwait",
72 base::FEATURE_DISABLED_BY_DEFAULT};
73
Ian Kilpatricke68ef11a2018-07-04 03:52:1074// Enable LayoutNG.
Emil A Eklund69eeb562019-07-03 01:38:3075const base::Feature kLayoutNG{"LayoutNG", base::FEATURE_ENABLED_BY_DEFAULT};
Ian Kilpatricke68ef11a2018-07-04 03:52:1076
Kent Tamura2f4e19732020-08-14 03:18:4977// Enable LayoutNGFieldset by default. This feature is for a kill switch.
78const base::Feature kLayoutNGFieldset{"LayoutNGFieldset",
79 base::FEATURE_ENABLED_BY_DEFAULT};
80
Kent Tamura4187dc92020-06-18 04:39:3581// Enable LayoutNGRuby by default. This feature is for a kill switch.
82const base::Feature kLayoutNGRuby{"LayoutNGRuby",
83 base::FEATURE_ENABLED_BY_DEFAULT};
84
Koji Ishii14c52bd2020-06-11 17:00:5985const base::Feature kFragmentItem{"FragmentItem",
86 base::FEATURE_DISABLED_BY_DEFAULT};
87
Makoto Shimazu172eec02018-11-29 06:21:4488const base::Feature kMixedContentAutoupgrade{"AutoupgradeMixedContent",
Carlos IL9970a942020-02-14 01:16:5089 base::FEATURE_ENABLED_BY_DEFAULT};
Makoto Shimazu172eec02018-11-29 06:21:4490
Tarun Bansal422f9012019-01-23 16:55:5891// Used to control the collection of anchor element metrics (crbug.com/856683).
92// If kNavigationPredictor is enabled, then metrics of anchor elements
93// in the first viewport after the page load and the metrics of the clicked
94// anchor element will be extracted and recorded. Additionally, navigation
95// predictor may preconnect/prefetch to resources/origins to make the
96// future navigations faster.
Sofiya Semenovae4e076152019-07-29 20:10:2797const base::Feature kNavigationPredictor {
98 "NavigationPredictor",
99#if defined(OS_ANDROID)
100 base::FEATURE_ENABLED_BY_DEFAULT
101#else
102 base::FEATURE_DISABLED_BY_DEFAULT
103#endif
104};
Tarun Bansal422f9012019-01-23 16:55:58105
Benoit Lize66684b22020-08-07 12:30:22106const base::Feature kParentNodeReplaceChildren{
107 "ParentNodeReplaceChildren", base::FEATURE_ENABLED_BY_DEFAULT};
Yu Hanae4c3b72020-07-08 21:48:58108
Hiroki Nakagawa61ee0042019-01-22 06:30:26109// Enable browser-initiated dedicated worker script loading
110// (PlzDedicatedWorker). https://crbug.com/906991
111const base::Feature kPlzDedicatedWorker{"PlzDedicatedWorker",
112 base::FEATURE_DISABLED_BY_DEFAULT};
113
Daniel Murphy95792ef2018-10-04 01:29:55114// Enable Portals. https://crbug.com/865123.
Jeremy Romanf369a9d62020-06-24 19:59:54115// For the current origin trial (https://crbug.com/1040212), this is enabled on
116// Android only.
117const base::Feature kPortals {
118 "Portals",
119#if defined(OS_ANDROID)
120 base::FEATURE_ENABLED_BY_DEFAULT
121#else
122 base::FEATURE_DISABLED_BY_DEFAULT
123#endif
124};
Daniel Murphy95792ef2018-10-04 01:29:55125
Jeremy Roman20366e42019-10-22 17:48:08126// When kPortals is enabled, allow portals to load content that is third-party
127// (cross-origin) to the hosting page. Otherwise has no effect.
128//
Jeremy Roman20366e42019-10-22 17:48:08129// https://crbug.com/1013389
130const base::Feature kPortalsCrossOrigin{"PortalsCrossOrigin",
Jeremy Romanf369a9d62020-06-24 19:59:54131 base::FEATURE_DISABLED_BY_DEFAULT};
Jeremy Roman20366e42019-10-22 17:48:08132
Tarun Bansal8df12b52019-02-15 05:46:30133// Enable limiting previews loading hints to specific resource types.
134const base::Feature kPreviewsResourceLoadingHintsSpecificResourceTypes{
135 "PreviewsResourceLoadingHintsSpecificResourceTypes",
136 base::FEATURE_DISABLED_BY_DEFAULT};
137
Aditya Keerthie84331b32019-03-20 15:25:52138// Perform a memory purge after a renderer is backgrounded. Formerly labelled as
139// the "PurgeAndSuspend" experiment.
140//
141// TODO(adityakeerthi): Disabled by default on Mac and Android for historical
142// reasons. Consider enabling by default if experiment results are positive.
143// https://crbug.com/926186
144const base::Feature kPurgeRendererMemoryWhenBackgrounded {
145 "PurgeRendererMemoryWhenBackgrounded",
Avi Drissman916c12f2020-07-29 16:59:13146#if defined(OS_MAC) || defined(OS_ANDROID)
Aditya Keerthie84331b32019-03-20 15:25:52147 base::FEATURE_DISABLED_BY_DEFAULT
148#else
149 base::FEATURE_ENABLED_BY_DEFAULT
150#endif
151};
152
David Bokan911bded2018-11-27 23:23:32153// Enable Implicit Root Scroller. https://crbug.com/903260.
David Bokan145b5472019-05-22 14:38:44154// TODO(bokan): Temporarily disabled on desktop platforms to address issues
155// with non-overlay scrollbars. https://crbug.com/948059.
156const base::Feature kImplicitRootScroller {
157 "ImplicitRootScroller",
158#if defined(OS_ANDROID)
159 base::FEATURE_ENABLED_BY_DEFAULT
160#else
161 base::FEATURE_DISABLED_BY_DEFAULT
162#endif
163};
David Bokan911bded2018-11-27 23:23:32164
Cathie Cheneac70602019-10-10 02:55:29165// Enable CSSOM View Scroll Coordinates. https://crbug.com/721759.
166const base::Feature kCSSOMViewScrollCoordinates{
167 "CSSOMViewScrollCoordinates", base::FEATURE_DISABLED_BY_DEFAULT};
168
Darwin Huangf588cc8e2019-12-13 22:24:56169// Enables Raw Clipboard. https://crbug.com/897289.
170const base::Feature kRawClipboard{"RawClipboard",
171 base::FEATURE_DISABLED_BY_DEFAULT};
172
Makoto Shimazu172eec02018-11-29 06:21:44173// Enables usage of getDisplayMedia() that allows capture of web content, see
174// https://crbug.com/865060.
175const base::Feature kRTCGetDisplayMedia{"RTCGetDisplayMedia",
176 base::FEATURE_ENABLED_BY_DEFAULT};
177
178// Changes the default RTCPeerConnection constructor behavior to use Unified
179// Plan as the SDP semantics. When the feature is enabled, Unified Plan is used
180// unless the default is overridden (by passing {sdpSemantics:'plan-b'} as the
181// argument).
182const base::Feature kRTCUnifiedPlanByDefault{"RTCUnifiedPlanByDefault",
Henrik Boström07021ec82019-01-17 22:23:56183 base::FEATURE_ENABLED_BY_DEFAULT};
Makoto Shimazu172eec02018-11-29 06:21:44184
Johannes Kronad5a4532019-01-09 11:17:46185// Determines if the SDP attrbute extmap-allow-mixed should be offered by
186// default or not. The default value can be overridden by passing
187// {offerExtmapAllowMixed:true} as an argument to the RTCPeerConnection
188// constructor.
189const base::Feature kRTCOfferExtmapAllowMixed{
190 "RTCOfferExtmapAllowMixed", base::FEATURE_DISABLED_BY_DEFAULT};
191
Ulan Degenbaev4b3bc29b2020-03-13 17:09:00192// Prevents workers from sending IsolateInBackgroundNotification to V8
193// and thus instructs V8 to favor performance over memory on workers.
194const base::Feature kV8OptimizeWorkersForPerformance{
Ulan Degenbaev7acd73ea2020-04-07 16:02:33195 "V8OptimizeWorkersForPerformance", base::FEATURE_ENABLED_BY_DEFAULT};
Ulan Degenbaev4b3bc29b2020-03-13 17:09:00196
Antonio Gomesb4718572019-09-11 02:55:48197// Enables negotiation of experimental multiplex codec in SDP.
198const base::Feature kWebRtcMultiplexCodec{"WebRTC-MultiplexCodec",
199 base::FEATURE_DISABLED_BY_DEFAULT};
200
201// Causes WebRTC to replace host ICE candidate IP addresses with generated
202// names ending in ".local" and resolve them using mDNS.
203// http://crbug.com/878465
204const base::Feature kWebRtcHideLocalIpsWithMdns{
205 "WebRtcHideLocalIpsWithMdns", base::FEATURE_ENABLED_BY_DEFAULT};
206
OlivierLi95a0f6a52020-06-18 15:40:08207// When enabled, wake ups from throttleable TaskQueues are limited to 1 per
208// minute in a page that has been backgrounded for 5 minutes.
209//
210// Intensive wake up throttling is enforced in addition to other throttling
211// mechanisms:
212// - 1 wake up per second in a background page or hidden cross-origin frame
213// - 1% CPU time in a page that has been backgrounded for 10 seconds
214//
215// Feature tracking bug: https://crbug.com/1075553
216//
217// Note that the base::Feature should not be read from;
218// rather the provided accessors should be used, which also take into account
219// the managed policy override of the feature.
220const base::Feature kIntensiveWakeUpThrottling{
221 "IntensiveWakeUpThrottling", base::FEATURE_DISABLED_BY_DEFAULT};
222
Olivier Li5f02c1a2020-07-31 16:13:44223// When enabled, timers with timeout=0 are not throttled.
224const base::Feature kOptOutZeroTimeoutTimersFromThrottling{
225 "OptOutZeroTimeoutTimersFromThrottling", base::FEATURE_DISABLED_BY_DEFAULT};
226
Francois Doray66c328cb2020-07-13 15:46:13227// When enabled, no throttling is applied to a page when it uses WebRTC.
228//
229// This allows a page to use a timer to do video processing on frames. An
230// event-driven mechanism should be provided to do video processing. When it is
231// available, this feature should be removed. https://crbug.com/1101806
232const base::Feature kOptOutWebRTCFromAllThrottling{
233 "OptOutWebRTCFromAllThrottling", base::FEATURE_DISABLED_BY_DEFAULT};
234
Francois Doray6cff4e02020-07-01 01:12:58235// Name of the parameter that controls the grace period during which there is no
236// intensive wake up throttling after a page is hidden. Defined here to allow
237// access from about_flags.cc. The FeatureParam is defined in
238// third_party/blink/renderer/platform/scheduler/common/features.cc.
239const char kIntensiveWakeUpThrottling_GracePeriodSeconds_Name[] =
240 "grace_period_seconds";
241
Antonio Gomesf3bcd512019-09-03 21:27:17242#if BUILDFLAG(RTC_USE_H264) && BUILDFLAG(ENABLE_FFMPEG_VIDEO_DECODERS)
243// Run-time feature for the |rtc_use_h264| encoder/decoder.
244const base::Feature kWebRtcH264WithOpenH264FFmpeg{
245 "WebRTC-H264WithOpenH264FFmpeg", base::FEATURE_ENABLED_BY_DEFAULT};
246#endif // BUILDFLAG(RTC_USE_H264) && BUILDFLAG(ENABLE_FFMPEG_VIDEO_DECODERS)
247
Makoto Shimazua8b3d742019-04-05 06:55:51248// Experiment of the delay from navigation to starting an update of a service
249// worker's script.
250const base::Feature kServiceWorkerUpdateDelay{
251 "ServiceWorkerUpdateDelay", base::FEATURE_DISABLED_BY_DEFAULT};
252
Scott Haseley8eefdcd2018-08-22 16:50:19253// Freeze scheduler task queues in background after allowed grace time.
254// "stop" is a legacy name.
255const base::Feature kStopInBackground {
256 "stop-in-background",
257#if defined(OS_ANDROID)
258 base::FEATURE_ENABLED_BY_DEFAULT
259#else
260 base::FEATURE_DISABLED_BY_DEFAULT
261#endif
262};
263
Takashi Sakamotoc19fc2b2019-04-10 06:30:52264// Freeze scheduler task queues in background on network idle.
265// This feature only works if stop-in-background is enabled.
266const base::Feature kFreezeBackgroundTabOnNetworkIdle{
267 "freeze-background-tab-on-network-idle", base::FEATURE_DISABLED_BY_DEFAULT};
268
Shubhie Panicker60bd4b02018-09-26 00:02:15269// Freeze non-timer task queues in background, after allowed grace time.
270// "stop" is a legacy name.
Dave Tapuska9140c552019-05-30 16:18:56271const base::Feature kStopNonTimersInBackground{
272 "stop-non-timers-in-background", base::FEATURE_ENABLED_BY_DEFAULT};
Scott Haseley7757f6c2018-08-03 14:33:23273
Brandon Maslenda12cf82019-08-23 20:54:18274// Enable the Storage Access API. https://crbug.com/989663.
275const base::Feature kStorageAccessAPI{"StorageAccessAPI",
276 base::FEATURE_DISABLED_BY_DEFAULT};
277
David Bokane9370c22019-02-14 15:19:58278// Enable text snippets in URL fragments. https://crbug.com/919204.
279const base::Feature kTextFragmentAnchor{"TextFragmentAnchor",
Nick Burris62f8d5f02020-01-16 22:54:51280 base::FEATURE_ENABLED_BY_DEFAULT};
David Bokane9370c22019-02-14 15:19:58281
Marijn Kruisselbrinkca4bb5e2019-04-22 18:19:42282// Writable files and native file system access. https://crbug.com/853326
283const base::Feature kNativeFileSystemAPI{"NativeFileSystemAPI",
Marijn Kruisselbrink4cc3ec22019-09-04 16:28:20284 base::FEATURE_ENABLED_BY_DEFAULT};
Makoto Shimazu172eec02018-11-29 06:21:44285
Jay Harris583f48922019-05-06 05:55:24286// File handling integration. https://crbug.com/829689
287const base::Feature kFileHandlingAPI{"FileHandlingAPI",
288 base::FEATURE_DISABLED_BY_DEFAULT};
289
kdillon66bf5b522019-01-02 22:08:30290// Allows for synchronous XHR requests during page dismissal
Katie Dillon8b357312019-09-19 13:23:23291const base::Feature kAllowSyncXHRInPageDismissal{
292 "AllowSyncXHRInPageDismissal", base::FEATURE_DISABLED_BY_DEFAULT};
kdillon66bf5b522019-01-02 22:08:30293
Olivier Yiptongb60d2c42020-01-10 22:47:15294// Font enumeration and table access. https://crbug.com/535764 and
295// https://crbug.com/982054.
296const base::Feature kFontAccess{"FontAccess",
297 base::FEATURE_DISABLED_BY_DEFAULT};
298
Mason Freed6f146312020-06-27 05:12:55299// Allows Web Components v0 to be re-enabled.
300const base::Feature kWebComponentsV0{"WebComponentsV0",
301 base::FEATURE_DISABLED_BY_DEFAULT};
302
Dominic Farolino780df942019-09-04 06:49:44303// Prefetch request properties are updated to be privacy-preserving. See
304// crbug.com/988956.
305const base::Feature kPrefetchPrivacyChanges{"PrefetchPrivacyChanges",
306 base::FEATURE_DISABLED_BY_DEFAULT};
Dominic Farolino693fd72d2019-08-05 11:09:44307
Carlos ILd3be52b2018-10-08 17:57:18308const char kMixedContentAutoupgradeModeParamName[] = "mode";
Carlos IL9970a942020-02-14 01:16:50309const char kMixedContentAutoupgradeModeAllPassive[] = "all-passive";
Carlos ILd3be52b2018-10-08 17:57:18310
Sasha McIntoshe889f9f2019-09-03 21:01:57311// Decodes jpeg 4:2:0 formatted images to YUV instead of RGBX and stores in this
312// format in the image decode cache. See crbug.com/919627 for details on the
313// feature.
Sasha McIntosh633b6312020-06-12 19:45:19314const base::Feature kDecodeJpeg420ImagesToYUV{
315 "DecodeJpeg420ImagesToYUV", base::FEATURE_DISABLED_BY_DEFAULT};
Sasha McIntoshe889f9f2019-09-03 21:01:57316
Madeleine Barowsky45be21a42018-12-07 18:39:30317// Decodes lossy WebP images to YUV instead of RGBX and stores in this format
318// in the image decode cache. See crbug.com/900264 for details on the feature.
319const base::Feature kDecodeLossyWebPImagesToYUV{
Sasha McIntoshf670a6b2020-01-09 18:27:09320 "DecodeLossyWebPImagesToYUV", base::FEATURE_ENABLED_BY_DEFAULT};
Madeleine Barowsky45be21a42018-12-07 18:39:30321
Takashi Toyoshimaa91506d2019-03-28 05:44:42322// Enables cache-aware WebFonts loading. See https://crbug.com/570205.
323// The feature is disabled on Android for WebView API issue discussed at
324// https://crbug.com/942440.
325const base::Feature kWebFontsCacheAwareTimeoutAdaption {
326 "WebFontsCacheAwareTimeoutAdaption",
327#if defined(OS_ANDROID)
328 base::FEATURE_DISABLED_BY_DEFAULT
329#else
330 base::FEATURE_ENABLED_BY_DEFAULT
331#endif
332};
333
Ehsan Karamadbe95d122019-05-10 17:59:06334// Enabled to block programmatic focus in subframes when not triggered by user
335// activation (see htpps://crbug.com/954349).
336const base::Feature kBlockingFocusWithoutUserActivation{
337 "BlockingFocusWithoutUserActivation", base::FEATURE_DISABLED_BY_DEFAULT};
338
Hongchan Choi370d3af2019-05-20 20:56:58339const base::Feature kAudioWorkletRealtimeThread{
340 "AudioWorkletRealtimeThread", base::FEATURE_DISABLED_BY_DEFAULT};
341
Ryan Sturm139c3ac2019-07-12 18:52:53342// A feature to reduce the set of resources fetched by No-State Prefetch.
Robert Ogden2bb6a2522020-06-05 00:28:10343const base::Feature kLightweightNoStatePrefetch {
Ryan Sturmf223cb02019-10-04 18:02:00344 "LightweightNoStatePrefetch",
345#if defined(OS_ANDROID)
346 base::FEATURE_ENABLED_BY_DEFAULT
347#else
348 base::FEATURE_DISABLED_BY_DEFAULT
349#endif
350};
Ryan Sturm139c3ac2019-07-12 18:52:53351
Aran Gilman5e9672bed2019-08-02 19:07:49352// Automatically convert light-themed pages to use a Blink-generated dark theme
353const base::Feature kForceWebContentsDarkMode{
354 "WebContentsForceDark", base::FEATURE_DISABLED_BY_DEFAULT};
355
Michael Crouseb7acd772020-02-20 02:56:26356// A feature to enable using the smallest image specified within image srcset
357// for users with Save Data enabled.
358const base::Feature kSaveDataImgSrcset{"SaveDataImgSrcset",
359 base::FEATURE_DISABLED_BY_DEFAULT};
360
Aran Gilman5e9672bed2019-08-02 19:07:49361// Which algorithm should be used for color inversion?
362const base::FeatureParam<ForceDarkInversionMethod>::Option
363 forcedark_inversion_method_options[] = {
364 {ForceDarkInversionMethod::kUseBlinkSettings,
365 "use_blink_settings_for_method"},
366 {ForceDarkInversionMethod::kHslBased, "hsl_based"},
Aran Gilman8b3ca41c2019-08-12 18:59:04367 {ForceDarkInversionMethod::kCielabBased, "cielab_based"},
368 {ForceDarkInversionMethod::kRgbBased, "rgb_based"}};
Aran Gilman5e9672bed2019-08-02 19:07:49369
370const base::FeatureParam<ForceDarkInversionMethod>
371 kForceDarkInversionMethodParam{&kForceWebContentsDarkMode,
372 "inversion_method",
373 ForceDarkInversionMethod::kUseBlinkSettings,
374 &forcedark_inversion_method_options};
375
376// Should images be inverted?
377const base::FeatureParam<ForceDarkImageBehavior>::Option
378 forcedark_image_behavior_options[] = {
379 {ForceDarkImageBehavior::kUseBlinkSettings,
380 "use_blink_settings_for_images"},
381 {ForceDarkImageBehavior::kInvertNone, "none"},
382 {ForceDarkImageBehavior::kInvertSelectively, "selective"}};
383
384const base::FeatureParam<ForceDarkImageBehavior> kForceDarkImageBehaviorParam{
385 &kForceWebContentsDarkMode, "image_behavior",
386 ForceDarkImageBehavior::kUseBlinkSettings,
387 &forcedark_image_behavior_options};
388
389// Do not invert text lighter than this.
390// Range: 0 (do not invert any text) to 256 (invert all text)
391// Can also set to -1 to let Blink's internal settings control the value
392const base::FeatureParam<int> kForceDarkTextLightnessThresholdParam{
393 &kForceWebContentsDarkMode, "text_lightness_threshold", -1};
394
395// Do not invert backgrounds darker than this.
396// Range: 0 (invert all backgrounds) to 256 (invert no backgrounds)
397// Can also set to -1 to let Blink's internal settings control the value
398const base::FeatureParam<int> kForceDarkBackgroundLightnessThresholdParam{
399 &kForceWebContentsDarkMode, "background_lightness_threshold", -1};
400
Sergey Silkinc33244f2020-01-31 17:21:30401// Instructs WebRTC to honor the Min/Max Video Encode Accelerator dimensions.
Miguel Casas-Sanchezb6128392020-02-18 15:45:39402const base::Feature kWebRtcUseMinMaxVEADimensions {
403 "WebRtcUseMinMaxVEADimensions",
404 // TODO(crbug.com/1008491): enable other platforms.
405#if defined(OS_CHROMEOS)
406 base::FEATURE_ENABLED_BY_DEFAULT
407#else
408 base::FEATURE_DISABLED_BY_DEFAULT
409#endif
410};
Sergey Silkinc33244f2020-01-31 17:21:30411
Michael Lippautze670df9f2019-07-09 11:39:49412// Blink garbage collection.
413// Enables compaction of backing stores on Blink's heap.
414const base::Feature kBlinkHeapCompaction{"BlinkHeapCompaction",
415 base::FEATURE_ENABLED_BY_DEFAULT};
416// Enables concurrently marking Blink's heap.
417const base::Feature kBlinkHeapConcurrentMarking{
Omer Katz1757893c2020-02-17 12:09:19418 "BlinkHeapConcurrentMarking", base::FEATURE_ENABLED_BY_DEFAULT};
Anton Bikineev9b7b3722019-07-09 13:48:39419// Enables concurrently sweeping Blink's heap.
420const base::Feature kBlinkHeapConcurrentSweeping{
Anton Bikineev204cc752019-08-07 00:26:37421 "BlinkHeapConcurrentSweeping", base::FEATURE_ENABLED_BY_DEFAULT};
Michael Lippautze670df9f2019-07-09 11:39:49422// Enables incrementally marking Blink's heap.
423const base::Feature kBlinkHeapIncrementalMarking{
424 "BlinkHeapIncrementalMarking", base::FEATURE_ENABLED_BY_DEFAULT};
425// Enables a marking stress mode that schedules more garbage collections and
426// also adds additional verification passes.
427const base::Feature kBlinkHeapIncrementalMarkingStress{
428 "BlinkHeapIncrementalMarkingStress", base::FEATURE_DISABLED_BY_DEFAULT};
Michael Lippautze670df9f2019-07-09 11:39:49429
Yoav Weissddfb8d2e2019-07-15 22:34:03430// Enables removing AppCache delays when triggering requests when the HTML was
431// not fetched from AppCache.
432const base::Feature kVerifyHTMLFetchedFromAppCacheBeforeDelay{
433 "VerifyHTMLFetchedFromAppCacheBeforeDelay",
434 base::FEATURE_DISABLED_BY_DEFAULT};
435
Michael Spang8d2303e2019-07-26 01:56:32436// Controls whether we use ThreadPriority::DISPLAY for renderer
437// compositor & IO threads.
438const base::Feature kBlinkCompositorUseDisplayThreadPriority {
439 "BlinkCompositorUseDisplayThreadPriority",
Sunny Sachanandani16944252019-12-04 03:40:49440#if defined(OS_ANDROID) || defined(OS_CHROMEOS) || defined(OS_WIN)
Michael Spang8d2303e2019-07-26 01:56:32441 base::FEATURE_ENABLED_BY_DEFAULT
442#else
443 base::FEATURE_DISABLED_BY_DEFAULT
444#endif
445};
446
Yuki Shiinoa812f492019-08-23 06:47:46447// Ignores cross origin windows in the named property interceptor of Window.
448// https://crbug.com/538562
449const base::Feature kIgnoreCrossOriginWindowWhenNamedAccessOnWindow{
450 "IgnoreCrossOriginWindowWhenNamedAccessOnWindow",
451 base::FEATURE_DISABLED_BY_DEFAULT};
452
Tarun Bansal38792462019-09-04 16:08:11453// When enabled, loading priority of JavaScript requests is lowered when they
454// are force deferred by the intervention.
455const base::Feature kLowerJavaScriptPriorityWhenForceDeferred{
456 "LowerJavaScriptPriorityWhenForceDeferred",
Tarun Bansal755268fe2019-10-18 18:57:40457 base::FEATURE_DISABLED_BY_DEFAULT};
Tarun Bansal38792462019-09-04 16:08:11458
Tarun Bansalf32aaa22020-02-12 16:16:44459// When enabled, scripts in iframes are not force deferred by the DeferAllScript
460// intervention.
461const base::Feature kDisableForceDeferInChildFrames{
462 "DisableForceDeferInChildFrames", base::FEATURE_DISABLED_BY_DEFAULT};
463
rajendrantd5db55f2019-10-19 01:56:59464// Enables redirecting subresources in the page to better compressed and
465// optimized versions to provide data savings.
466const base::Feature kSubresourceRedirect{"SubresourceRedirect",
467 base::FEATURE_DISABLED_BY_DEFAULT};
468
Stefan Zagerfd18161c2019-10-22 20:44:31469// When 'enabled', all cross-origin iframes will get a compositing layer.
470const base::Feature kCompositeCrossOriginIframes{
471 "CompositeCrossOriginIframes", base::FEATURE_DISABLED_BY_DEFAULT};
Yutaka Hirano0b3c319b2019-10-25 17:19:15472
Chris Harrelson70be13d2020-06-03 21:06:52473// When enabled, enforces new interoperable semantics for 3D transforms.
474// See crbug.com/1008483.
475const base::Feature kTransformInterop{"TransformInterop",
476 base::FEATURE_DISABLED_BY_DEFAULT};
477
Yutaka Hirano0b3c319b2019-10-25 17:19:15478// When enabled, beacons (and friends) have ResourceLoadPriority::kLow,
479// not ResourceLoadPriority::kVeryLow.
480const base::Feature kSetLowPriorityForBeacon{"SetLowPriorityForBeacon",
481 base::FEATURE_DISABLED_BY_DEFAULT};
482
Ben Kelly776f59d2019-11-06 16:25:30483// When enabled allows the header name used in the blink
484// CacheStorageCodeCacheHint runtime feature to be modified. This runtime
485// feature disables generating full code cache for responses stored in
486// cache_storage during a service worker install event. The runtime feature
487// must be enabled via the blink runtime feature mechanism, however.
488const base::Feature kCacheStorageCodeCacheHintHeader{
489 "CacheStorageCodeCacheHintHeader", base::FEATURE_DISABLED_BY_DEFAULT};
490const base::FeatureParam<std::string> kCacheStorageCodeCacheHintHeaderName{
491 &kCacheStorageCodeCacheHintHeader, "name", "x-CacheStorageCodeCacheHint"};
492
Francois Doray563453432019-11-20 15:32:17493// When enabled, the beforeunload handler is dispatched when a frame is frozen.
494// This allows the browser to know whether discarding the frame could result in
495// lost user data, at the cost of extra CPU usage. The feature will be removed
496// once we have determine whether the CPU cost is acceptable.
497const base::Feature kDispatchBeforeUnloadOnFreeze{
498 "DispatchBeforeUnloadOnFreeze", base::FEATURE_ENABLED_BY_DEFAULT};
499
Sunny Sachanandani26463422019-12-05 21:35:40500// Enables the use of GpuMemoryBuffer images for low latency 2d canvas.
501// TODO(khushalsagar): Enable this if we're using SurfaceControl and GMBs allow
502// us to overlay these resources.
503const base::Feature kLowLatencyCanvas2dImageChromium {
504 "LowLatencyCanvas2dImageChromium",
505#if defined(OS_CHROMEOS)
506 base::FEATURE_ENABLED_BY_DEFAULT
507#else
508 base::FEATURE_DISABLED_BY_DEFAULT
509#endif // OS_CHROMEOS
510};
511
512// Enables the use of shared image swap chains for low latency 2d canvas.
513const base::Feature kLowLatencyCanvas2dSwapChain{
Sunny Sachanandanib954dc7c2019-12-12 02:50:51514 "LowLatencyCanvas2dSwapChain", base::FEATURE_ENABLED_BY_DEFAULT};
Sunny Sachanandani26463422019-12-05 21:35:40515
516// Enables the use of shared image swap chains for low latency webgl canvas.
Sunny Sachanandanib954dc7c2019-12-12 02:50:51517const base::Feature kLowLatencyWebGLSwapChain{"LowLatencyWebGLSwapChain",
518 base::FEATURE_ENABLED_BY_DEFAULT};
Sunny Sachanandani26463422019-12-05 21:35:40519
Stephen Whitee17b0232020-04-27 23:48:49520// Enables Dawn-accelerated 2D canvas.
521const base::Feature kDawn2dCanvas{"Dawn2dCanvas",
522 base::FEATURE_DISABLED_BY_DEFAULT};
523
Xiaocheng Hud5197fd2020-02-06 07:26:08524const base::Feature kCSSReducedFontLoadingInvalidations{
Xiaocheng Hu75bafe52020-06-22 22:54:27525 "CSSReducedFontLoadingInvalidations", base::FEATURE_ENABLED_BY_DEFAULT};
Xiaocheng Hue5ff8e12020-06-16 21:47:35526const base::Feature kCSSReducedFontLoadingLayoutInvalidations{
527 "CSSReducedFontLoadingLayoutInvalidations",
528 base::FEATURE_DISABLED_BY_DEFAULT};
Xiaocheng Hud5197fd2020-02-06 07:26:08529
Egor Pasko28ec46952020-02-07 15:17:57530// When enabled, frees up CachedMetadata after consumption by script resources
531// and modules. Needed for the experiment in http://crbug.com/1045052.
532const base::Feature kDiscardCodeCacheAfterFirstUse{
533 "DiscardCodeCacheAfterFirstUse", base::FEATURE_DISABLED_BY_DEFAULT};
534
Yutaka Hiranobf410a42020-02-18 08:08:45535// The kill-switch for the fix for https://crbug.com/1051439.
536// TODO(crbug.com/1053369): Remove this around M84.
537const base::Feature kSuppressContentTypeForBeaconMadeWithArrayBufferView{
538 "SuppressContentTypeForBeaconMadeWithArrayBufferView",
539 base::FEATURE_ENABLED_BY_DEFAULT};
540
Rune Lillesveen61f49ee2020-03-02 07:53:49541const base::Feature kBlockHTMLParserOnStyleSheets{
542 "BlockHTMLParserOnStyleSheets", base::FEATURE_DISABLED_BY_DEFAULT};
543
Mason Freed0ebaa772020-06-03 16:11:08544// Kill switch for the new <link disabled> behavior.
545// TODO(crbug.com/1087043): Remove this once the feature has
546// landed and no compat issues are reported.
547const base::Feature kLinkDisabledNewSpecBehavior{
548 "LinkDisabledNewSpecBehavior", base::FEATURE_ENABLED_BY_DEFAULT};
549
Xiaocheng Hud2e807d2020-03-04 21:15:21550// Slightly delays rendering if there are fonts being preloaded, so that
551// they don't miss the first paint if they can be loaded fast enough (e.g.,
552// from the disk cache)
553const base::Feature kFontPreloadingDelaysRendering{
Xiaocheng Hue60457d2020-07-20 06:09:54554 "FontPreloadingDelaysRendering", base::FEATURE_ENABLED_BY_DEFAULT};
555// 50ms is the overall best performing value in our experiments.
Xiaocheng Hud2e807d2020-03-04 21:15:21556const base::FeatureParam<int> kFontPreloadingDelaysRenderingParam{
Xiaocheng Hue60457d2020-07-20 06:09:54557 &kFontPreloadingDelaysRendering, "delay-in-ms", 50};
Xiaocheng Hud2e807d2020-03-04 21:15:21558
David Grogan565f8bb2020-05-27 03:07:40559const base::Feature kFlexNG{"FlexNG", base::FEATURE_ENABLED_BY_DEFAULT};
David Grogan5b3cf162020-03-19 21:53:15560
Dominic Farolino0f55a082020-03-24 09:47:55561const base::Feature kKeepScriptResourceAlive{"KeepScriptResourceAlive",
562 base::FEATURE_DISABLED_BY_DEFAULT};
Dominic Farolino7d3d6f12020-06-10 21:59:46563const base::Feature kDelayAsyncScriptExecution{
564 "DelayAsyncScriptExecution", base::FEATURE_DISABLED_BY_DEFAULT};
565const base::FeatureParam<DelayAsyncScriptDelayType>::Option
566 delay_async_script_execution_delay_types[] = {
567 {DelayAsyncScriptDelayType::kFinishedParsing, "finished_parsing"},
568 {DelayAsyncScriptDelayType::kFirstPaintOrFinishedParsing,
Dominic Farolino53270852020-08-06 22:28:00569 "first_paint_or_finished_parsing"},
570 {DelayAsyncScriptDelayType::kUseOptimizationGuide,
571 "use_optimization_guide"}};
Dominic Farolino7d3d6f12020-06-10 21:59:46572const base::FeatureParam<DelayAsyncScriptDelayType>
573 kDelayAsyncScriptExecutionDelayParam{
574 &kDelayAsyncScriptExecution, "delay_type",
575 DelayAsyncScriptDelayType::kFinishedParsing,
576 &delay_async_script_execution_delay_types};
Dominic Farolino0f55a082020-03-24 09:47:55577
Dominic Farolino0dc13762020-08-26 19:54:50578// Feature and parameters for delaying low priority requests behind "important"
579// (either high or medium priority requests). There are two parameters
580// highlighted below.
581const base::Feature kDelayCompetingLowPriorityRequests{
582 "DelayCompetingLowPriorityRequests", base::FEATURE_DISABLED_BY_DEFAULT};
583// The delay type: We don't want to delay low priority requests behind
584// "important" requests forever. Rather, it makes sense to have this behavior up
585// *until* some relevant loading milestone, which this parameter specifies.
586const base::FeatureParam<DelayCompetingLowPriorityRequestsDelayType>::Option
587 delay_competing_low_priority_requests_delay_types[] = {
588 {DelayCompetingLowPriorityRequestsDelayType::kFirstPaint,
589 "first_paint"},
590 {DelayCompetingLowPriorityRequestsDelayType::kFirstContentfulPaint,
591 "first_contentful_paint"},
592 {DelayCompetingLowPriorityRequestsDelayType::kAlways, "always"}};
593const base::FeatureParam<DelayCompetingLowPriorityRequestsDelayType>
594 kDelayCompetingLowPriorityRequestsDelayParam{
595 &kDelayCompetingLowPriorityRequests, "until",
596 DelayCompetingLowPriorityRequestsDelayType::kFirstContentfulPaint,
597 &delay_competing_low_priority_requests_delay_types};
598// The priority threshold: indicates which ResourceLoadPriority should be
599// considered "important", such that low priority requests are delayed behind
600// in-flight "important" requests.
601const base::FeatureParam<DelayCompetingLowPriorityRequestsThreshold>::Option
602 delay_competing_low_priority_requests_thresholds[] = {
603 {DelayCompetingLowPriorityRequestsThreshold::kMedium, "medium"},
604 {DelayCompetingLowPriorityRequestsThreshold::kHigh, "high"}};
605const base::FeatureParam<DelayCompetingLowPriorityRequestsThreshold>
606 kDelayCompetingLowPriorityRequestsThresholdParam{
607 &kDelayCompetingLowPriorityRequests, "priority_threshold",
608 DelayCompetingLowPriorityRequestsThreshold::kHigh,
609 &delay_competing_low_priority_requests_thresholds};
610
Adrienne Walkerb53b4372020-05-06 18:57:18611// The AppCache feature is a kill-switch for the entire AppCache feature,
612// both backend and API. If disabled, then it will turn off the backend and
Adrienne Walkerd701f472020-08-20 02:15:11613// api, regardless of the presence of valid origin trial tokens. Disabling
614// AppCache will also delete any AppCache data from the profile directory.
Adrienne Walkere6b51722020-04-01 17:56:38615const base::Feature kAppCache{"AppCache", base::FEATURE_ENABLED_BY_DEFAULT};
Adrienne Walkerb53b4372020-05-06 18:57:18616// If AppCacheRequireOriginTrial is enabled, then the AppCache backend in the
617// browser will require origin trial tokens in order to load or store manifests
618// and their contents.
619const base::Feature kAppCacheRequireOriginTrial{
Adrienne Walkerdd9442e02020-06-10 16:23:40620 "AppCacheRequireOriginTrial", base::FEATURE_ENABLED_BY_DEFAULT};
Adrienne Walkere6b51722020-04-01 17:56:38621
Wan-Teh Chang75fd5322020-04-08 01:32:18622// Enables the AV1 Image File Format (AVIF).
Wan-Teh Changb9d67a12020-06-26 01:19:13623const base::Feature kAVIF{"AVIF", base::FEATURE_ENABLED_BY_DEFAULT};
Wan-Teh Chang75fd5322020-04-08 01:32:18624
Xiaocheng Hu66795f02020-04-25 00:26:47625// Make all pending 'display: auto' web fonts enter the swap or failure period
Xiaocheng Hu9e2055c2020-04-09 20:35:28626// immediately before reaching the LCP time limit (~2500ms), so that web fonts
627// do not become a source of bad LCP.
628const base::Feature kAlignFontDisplayAutoTimeoutWithLCPGoal{
629 "AlignFontDisplayAutoTimeoutWithLCPGoal",
630 base::FEATURE_DISABLED_BY_DEFAULT};
631
Xiaocheng Hu66795f02020-04-25 00:26:47632// The amount of time allowed for 'display: auto' web fonts to load without
633// intervention, counted from navigation start.
634const base::FeatureParam<int>
635 kAlignFontDisplayAutoTimeoutWithLCPGoalTimeoutParam{
636 &kAlignFontDisplayAutoTimeoutWithLCPGoal, "lcp-limit-in-ms", 2000};
637
638const base::FeatureParam<AlignFontDisplayAutoTimeoutWithLCPGoalMode>::Option
639 align_font_display_auto_timeout_with_lcp_goal_modes[] = {
640 {AlignFontDisplayAutoTimeoutWithLCPGoalMode::kToFailurePeriod,
641 "failure"},
642 {AlignFontDisplayAutoTimeoutWithLCPGoalMode::kToSwapPeriod, "swap"}};
643const base::FeatureParam<AlignFontDisplayAutoTimeoutWithLCPGoalMode>
644 kAlignFontDisplayAutoTimeoutWithLCPGoalModeParam{
645 &kAlignFontDisplayAutoTimeoutWithLCPGoal, "intervention-mode",
646 AlignFontDisplayAutoTimeoutWithLCPGoalMode::kToFailurePeriod,
647 &align_font_display_auto_timeout_with_lcp_goal_modes};
Xiaocheng Hu9e2055c2020-04-09 20:35:28648
Ben Kellyd52869b2020-04-20 17:17:43649// Enable throttling of fetch() requests from service workers in the
Ben Kelly5feb9952020-08-26 21:55:29650// installing state. The limit of 3 was chosen to match the limit
651// in background main frames. In addition, trials showed that this
652// did not cause excessive install delays or timeouts.
Ben Kellyd52869b2020-04-20 17:17:43653const base::Feature kThrottleInstallingServiceWorker{
Ben Kelly5feb9952020-08-26 21:55:29654 "ThrottleInstallingServiceWorker", base::FEATURE_ENABLED_BY_DEFAULT};
Ben Kellyd52869b2020-04-20 17:17:43655const base::FeatureParam<int> kInstallingServiceWorkerOutstandingThrottledLimit{
Ben Kelly5feb9952020-08-26 21:55:29656 &kThrottleInstallingServiceWorker, "limit", 3};
Ben Kellyd52869b2020-04-20 17:17:43657
Dave Tapuska95b71c82020-06-08 16:56:11658const base::Feature kInputPredictorTypeChoice{
659 "InputPredictorTypeChoice", base::FEATURE_DISABLED_BY_DEFAULT};
660
661const base::Feature kResamplingInputEvents{"ResamplingInputEvents",
662 base::FEATURE_DISABLED_BY_DEFAULT};
663
Dave Tapuskafea88942020-05-05 18:50:32664const base::Feature kResamplingScrollEvents{"ResamplingScrollEvents",
665 base::FEATURE_ENABLED_BY_DEFAULT};
666
Yoav Weiss200214d52020-05-13 23:58:42667// Enables the device-memory, resource-width, viewport-width and DPR client
668// hints to be sent to third-party origins if the first-party has opted in to
669// receiving client hints, regardless of Feature Policy.
670#if defined(OS_ANDROID)
671const base::Feature kAllowClientHintsToThirdParty{
672 "AllowClientHintsToThirdParty", base::FEATURE_ENABLED_BY_DEFAULT};
673#else
674const base::Feature kAllowClientHintsToThirdParty{
675 "AllowClientHintsToThirdParty", base::FEATURE_DISABLED_BY_DEFAULT};
676#endif
677
Dave Tapuskafea88942020-05-05 18:50:32678const base::Feature kFilteringScrollPrediction{
679 "FilteringScrollPrediction", base::FEATURE_DISABLED_BY_DEFAULT};
680
Dave Tapuskafea88942020-05-05 18:50:32681const base::Feature kKalmanHeuristics{"KalmanHeuristics",
682 base::FEATURE_DISABLED_BY_DEFAULT};
683
684const base::Feature kKalmanDirectionCutOff{"KalmanDirectionCutOff",
685 base::FEATURE_DISABLED_BY_DEFAULT};
686
687const base::Feature kSkipTouchEventFilter{"SkipTouchEventFilter",
688 base::FEATURE_ENABLED_BY_DEFAULT};
689const char kSkipTouchEventFilterTypeParamName[] = "type";
690const char kSkipTouchEventFilterTypeParamValueDiscrete[] = "discrete";
691const char kSkipTouchEventFilterTypeParamValueAll[] = "all";
692const char kSkipTouchEventFilterFilteringProcessParamName[] =
693 "skip_filtering_process";
694const char kSkipTouchEventFilterFilteringProcessParamValueBrowser[] = "browser";
695const char kSkipTouchEventFilterFilteringProcessParamValueBrowserAndRenderer[] =
696 "browser_and_renderer";
697
Patrick To2afc1162020-06-03 18:19:30698// Improves support for WebXR on computers with multiple GPUs.
699const base::Feature kWebXrMultiGpu{"WebXRMultiGpu",
700 base::FEATURE_DISABLED_BY_DEFAULT};
701
Anders Hartvoll Ruud80f8818812020-06-09 08:07:31702// Enables dependency support in blink::MatchedPropertiesCache, which allows
703// caching of previously uncachable objects.
704const base::Feature kCSSMatchedPropertiesCacheDependencies{
705 "CSSMatchedPropertiesCacheDependencies", base::FEATURE_DISABLED_BY_DEFAULT};
706
Benoit Lize66684b22020-08-07 12:30:22707// Disabling this will cause parkable strings to never be compressed.
708// This is useful for headless mode + virtual time. Since virtual time advances
709// quickly, strings may be parked too eagerly in that mode.
710const base::Feature kCompressParkableStrings{"CompressParkableStrings",
711 base::FEATURE_ENABLED_BY_DEFAULT};
712
Benoit Lize04cbcd9d2020-06-18 09:44:27713// Whether ParkableStrings can be written out to disk.
Benoit Lize66684b22020-08-07 12:30:22714// Depends on compression above.
Benoit Lize04cbcd9d2020-06-18 09:44:27715const base::Feature kParkableStringsToDisk{"ParkableStringsToDisk",
716 base::FEATURE_DISABLED_BY_DEFAULT};
717
Benoit Lize66684b22020-08-07 12:30:22718bool IsParkableStringsToDiskEnabled() {
719 return base::FeatureList::IsEnabled(kParkableStringsToDisk) &&
720 base::FeatureList::IsEnabled(kCompressParkableStrings);
721}
722
Yue Li384bb092020-08-11 23:35:28723// Controls whether to auto select on contextual menu click in Chrome OS.
724const base::Feature kCrOSAutoSelect{"CrOSAutoSelect",
725 base::FEATURE_DISABLED_BY_DEFAULT};
726
Chris Harrelsonb4f3bd92020-08-13 00:57:30727const base::Feature kCompositingOptimizations{
728 "CompositingOptimizations", base::FEATURE_DISABLED_BY_DEFAULT};
729
Minggang Wang1daff4ec2020-08-13 05:06:17730// Reduce the amount of information in the default 'referer' header for
731// cross-origin requests.
732const base::Feature kReducedReferrerGranularity{
733 "ReducedReferrerGranularity", base::FEATURE_DISABLED_BY_DEFAULT};
734
Michael Bai901231832020-08-18 04:52:43735// Enables the user activated exponential delay in the ContentCapture task.
736const base::Feature kContentCaptureUserActivatedDelay = {
737 "ContentCaptureUserActivatedDelay", base::FEATURE_DISABLED_BY_DEFAULT};
738
Adam Rice89ac6b072020-08-20 16:06:19739// Enable ReadableStream, WritableStream and TransformStream objects to be
740// transferred with postMessage().
741const base::Feature kTransferableStreams{"TransferableStreams",
742 base::FEATURE_DISABLED_BY_DEFAULT};
743
Asami Doiaf426d4f2020-09-02 03:31:31744// Dispatches a fake fetch event to a service worker to check the offline
745// capability of the site before promoting installation.
746// See https://crbug.com/965802 for more details.
747const base::Feature kCheckOfflineCapability{"CheckOfflineCapability",
748 base::FEATURE_DISABLED_BY_DEFAULT};
749
Rakina Zata Amniec6d02a2020-08-27 14:57:03750// The "BackForwardCacheABExperimentControl" feature indicates the state of the
751// same-site BackForwardCache experiment. This information is used when sending
752// the "Sec-bfcache-experiment" HTTP Header on resource requests. The header
753// value is determined by the value of the "experiment_group_for_http_header"
754// feature parameter.
755const base::Feature kBackForwardCacheABExperimentControl{
756 "BackForwardCacheABExperimentControl", base::FEATURE_DISABLED_BY_DEFAULT};
757const char kBackForwardCacheABExperimentGroup[] =
758 "experiment_group_for_http_header";
759
Dave Tapuska47c85b32020-08-27 20:47:56760// Whether we should composite a PLSA (paint layer scrollable area) even if it
761// means losing lcd text.
762const base::Feature kPreferCompositingToLCDText = {
763 "PreferCompositingToLCDText", base::FEATURE_DISABLED_BY_DEFAULT};
764
Matt Falkenhagen5cc652792018-06-21 10:34:33765} // namespace features
766} // namespace blink