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

Unified Diff: chromeos/chromeos_switches.cc

Issue 1124163003: Rename OS-specific MemoryPressureMonitor implementations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile error on ChromeOS. Created 5 years, 7 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: chromeos/chromeos_switches.cc
diff --git a/chromeos/chromeos_switches.cc b/chromeos/chromeos_switches.cc
index 33f70c468364a65eff16682691ff8841b9090008..6b5338a015770758e65fe8205a8de313c24676e6 100644
--- a/chromeos/chromeos_switches.cc
+++ b/chromeos/chromeos_switches.cc
@@ -351,40 +351,38 @@ bool MemoryPressureHandlingEnabled() {
return true;
}
-base::MemoryPressureMonitorChromeOS::MemoryPressureThresholds
+base::chromeos::MemoryPressureMonitor::MemoryPressureThresholds
GetMemoryPressureThresholds() {
+ using MemoryPressureMonitor = base::chromeos::MemoryPressureMonitor;
+
if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
kMemoryPressureThresholds)) {
const std::string group_name =
base::FieldTrialList::FindFullName(kMemoryPressureExperimentName);
if (group_name == kConservativeThreshold)
- return base::MemoryPressureMonitorChromeOS::THRESHOLD_CONSERVATIVE;
+ return MemoryPressureMonitor::THRESHOLD_CONSERVATIVE;
if (group_name == kAggressiveCacheDiscardThreshold)
- return base::MemoryPressureMonitorChromeOS::
- THRESHOLD_AGGRESSIVE_CACHE_DISCARD;
+ return MemoryPressureMonitor::THRESHOLD_AGGRESSIVE_CACHE_DISCARD;
if (group_name == kAggressiveTabDiscardThreshold)
- return base::MemoryPressureMonitorChromeOS::
- THRESHOLD_AGGRESSIVE_TAB_DISCARD;
+ return MemoryPressureMonitor::THRESHOLD_AGGRESSIVE_TAB_DISCARD;
if (group_name == kAggressiveThreshold)
- return base::MemoryPressureMonitorChromeOS::THRESHOLD_AGGRESSIVE;
- return base::MemoryPressureMonitorChromeOS::THRESHOLD_DEFAULT;
+ return MemoryPressureMonitor::THRESHOLD_AGGRESSIVE;
+ return MemoryPressureMonitor::THRESHOLD_DEFAULT;
}
const std::string option =
base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
kMemoryPressureThresholds);
if (option == kConservativeThreshold)
- return base::MemoryPressureMonitorChromeOS::THRESHOLD_CONSERVATIVE;
+ return MemoryPressureMonitor::THRESHOLD_CONSERVATIVE;
if (option == kAggressiveCacheDiscardThreshold)
- return base::MemoryPressureMonitorChromeOS::
- THRESHOLD_AGGRESSIVE_CACHE_DISCARD;
+ return MemoryPressureMonitor::THRESHOLD_AGGRESSIVE_CACHE_DISCARD;
if (option == kAggressiveTabDiscardThreshold)
- return base::MemoryPressureMonitorChromeOS::
- THRESHOLD_AGGRESSIVE_TAB_DISCARD;
+ return MemoryPressureMonitor::THRESHOLD_AGGRESSIVE_TAB_DISCARD;
if (option == kAggressiveThreshold)
- return base::MemoryPressureMonitorChromeOS::THRESHOLD_AGGRESSIVE;
+ return MemoryPressureMonitor::THRESHOLD_AGGRESSIVE;
- return base::MemoryPressureMonitorChromeOS::THRESHOLD_DEFAULT;
+ return MemoryPressureMonitor::THRESHOLD_DEFAULT;
}
} // namespace switches

Powered by Google App Engine
This is Rietveld 408576698