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

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

Issue 2943603002: Remove MemoryCondition::WARNING (Closed)
Patch Set: rebase Created 3 years, 6 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
« no previous file with comments | « content/browser/memory/memory_coordinator_impl_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 260a91a75af418a9dcda69c1158adc0c6857865e..1bf1c0107c355cd5cc379368ba95febb6e081cea 100644
--- a/content/browser/memory/memory_monitor_android.cc
+++ b/content/browser/memory/memory_monitor_android.cc
@@ -71,12 +71,10 @@ static void OnTrimMemory(JNIEnv* env,
auto* coordinator = MemoryCoordinatorImpl::GetInstance();
DCHECK(coordinator);
- MemoryCondition condition = MemoryCondition::WARNING;
- if (level >= kTrimMemoryRunningCritical ||
- coordinator->GetMemoryCondition() == MemoryCondition::CRITICAL)
- condition = MemoryCondition::CRITICAL;
- coordinator->ForceSetMemoryCondition(condition,
- base::TimeDelta::FromMinutes(1));
+ if (level >= kTrimMemoryRunningCritical) {
+ coordinator->ForceSetMemoryCondition(MemoryCondition::CRITICAL,
+ base::TimeDelta::FromMinutes(1));
+ }
}
// static
« no previous file with comments | « content/browser/memory/memory_coordinator_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698