58 lines
2.2 KiB
Diff
58 lines
2.2 KiB
Diff
From: uazo <uazo@users.noreply.github.com>
|
|
Date: Wed, 6 Dec 2023 10:21:45 +0000
|
|
Subject: Add PartialLowEndModeOnMidRangeDevices flag
|
|
|
|
adds a new flag in chrome://flags to re-enable the experiment
|
|
|
|
License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
|
---
|
|
base/features.cc | 4 ++++
|
|
chrome/browser/about_flags.cc | 1 +
|
|
.../Add-PartialLowEndModeOnMidRangeDevices-flag.inc | 12 ++++++++++++
|
|
3 files changed, 17 insertions(+)
|
|
create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Add-PartialLowEndModeOnMidRangeDevices-flag.inc
|
|
|
|
diff --git a/base/features.cc b/base/features.cc
|
|
--- a/base/features.cc
|
|
+++ b/base/features.cc
|
|
@@ -115,6 +115,10 @@ BASE_FEATURE(kPostGetMyMemoryStateToBackground,
|
|
FEATURE_DISABLED_BY_DEFAULT);
|
|
#endif // BUILDFLAG(IS_ANDROID)
|
|
|
|
+#if BUILDFLAG(IS_ANDROID)
|
|
+SET_CROMITE_FEATURE_DISABLED(kPartialLowEndModeOnMidRangeDevices);
|
|
+#endif
|
|
+
|
|
void Init(EmitThreadControllerProfilerMetadata
|
|
emit_thread_controller_profiler_metadata) {
|
|
InitializeCpuReductionExperiment();
|
|
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
|
--- a/chrome/browser/about_flags.cc
|
|
+++ b/chrome/browser/about_flags.cc
|
|
@@ -22,6 +22,7 @@
|
|
#include "base/base_switches.h"
|
|
#include "base/command_line.h"
|
|
#include "base/feature_list.h"
|
|
+#include "base/features.h"
|
|
#include "base/functional/bind.h"
|
|
#include "base/functional/callback.h"
|
|
#include "base/i18n/base_i18n_switches.h"
|
|
diff --git a/cromite_flags/chrome/browser/about_flags_cc/Add-PartialLowEndModeOnMidRangeDevices-flag.inc b/cromite_flags/chrome/browser/about_flags_cc/Add-PartialLowEndModeOnMidRangeDevices-flag.inc
|
|
new file mode 100644
|
|
--- /dev/null
|
|
+++ b/cromite_flags/chrome/browser/about_flags_cc/Add-PartialLowEndModeOnMidRangeDevices-flag.inc
|
|
@@ -0,0 +1,12 @@
|
|
+#if BUILDFLAG(IS_ANDROID)
|
|
+
|
|
+#ifdef FLAG_SECTION
|
|
+
|
|
+ {"partial-lowendmode-on-midrange-devices",
|
|
+ "Partial Low End Mode On Mid Range Devices",
|
|
+ "Enables the LowEndDeviceMode experiment in devices with 4-6 gb of ram.",
|
|
+ kOsAndroid, FEATURE_VALUE_TYPE(base::features::kPartialLowEndModeOnMidRangeDevices)},
|
|
+
|
|
+#endif
|
|
+
|
|
+#endif
|
|
--
|