blob: f57ee226c854ab9afc71abc07801291f63de09f4 [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 Chenneyde6e5c82019-01-21 01:56:0421// Enable defer commits a bit to avoid flash.
22const base::Feature kAvoidFlashBetweenNavigation{
23 "AvoidFlashBetweenNavigation", base::FEATURE_DISABLED_BY_DEFAULT};
24
Matt Falkenhagenc25fea42018-07-17 07:13:5225// Enable eagerly setting up a CacheStorage interface pointer and
26// passing it to service workers on startup as an optimization.
27const base::Feature kEagerCacheStorageSetupForServiceWorkers{
28 "EagerCacheStorageSetupForServiceWorkers",
29 base::FEATURE_ENABLED_BY_DEFAULT};
30
Eric Karl0623ec72018-10-30 19:43:2631// Controls the user-specified viewport restriction for GPU Rasterization on
32// mobile. See https://crbug.com/899399
33const base::Feature kEnableGpuRasterizationViewportRestriction{
34 "EnableGpuRasterizationViewportRestriction",
Eric Karl35944642019-07-17 23:58:2435 base::FEATURE_DISABLED_BY_DEFAULT};
Eric Karl0623ec72018-10-30 19:43:2636
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
Liquan(Max) Gu4e243fc2018-11-17 00:13:0249// Enable FCP++ by experiment. See https://crbug.com/869924
50const base::Feature kFirstContentfulPaintPlusPlus{
Liquan(Max) Gu739af152019-06-07 19:27:1951 "FirstContentfulPaintPlusPlus", base::FEATURE_ENABLED_BY_DEFAULT};
Liquan(Max) Gu4e243fc2018-11-17 00:13:0252
Aditya Keerthi6a933902019-03-14 21:09:2753// Perform memory purges after freezing only if all pages are frozen.
54const base::Feature kFreezePurgeMemoryAllPagesFrozen{
55 "FreezePurgeMemoryAllPagesFrozen", base::FEATURE_DISABLED_BY_DEFAULT};
56
John Delaneyac24e572019-04-30 19:47:0257// Freezes the user-agent as part of https://github.com/WICG/ua-client-hints.
58const base::Feature kFreezeUserAgent{"FreezeUserAgent",
59 base::FEATURE_DISABLED_BY_DEFAULT};
60
Steve Kobesb51c2fed2019-02-27 15:36:3161// Enables the experimental sweep-line algorithm for tracking "jank" from
62// layout objects changing their visual location between animation frames.
Steve Kobesaa9c7c22019-01-21 18:24:1363const base::Feature kJankTrackingSweepLine{"JankTrackingSweepLine",
64 base::FEATURE_DISABLED_BY_DEFAULT};
65
Philip Rogers63481332018-12-01 22:16:5166// Enable a new compositing mode called BlinkGenPropertyTrees where Blink
67// generates the compositor property trees. See: https://crbug.com/836884.
68const base::Feature kBlinkGenPropertyTrees{"BlinkGenPropertyTrees",
Philip Rogers3010556c2019-03-12 20:53:2269 base::FEATURE_ENABLED_BY_DEFAULT};
Philip Rogers63481332018-12-01 22:16:5170
Mason Freedc166cf12019-06-14 19:04:2671// Enable a new CSS property called backdrop-filter.
72const base::Feature kCSSBackdropFilter{"CSSBackdropFilter",
73 base::FEATURE_ENABLED_BY_DEFAULT};
74
Vladimir Levin43758ecc2019-05-09 18:04:0375// Enable Display Locking JavaScript APIs.
76const base::Feature kDisplayLocking{"DisplayLocking",
77 base::FEATURE_DISABLED_BY_DEFAULT};
78
Chris Harrelson6e41e3ae2019-05-03 23:09:4079// Enable applying rounded corner masks via a GL shader rather than
80// a mask layer.
81const base::Feature kFastBorderRadius{"FastBorderRadius",
82 base::FEATURE_DISABLED_BY_DEFAULT};
83
Ian Kilpatricke68ef11a2018-07-04 03:52:1084// Enable LayoutNG.
Emil A Eklund69eeb562019-07-03 01:38:3085const base::Feature kLayoutNG{"LayoutNG", base::FEATURE_ENABLED_BY_DEFAULT};
Ian Kilpatricke68ef11a2018-07-04 03:52:1086
Makoto Shimazu172eec02018-11-29 06:21:4487const base::Feature kMixedContentAutoupgrade{"AutoupgradeMixedContent",
88 base::FEATURE_DISABLED_BY_DEFAULT};
89
Tarun Bansal422f9012019-01-23 16:55:5890// Used to control the collection of anchor element metrics (crbug.com/856683).
91// If kNavigationPredictor is enabled, then metrics of anchor elements
92// in the first viewport after the page load and the metrics of the clicked
93// anchor element will be extracted and recorded. Additionally, navigation
94// predictor may preconnect/prefetch to resources/origins to make the
95// future navigations faster.
Sofiya Semenovae4e076152019-07-29 20:10:2796const base::Feature kNavigationPredictor {
97 "NavigationPredictor",
98#if defined(OS_ANDROID)
99 base::FEATURE_ENABLED_BY_DEFAULT
100#else
101 base::FEATURE_DISABLED_BY_DEFAULT
102#endif
103};
Tarun Bansal422f9012019-01-23 16:55:58104
Hiroki Nakagawadf83a6f2019-01-28 06:07:46105// Enable off-the-main-thread dedicated worker script fetch.
106// (https://crbug.com/835717)
107const base::Feature kOffMainThreadDedicatedWorkerScriptFetch{
108 "OffMainThreadDedicatedWorkerScriptFetch",
109 base::FEATURE_DISABLED_BY_DEFAULT};
110
Kenichi Ishibashi5aa265a92019-02-28 07:01:45111// Enable off-the-main-thread service worker script fetch.
112// (https://crbug.com/924043)
113const base::Feature kOffMainThreadServiceWorkerScriptFetch{
Kenichi Ishibashi24c4e1c2019-05-22 00:18:20114 "OffMainThreadServiceWorkerScriptFetch", base::FEATURE_ENABLED_BY_DEFAULT};
Kenichi Ishibashi5aa265a92019-02-28 07:01:45115
Hiroki Nakagawa61ee0042019-01-22 06:30:26116// Enable browser-initiated dedicated worker script loading
117// (PlzDedicatedWorker). https://crbug.com/906991
118const base::Feature kPlzDedicatedWorker{"PlzDedicatedWorker",
119 base::FEATURE_DISABLED_BY_DEFAULT};
120
Daniel Murphy95792ef2018-10-04 01:29:55121// Enable Portals. https://crbug.com/865123.
122const base::Feature kPortals{"Portals", base::FEATURE_DISABLED_BY_DEFAULT};
123
Tarun Bansal8df12b52019-02-15 05:46:30124// Enable limiting previews loading hints to specific resource types.
125const base::Feature kPreviewsResourceLoadingHintsSpecificResourceTypes{
126 "PreviewsResourceLoadingHintsSpecificResourceTypes",
127 base::FEATURE_DISABLED_BY_DEFAULT};
128
Aditya Keerthie84331b32019-03-20 15:25:52129// Perform a memory purge after a renderer is backgrounded. Formerly labelled as
130// the "PurgeAndSuspend" experiment.
131//
132// TODO(adityakeerthi): Disabled by default on Mac and Android for historical
133// reasons. Consider enabling by default if experiment results are positive.
134// https://crbug.com/926186
135const base::Feature kPurgeRendererMemoryWhenBackgrounded {
136 "PurgeRendererMemoryWhenBackgrounded",
137#if defined(OS_MACOSX) || defined(OS_ANDROID)
138 base::FEATURE_DISABLED_BY_DEFAULT
139#else
140 base::FEATURE_ENABLED_BY_DEFAULT
141#endif
142};
143
David Bokan911bded2018-11-27 23:23:32144// Enable Implicit Root Scroller. https://crbug.com/903260.
David Bokan145b5472019-05-22 14:38:44145// TODO(bokan): Temporarily disabled on desktop platforms to address issues
146// with non-overlay scrollbars. https://crbug.com/948059.
147const base::Feature kImplicitRootScroller {
148 "ImplicitRootScroller",
149#if defined(OS_ANDROID)
150 base::FEATURE_ENABLED_BY_DEFAULT
151#else
152 base::FEATURE_DISABLED_BY_DEFAULT
153#endif
154};
David Bokan911bded2018-11-27 23:23:32155
Makoto Shimazu172eec02018-11-29 06:21:44156// Enables usage of getDisplayMedia() that allows capture of web content, see
157// https://crbug.com/865060.
158const base::Feature kRTCGetDisplayMedia{"RTCGetDisplayMedia",
159 base::FEATURE_ENABLED_BY_DEFAULT};
160
161// Changes the default RTCPeerConnection constructor behavior to use Unified
162// Plan as the SDP semantics. When the feature is enabled, Unified Plan is used
163// unless the default is overridden (by passing {sdpSemantics:'plan-b'} as the
164// argument).
165const base::Feature kRTCUnifiedPlanByDefault{"RTCUnifiedPlanByDefault",
Henrik Boström07021ec82019-01-17 22:23:56166 base::FEATURE_ENABLED_BY_DEFAULT};
Makoto Shimazu172eec02018-11-29 06:21:44167
Johannes Kronad5a4532019-01-09 11:17:46168// Determines if the SDP attrbute extmap-allow-mixed should be offered by
169// default or not. The default value can be overridden by passing
170// {offerExtmapAllowMixed:true} as an argument to the RTCPeerConnection
171// constructor.
172const base::Feature kRTCOfferExtmapAllowMixed{
173 "RTCOfferExtmapAllowMixed", base::FEATURE_DISABLED_BY_DEFAULT};
174
Ben Kelly24e20aa2019-04-25 21:27:16175const base::Feature kServiceWorkerIsolateInForeground{
Ben Kellyb27f17e82019-06-26 05:31:41176 "ServiceWorkerIsolateInForeground", base::FEATURE_ENABLED_BY_DEFAULT};
Ben Kelly24e20aa2019-04-25 21:27:16177
momohattfc352292018-08-29 05:12:36178const base::Feature kServiceWorkerImportedScriptUpdateCheck{
179 "ServiceWorkerImportedScriptUpdateCheck",
180 base::FEATURE_DISABLED_BY_DEFAULT};
181
Kenichi Ishibashi42f883d2019-01-11 08:26:14182const base::Feature kServiceWorkerAggressiveCodeCache{
183 "ServiceWorkerAggressiveCodeCache", base::FEATURE_DISABLED_BY_DEFAULT};
184
Makoto Shimazua8b3d742019-04-05 06:55:51185// Experiment of the delay from navigation to starting an update of a service
186// worker's script.
187const base::Feature kServiceWorkerUpdateDelay{
188 "ServiceWorkerUpdateDelay", base::FEATURE_DISABLED_BY_DEFAULT};
189
Scott Haseley8eefdcd2018-08-22 16:50:19190// Freeze scheduler task queues in background after allowed grace time.
191// "stop" is a legacy name.
192const base::Feature kStopInBackground {
193 "stop-in-background",
194#if defined(OS_ANDROID)
195 base::FEATURE_ENABLED_BY_DEFAULT
196#else
197 base::FEATURE_DISABLED_BY_DEFAULT
198#endif
199};
200
Takashi Sakamotoc19fc2b2019-04-10 06:30:52201// Freeze scheduler task queues in background on network idle.
202// This feature only works if stop-in-background is enabled.
203const base::Feature kFreezeBackgroundTabOnNetworkIdle{
204 "freeze-background-tab-on-network-idle", base::FEATURE_DISABLED_BY_DEFAULT};
205
Shubhie Panicker60bd4b02018-09-26 00:02:15206// Freeze non-timer task queues in background, after allowed grace time.
207// "stop" is a legacy name.
Dave Tapuska9140c552019-05-30 16:18:56208const base::Feature kStopNonTimersInBackground{
209 "stop-non-timers-in-background", base::FEATURE_ENABLED_BY_DEFAULT};
Scott Haseley7757f6c2018-08-03 14:33:23210
David Bokane9370c22019-02-14 15:19:58211// Enable text snippets in URL fragments. https://crbug.com/919204.
212const base::Feature kTextFragmentAnchor{"TextFragmentAnchor",
213 base::FEATURE_DISABLED_BY_DEFAULT};
214
Bill Budge4d028f12018-11-20 15:05:12215// Enables the site isolated Wasm code cache that is keyed on the resource URL
216// and the origin lock of the renderer that is requesting the resource. When
217// this flag is enabled, content/GeneratedCodeCache handles code cache requests.
218const base::Feature kWasmCodeCache = {"WasmCodeCache",
219 base::FEATURE_DISABLED_BY_DEFAULT};
220
Marijn Kruisselbrinkca4bb5e2019-04-22 18:19:42221// Writable files and native file system access. https://crbug.com/853326
222const base::Feature kNativeFileSystemAPI{"NativeFileSystemAPI",
Marijn Kruisselbrinkfa0e1052019-03-05 22:32:55223 base::FEATURE_DISABLED_BY_DEFAULT};
Makoto Shimazu172eec02018-11-29 06:21:44224
Jay Harris583f48922019-05-06 05:55:24225// File handling integration. https://crbug.com/829689
226const base::Feature kFileHandlingAPI{"FileHandlingAPI",
227 base::FEATURE_DISABLED_BY_DEFAULT};
228
kdillon66bf5b522019-01-02 22:08:30229// Allows for synchronous XHR requests during page dismissal
230const base::Feature kForbidSyncXHRInPageDismissal{
Katie Dillon54c1ad222019-04-18 23:49:52231 "ForbidSyncXHRInPageDismissal", base::FEATURE_DISABLED_BY_DEFAULT};
kdillon66bf5b522019-01-02 22:08:30232
Dominic Farolino693fd72d2019-08-05 11:09:44233// Forces the redirect mode for prefetches to kManual. See crbug.com/988956.
234const base::Feature kPrefetchRedirectError{"PrefetchRedirectError",
235 base::FEATURE_DISABLED_BY_DEFAULT};
236
Carlos ILd3be52b2018-10-08 17:57:18237const char kMixedContentAutoupgradeModeParamName[] = "mode";
238const char kMixedContentAutoupgradeModeBlockable[] = "blockable";
239const char kMixedContentAutoupgradeModeOptionallyBlockable[] =
240 "optionally-blockable";
241
Madeleine Barowsky45be21a42018-12-07 18:39:30242// Decodes lossy WebP images to YUV instead of RGBX and stores in this format
243// in the image decode cache. See crbug.com/900264 for details on the feature.
244const base::Feature kDecodeLossyWebPImagesToYUV{
245 "DecodeLossyWebPImagesToYUV", base::FEATURE_DISABLED_BY_DEFAULT};
246
Aaron Krajeskif2f827d422019-01-08 15:08:34247// Use accelerated canvases whenever possible see https://crbug.com/909937
248const base::Feature kAlwaysAccelerateCanvas{"AlwaysAccelerateCanvas",
Aaron Krajeskiccfb9122019-04-25 21:28:44249 base::FEATURE_ENABLED_BY_DEFAULT};
Aaron Krajeskif2f827d422019-01-08 15:08:34250
Tarun Bansale4ad3472019-07-09 03:59:28251// Enables usage of render frame observer as the receiver of the resource
252// loading hints in the render process.
253// https://crbug.com/891328.
254const base::Feature kSendPreviewsLoadingHintsBeforeCommit{
255 "SendPreviewsLoadingHintsBeforeCommit", base::FEATURE_ENABLED_BY_DEFAULT};
256
Takashi Toyoshimaa91506d2019-03-28 05:44:42257// Enables cache-aware WebFonts loading. See https://crbug.com/570205.
258// The feature is disabled on Android for WebView API issue discussed at
259// https://crbug.com/942440.
260const base::Feature kWebFontsCacheAwareTimeoutAdaption {
261 "WebFontsCacheAwareTimeoutAdaption",
262#if defined(OS_ANDROID)
263 base::FEATURE_DISABLED_BY_DEFAULT
264#else
265 base::FEATURE_ENABLED_BY_DEFAULT
266#endif
267};
268
Ehsan Karamadbe95d122019-05-10 17:59:06269// Enabled to block programmatic focus in subframes when not triggered by user
270// activation (see htpps://crbug.com/954349).
271const base::Feature kBlockingFocusWithoutUserActivation{
272 "BlockingFocusWithoutUserActivation", base::FEATURE_DISABLED_BY_DEFAULT};
273
Hongchan Choi370d3af2019-05-20 20:56:58274const base::Feature kAudioWorkletRealtimeThread{
275 "AudioWorkletRealtimeThread", base::FEATURE_DISABLED_BY_DEFAULT};
276
Ryan Sturm139c3ac2019-07-12 18:52:53277// A feature to reduce the set of resources fetched by No-State Prefetch.
278const base::Feature kLightweightNoStatePrefetch{
Ryan Sturm37bcbec2019-07-26 12:53:08279 "LightweightNoStatePrefetch", base::FEATURE_DISABLED_BY_DEFAULT};
Ryan Sturm139c3ac2019-07-12 18:52:53280
Daniel Libby7da24b72019-05-22 05:46:35281// Use scroll gestures for scrollbar scrolls (see https://crbug.com/954007).
282const base::Feature kScrollbarInjectScrollGestures{
Daniel Libby97b44752019-05-31 23:00:07283 "ScrollbarInjectScrollGestures", base::FEATURE_ENABLED_BY_DEFAULT};
Daniel Libby7da24b72019-05-22 05:46:35284
Aran Gilman5e9672bed2019-08-02 19:07:49285// Automatically convert light-themed pages to use a Blink-generated dark theme
286const base::Feature kForceWebContentsDarkMode{
287 "WebContentsForceDark", base::FEATURE_DISABLED_BY_DEFAULT};
288
289// Which algorithm should be used for color inversion?
290const base::FeatureParam<ForceDarkInversionMethod>::Option
291 forcedark_inversion_method_options[] = {
292 {ForceDarkInversionMethod::kUseBlinkSettings,
293 "use_blink_settings_for_method"},
294 {ForceDarkInversionMethod::kHslBased, "hsl_based"},
295 {ForceDarkInversionMethod::kCielabBased, "cielab_based"}};
296
297const base::FeatureParam<ForceDarkInversionMethod>
298 kForceDarkInversionMethodParam{&kForceWebContentsDarkMode,
299 "inversion_method",
300 ForceDarkInversionMethod::kUseBlinkSettings,
301 &forcedark_inversion_method_options};
302
303// Should images be inverted?
304const base::FeatureParam<ForceDarkImageBehavior>::Option
305 forcedark_image_behavior_options[] = {
306 {ForceDarkImageBehavior::kUseBlinkSettings,
307 "use_blink_settings_for_images"},
308 {ForceDarkImageBehavior::kInvertNone, "none"},
309 {ForceDarkImageBehavior::kInvertSelectively, "selective"}};
310
311const base::FeatureParam<ForceDarkImageBehavior> kForceDarkImageBehaviorParam{
312 &kForceWebContentsDarkMode, "image_behavior",
313 ForceDarkImageBehavior::kUseBlinkSettings,
314 &forcedark_image_behavior_options};
315
316// Do not invert text lighter than this.
317// Range: 0 (do not invert any text) to 256 (invert all text)
318// Can also set to -1 to let Blink's internal settings control the value
319const base::FeatureParam<int> kForceDarkTextLightnessThresholdParam{
320 &kForceWebContentsDarkMode, "text_lightness_threshold", -1};
321
322// Do not invert backgrounds darker than this.
323// Range: 0 (invert all backgrounds) to 256 (invert no backgrounds)
324// Can also set to -1 to let Blink's internal settings control the value
325const base::FeatureParam<int> kForceDarkBackgroundLightnessThresholdParam{
326 &kForceWebContentsDarkMode, "background_lightness_threshold", -1};
327
Hiroki Nakagawa7d8cbfa2019-02-07 11:01:28328bool IsPlzDedicatedWorkerEnabled() {
329 // PlzDedicatedWorker depends on off-the-main-thread dedicated worker script
330 // fetch and NetworkService.
331#if DCHECK_IS_ON()
332 if (base::FeatureList::IsEnabled(features::kPlzDedicatedWorker)) {
333 DCHECK(base::FeatureList::IsEnabled(
334 features::kOffMainThreadDedicatedWorkerScriptFetch))
335 << "PlzDedicatedWorker is enabled but "
336 << "OffMainThreadDedicatedWorkerScriptFetch isn't. PlzDedicatedWorker "
337 << "requires OffMainThreadDedicatedWorkerScriptFetch.";
338 DCHECK(base::FeatureList::IsEnabled(network::features::kNetworkService))
339 << "PlzDedicatedWorker is enabled but NetworkService isn't. "
340 << "PlzDedicatedWorker requires NetworkService.";
341 }
342#endif // DCHECK_IS_ON()
343 return base::FeatureList::IsEnabled(
344 features::kOffMainThreadDedicatedWorkerScriptFetch) &&
345 base::FeatureList::IsEnabled(network::features::kNetworkService) &&
346 base::FeatureList::IsEnabled(features::kPlzDedicatedWorker);
347}
348
Fernando Serboncinif3186162019-06-10 20:03:47349const base::Feature kCanvasAlwaysDeferral{"CanvasAlwaysDeferral",
350 base::FEATURE_ENABLED_BY_DEFAULT};
351
Adam Rice8e55e802019-06-24 11:58:03352// Use the new C++ implementation of WHATWG Streams. See
353// https://crbug.com/977500.
354const base::Feature kStreamsNative{"StreamsNative",
355 base::FEATURE_DISABLED_BY_DEFAULT};
356
Michael Lippautze670df9f2019-07-09 11:39:49357// Blink garbage collection.
358// Enables compaction of backing stores on Blink's heap.
359const base::Feature kBlinkHeapCompaction{"BlinkHeapCompaction",
360 base::FEATURE_ENABLED_BY_DEFAULT};
361// Enables concurrently marking Blink's heap.
362const base::Feature kBlinkHeapConcurrentMarking{
363 "BlinkHeapConcurrentMarking", base::FEATURE_DISABLED_BY_DEFAULT};
Anton Bikineev9b7b3722019-07-09 13:48:39364// Enables concurrently sweeping Blink's heap.
365const base::Feature kBlinkHeapConcurrentSweeping{
Anton Bikineev204cc752019-08-07 00:26:37366 "BlinkHeapConcurrentSweeping", base::FEATURE_ENABLED_BY_DEFAULT};
Michael Lippautze670df9f2019-07-09 11:39:49367// Enables incrementally marking Blink's heap.
368const base::Feature kBlinkHeapIncrementalMarking{
369 "BlinkHeapIncrementalMarking", base::FEATURE_ENABLED_BY_DEFAULT};
370// Enables a marking stress mode that schedules more garbage collections and
371// also adds additional verification passes.
372const base::Feature kBlinkHeapIncrementalMarkingStress{
373 "BlinkHeapIncrementalMarkingStress", base::FEATURE_DISABLED_BY_DEFAULT};
374// Enables unified heap garbage collection scheduling where scheduling is
375// delegated to V8's heap controller.
376const base::Feature kBlinkHeapUnifiedGCScheduling{
377 "BlinkHeapUnifiedGCScheduling", base::FEATURE_ENABLED_BY_DEFAULT};
378
Ben Kelly298d8e02019-07-10 17:37:49379// Enables a delay before BufferingBytesConsumer begins reading from its
380// underlying consumer when instantiated with CreateWithDelay().
381const base::Feature kBufferingBytesConsumerDelay{
Ben Kellyb97951a2019-08-05 19:59:51382 "BufferingBytesConsumerDelay", base::FEATURE_ENABLED_BY_DEFAULT};
Ben Kelly298d8e02019-07-10 17:37:49383const base::FeatureParam<int> kBufferingBytesConsumerDelayMilliseconds{
384 &kBufferingBytesConsumerDelay, "milliseconds", 50};
385
Yoav Weissddfb8d2e2019-07-15 22:34:03386// Enables removing AppCache delays when triggering requests when the HTML was
387// not fetched from AppCache.
388const base::Feature kVerifyHTMLFetchedFromAppCacheBeforeDelay{
389 "VerifyHTMLFetchedFromAppCacheBeforeDelay",
390 base::FEATURE_DISABLED_BY_DEFAULT};
391
Michael Spang8d2303e2019-07-26 01:56:32392// Controls whether we use ThreadPriority::DISPLAY for renderer
393// compositor & IO threads.
394const base::Feature kBlinkCompositorUseDisplayThreadPriority {
395 "BlinkCompositorUseDisplayThreadPriority",
396#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
397 base::FEATURE_ENABLED_BY_DEFAULT
398#else
399 base::FEATURE_DISABLED_BY_DEFAULT
400#endif
401};
402
Matt Falkenhagen5cc652792018-06-21 10:34:33403} // namespace features
404} // namespace blink