Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2969)

Unified Diff: chrome/browser/about_flags.cc

Issue 803443006: Adding flag to specify the used memory pressure strategy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/about_flags.cc
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 09b672c7e7531adc989ba7710e2fa0166f0a20a5..fdd59486e17812e09ee3eab7703cbb14d23b352f 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -284,6 +284,20 @@ const Experiment::Choice kEnableGpuRasterizationChoices[] = {
switches::kForceGpuRasterization, "" },
};
+#if defined(OS_CHROMEOS)
+const Experiment::Choice kMemoryPressureThresholdChoices[] = {
+ { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
+ { IDS_FLAGS_CONSERVATIVE_THRESHOLDS,
+ chromeos::switches::kMemoryPressureThresholds, "1" },
+ { IDS_FLAGS_AGGRESSIVE_CACHE_DISCARD_THRESHOLDS,
+ chromeos::switches::kMemoryPressureThresholds, "2" },
+ { IDS_FLAGS_AGGRESSIVE_TAB_DISCARD_THRESHOLDS,
+ chromeos::switches::kMemoryPressureThresholds, "3" },
+ { IDS_FLAGS_AGGRESSIVE_THRESHOLDS,
+ chromeos::switches::kMemoryPressureThresholds, "4" },
+};
+#endif
+
// We're using independent flags here (as opposed to a common flag with
// different values) to be able to enable/disable the entire experience
// associated with this feature server-side from the FieldTrial (the complete
@@ -2003,6 +2017,13 @@ const Experiment kExperiments[] = {
SINGLE_VALUE_TYPE(chromeos::switches::kDisableMemoryPressureSystemChromeOS)
},
{
+ "memory-pressure-thresholds",
+ IDS_FLAGS_MEMORY_PRESSURE_THRESHOLD_NAME,
+ IDS_FLAGS_MEMORY_PRESSURE_THRESHOLD_DESCRIPTION,
+ kOsCrOS,
+ MULTI_VALUE_TYPE(kMemoryPressureThresholdChoices)
+ },
+ {
"wake-on-packets",
IDS_FLAGS_WAKE_ON_PACKETS_NAME,
IDS_FLAGS_WAKE_ON_PACKETS_DESCRIPTION,

Powered by Google App Engine
This is Rietveld 408576698