1 // Copyright 2022 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "base/features.h"
6 #include "base/feature_list.h"
8 namespace base::features {
12 // Enforce that writeable file handles passed to untrusted processes are not
13 // backed by executable files.
14 BASE_FEATURE(kEnforceNoExecutableFileHandles,
15 "EnforceNoExecutableFileHandles",
16 FEATURE_ENABLED_BY_DEFAULT);
18 // TODO(crbug.com/851128): Roll out this to 100% before replacing existing
19 // NOTREACHED()s with NOTREACHED_NORETURN() as part of NOTREACHED() migration.
20 // Note that a prerequisite for rolling out this experiment is that existing
21 // NOTREACHED reports are at a very low rate. Once this rolls out we should
22 // monitor that crash rates for the experiment population is within a 1-5% or
23 // lower than the control group.
24 BASE_FEATURE(kNotReachedIsFatal,
26 FEATURE_DISABLED_BY_DEFAULT);
28 // Optimizes parsing and loading of data: URLs.
29 BASE_FEATURE(kOptimizeDataUrls, "OptimizeDataUrls", FEATURE_ENABLED_BY_DEFAULT);
31 BASE_FEATURE(kUseRustJsonParser,
33 FEATURE_DISABLED_BY_DEFAULT);
35 BASE_FEATURE(kJsonNegativeZero, "JsonNegativeZero", FEATURE_ENABLED_BY_DEFAULT);
37 #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS)
38 // Force to enable LowEndDeviceMode partially on Android 3Gb devices.
39 // (see PartialLowEndModeOnMidRangeDevices below)
40 BASE_FEATURE(kPartialLowEndModeOn3GbDevices,
41 "PartialLowEndModeOn3GbDevices",
42 base::FEATURE_DISABLED_BY_DEFAULT);
44 // Used to enable LowEndDeviceMode partially on Android and ChromeOS mid-range
45 // devices. Such devices aren't considered low-end, but we'd like experiment
46 // with a subset of low-end features to see if we get a good memory vs.
47 // performance tradeoff.
49 // TODO(crbug.com/1434873): |#if| out 32-bit before launching or going to
50 // high Stable %, because we will enable the feature only for <8GB 64-bit
51 // devices, where we didn't ship yet. However, we first need a larger
52 // population to collect data.
53 BASE_FEATURE(kPartialLowEndModeOnMidRangeDevices,
54 "PartialLowEndModeOnMidRangeDevices",
55 #if BUILDFLAG(IS_ANDROID)
56 base::FEATURE_ENABLED_BY_DEFAULT);
57 #elif BUILDFLAG(IS_CHROMEOS)
58 base::FEATURE_DISABLED_BY_DEFAULT);
61 #endif // BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS)
63 #if BUILDFLAG(IS_ANDROID)
64 // Whether to report frame metrics to the Android.FrameTimeline.* histograms.
65 BASE_FEATURE(kCollectAndroidFrameTimelineMetrics,
66 "CollectAndroidFrameTimelineMetrics",
67 base::FEATURE_DISABLED_BY_DEFAULT);
68 #endif // BUILDFLAG(IS_ANDROID)
70 } // namespace base::features