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

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

Issue 2718963002: Drop the global memory state from memory coordinator (Closed)
Patch Set: comments Created 3 years, 10 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: content/browser/memory/memory_monitor_android.cc
diff --git a/content/browser/memory/memory_monitor_android.cc b/content/browser/memory/memory_monitor_android.cc
index e456de9abdba843f14056f108857d250cdb30eaa..d4752eea93c1410d1db5bd0529ddfbadb90d7e9f 100644
--- a/content/browser/memory/memory_monitor_android.cc
+++ b/content/browser/memory/memory_monitor_android.cc
@@ -76,11 +76,11 @@ static void OnTrimMemory(JNIEnv* env,
auto* coordinator = MemoryCoordinatorImpl::GetInstance();
if (level >= kTrimMemoryRunningCritical) {
- coordinator->ForceSetGlobalState(base::MemoryState::SUSPENDED,
- base::TimeDelta::FromMinutes(1));
+ coordinator->ForceSetMemoryCondition(MemoryCondition::CRITICAL,
+ base::TimeDelta::FromMinutes(1));
} else if (level >= kTrimMemoryRunningLow) {
- coordinator->ForceSetGlobalState(base::MemoryState::THROTTLED,
- base::TimeDelta::FromMinutes(1));
+ coordinator->ForceSetMemoryCondition(MemoryCondition::WARNING,
+ base::TimeDelta::FromMinutes(1));
}
}
« no previous file with comments | « content/browser/memory/memory_coordinator_impl_unittest.cc ('k') | content/browser/memory/memory_state_updater.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698