Skip to content

Commit

Permalink
#586 Add a new flag for kPartialLowEndModeOnMidRangeDevices
Browse files Browse the repository at this point in the history
  • Loading branch information
uazo committed Dec 6, 2023
1 parent 7998846 commit 76b7e14
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
1 change: 1 addition & 0 deletions build/bromite_patches_list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ Timezone-customization.patch
00Disable-Real-Box.patch
00Always-allow-inspect-fallback.patch
00Add-cromite-flags-support.patch
00Add-PartialLowEndModeOnMidRangeDevices-flag.patch

00Temp-PerformanceNavigationTiming-privacy-fix.patch
00Temp-disable-predictive-back-gesture.patch
Expand Down
55 changes: 55 additions & 0 deletions build/patches/00Add-PartialLowEndModeOnMidRangeDevices-flag.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
From: uazo <[email protected]>
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 | 3 +++
chrome/browser/about_flags.cc | 1 +
.../Add-PartialLowEndModeOnMidRangeDevices-flag.inc | 12 ++++++++++++
3 files changed, 16 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
@@ -67,4 +67,7 @@ BASE_FEATURE(kCollectAndroidFrameTimelineMetrics,
base::FEATURE_DISABLED_BY_DEFAULT);
#endif // BUILDFLAG(IS_ANDROID)

+#if BUILDFLAG(IS_ANDROID)
+SET_CROMITE_FEATURE_DISABLED(kPartialLowEndModeOnMidRangeDevices);
+#endif
} // namespace base::features
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
@@ -16,6 +16,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
--
2.25.1

0 comments on commit 76b7e14

Please sign in to comment.