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

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: Address grt@'s comments from patchset 4. 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..0559425b89eb4214fdad9abc7b6094ebe5c0ba95 100644
--- a/chromeos/chromeos_switches.cc
+++ b/chromeos/chromeos_switches.cc
@@ -351,40 +351,37 @@ bool MemoryPressureHandlingEnabled() {
return true;
}
-base::MemoryPressureMonitorChromeOS::MemoryPressureThresholds
-GetMemoryPressureThresholds() {
+using MemoryPressureMonitor = base::chromeos::MemoryPressureMonitor;
grt (UTC plus 2) 2015/05/14 15:40:21 I think it's best to keep aliases like this either
chrisha 2015/05/14 19:53:15 Done.
+
+MemoryPressureMonitor::MemoryPressureThresholds GetMemoryPressureThresholds() {
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