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

Unified Diff: chromeos/chromeos_switches.cc

Issue 1045433002: Migrate ChromeOS to base::MemoryPressureMonitor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 5 years, 8 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
« no previous file with comments | « chromeos/chromeos_switches.h ('k') | content/browser/browser_main_loop.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/chromeos_switches.cc
diff --git a/chromeos/chromeos_switches.cc b/chromeos/chromeos_switches.cc
index f1eea580c7f8878ebdcc1697698cde56021b0a59..2c66fa53601dcc32f0b4eda61c0748389580a03e 100644
--- a/chromeos/chromeos_switches.cc
+++ b/chromeos/chromeos_switches.cc
@@ -360,40 +360,40 @@ bool MemoryPressureHandlingEnabled() {
return true;
}
-base::MemoryPressureObserverChromeOS::MemoryPressureThresholds
+base::MemoryPressureMonitorChromeOS::MemoryPressureThresholds
GetMemoryPressureThresholds() {
if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
kMemoryPressureThresholds)) {
const std::string group_name =
base::FieldTrialList::FindFullName(kMemoryPressureExperimentName);
if (group_name == kConservativeThreshold)
- return base::MemoryPressureObserverChromeOS::THRESHOLD_CONSERVATIVE;
+ return base::MemoryPressureMonitorChromeOS::THRESHOLD_CONSERVATIVE;
if (group_name == kAggressiveCacheDiscardThreshold)
- return base::MemoryPressureObserverChromeOS::
+ return base::MemoryPressureMonitorChromeOS::
THRESHOLD_AGGRESSIVE_CACHE_DISCARD;
if (group_name == kAggressiveTabDiscardThreshold)
- return base::MemoryPressureObserverChromeOS::
+ return base::MemoryPressureMonitorChromeOS::
THRESHOLD_AGGRESSIVE_TAB_DISCARD;
if (group_name == kAggressiveThreshold)
- return base::MemoryPressureObserverChromeOS::THRESHOLD_AGGRESSIVE;
- return base::MemoryPressureObserverChromeOS::THRESHOLD_DEFAULT;
+ return base::MemoryPressureMonitorChromeOS::THRESHOLD_AGGRESSIVE;
+ return base::MemoryPressureMonitorChromeOS::THRESHOLD_DEFAULT;
}
const std::string option =
base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
kMemoryPressureThresholds);
if (option == kConservativeThreshold)
- return base::MemoryPressureObserverChromeOS::THRESHOLD_CONSERVATIVE;
+ return base::MemoryPressureMonitorChromeOS::THRESHOLD_CONSERVATIVE;
if (option == kAggressiveCacheDiscardThreshold)
- return base::MemoryPressureObserverChromeOS::
+ return base::MemoryPressureMonitorChromeOS::
THRESHOLD_AGGRESSIVE_CACHE_DISCARD;
if (option == kAggressiveTabDiscardThreshold)
- return base::MemoryPressureObserverChromeOS::
+ return base::MemoryPressureMonitorChromeOS::
THRESHOLD_AGGRESSIVE_TAB_DISCARD;
if (option == kAggressiveThreshold)
- return base::MemoryPressureObserverChromeOS::THRESHOLD_AGGRESSIVE;
+ return base::MemoryPressureMonitorChromeOS::THRESHOLD_AGGRESSIVE;
- return base::MemoryPressureObserverChromeOS::THRESHOLD_DEFAULT;
+ return base::MemoryPressureMonitorChromeOS::THRESHOLD_DEFAULT;
}
} // namespace switches
« no previous file with comments | « chromeos/chromeos_switches.h ('k') | content/browser/browser_main_loop.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698