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. 4 5 #include "base/features.h" 6 #include "base/feature_list.h" 7 8 namespace base::features { 9 10 // Alphabetical: 11 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); 17 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, 25 "NotReachedIsFatal", 26 FEATURE_DISABLED_BY_DEFAULT); 27 28 // Optimizes parsing and loading of data: URLs. 29 BASE_FEATURE(kOptimizeDataUrls, "OptimizeDataUrls", FEATURE_ENABLED_BY_DEFAULT); 30 31 BASE_FEATURE(kUseRustJsonParser, 32 "UseRustJsonParser", 33 FEATURE_DISABLED_BY_DEFAULT); 34 35 BASE_FEATURE(kJsonNegativeZero, "JsonNegativeZero", FEATURE_ENABLED_BY_DEFAULT); 36 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); 43 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. 48 // 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); 59 #endif 60 61 #endif // BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) 62 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) 69 70 } // namespace base::features 71