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

Unified Diff: content/browser/memory/memory_condition_observer.h

Issue 2731913002: NotForReview: Expose the global memory budget (chromium side)
Patch Set: Add --simulate-memory-pressure Created 3 years, 9 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 | « base/memory/memory_coordinator_proxy.cc ('k') | content/browser/memory/memory_condition_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/memory/memory_condition_observer.h
diff --git a/content/browser/memory/memory_condition_observer.h b/content/browser/memory/memory_condition_observer.h
index 40982ff7152952db7b10ea637940cc41d2ef9339..a01fb66f76d03c0b760681ab9ced9229bdc24d4d 100644
--- a/content/browser/memory/memory_condition_observer.h
+++ b/content/browser/memory/memory_condition_observer.h
@@ -30,8 +30,8 @@ class CONTENT_EXPORT MemoryConditionObserver {
~MemoryConditionObserver();
// Schedules a task to update memory condition. The task will be executed
- // after |delay| has passed.
- void ScheduleUpdateCondition(base::TimeDelta delay);
+ // at a given interval.
+ void ScheduleUpdateCondition(base::TimeDelta interval);
private:
FRIEND_TEST_ALL_PREFIXES(MemoryCoordinatorImplTest, CalculateNextCondition);
@@ -50,6 +50,13 @@ class CONTENT_EXPORT MemoryConditionObserver {
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
base::CancelableClosure update_condition_closure_;
+ // Current available free memory provided by MemoryMonitor.
+ int current_available_;
+
+ // The maximum value of available free memory. Used to simulate memory
+ // pressure.
+ int max_available_;
+
// Sets up parameters for the heuristic.
void InitializeParameters();
« no previous file with comments | « base/memory/memory_coordinator_proxy.cc ('k') | content/browser/memory/memory_condition_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698