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

Unified Diff: content/browser/memory/memory_coordinator.cc

Issue 2550623002: Add MemoryCoordinator::GetGlobalMemoryState() (Closed)
Patch Set: Created 4 years 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 | « content/browser/memory/memory_coordinator.h ('k') | content/browser/memory/memory_coordinator_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/memory/memory_coordinator.cc
diff --git a/content/browser/memory/memory_coordinator.cc b/content/browser/memory/memory_coordinator.cc
index 4317e5cda6f8777473ee19c5fca46e4c46e9ff93..dc9d0a9789e7b4b68650a9ba6cf815bb90ab59ac 100644
--- a/content/browser/memory/memory_coordinator.cc
+++ b/content/browser/memory/memory_coordinator.cc
@@ -122,7 +122,8 @@ mojom::MemoryState MemoryCoordinator::GetChildMemoryState(
void MemoryCoordinator::RecordMemoryPressure(
base::MemoryPressureMonitor::MemoryPressureLevel level) {
- int state = static_cast<int>(GetCurrentMemoryState());
+ DCHECK(GetGlobalMemoryState() != base::MemoryState::UNKNOWN);
+ int state = static_cast<int>(GetGlobalMemoryState());
switch (level) {
case base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_MODERATE:
UMA_HISTOGRAM_ENUMERATION(
@@ -139,6 +140,10 @@ void MemoryCoordinator::RecordMemoryPressure(
}
}
+base::MemoryState MemoryCoordinator::GetGlobalMemoryState() const {
+ return base::MemoryState::UNKNOWN;
+}
+
base::MemoryState MemoryCoordinator::GetCurrentMemoryState() const {
return base::MemoryState::UNKNOWN;
}
« no previous file with comments | « content/browser/memory/memory_coordinator.h ('k') | content/browser/memory/memory_coordinator_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698