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

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

Issue 2718963002: Drop the global memory state from memory coordinator (Closed)
Patch Set: format 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..55dcb9ef55287169c3e9398a42ca993f23f1ba29 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::WARNING,
haraken 2017/02/28 11:33:45 Shouldn't this be CRITICAL?
bashi 2017/03/02 04:01:45 Oops. Done. Thanks!
+ base::TimeDelta::FromMinutes(1));
} else if (level >= kTrimMemoryRunningLow) {
- coordinator->ForceSetGlobalState(base::MemoryState::THROTTLED,
- base::TimeDelta::FromMinutes(1));
+ coordinator->ForceSetMemoryCondition(MemoryCondition::CRITICAL,
haraken 2017/02/28 11:33:45 WARNING?
bashi 2017/03/02 04:01:45 Done.
+ base::TimeDelta::FromMinutes(1));
}
}

Powered by Google App Engine
This is Rietveld 408576698