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 8fae355c3b55a6dc2cb8d51d1f3deadbdc9c8cef..812150ae10947ee9d967d965de261ca999f1f95d 100644 |
--- a/content/browser/memory/memory_condition_observer.h |
+++ b/content/browser/memory/memory_condition_observer.h |
@@ -13,14 +13,9 @@ |
namespace content { |
-// MemoryConditionObserver is an internal implementation of MemoryCoordinator |
-// which uses a heuristic to determine the current memory condition. The |
-// heuristic is: |
-// * Compute number of renderers which can be created until the system will |
-// be in a critical state. Call this N. |
-// (See memory_monitor.h for the definition of "critical") |
-// * Covert N to memory condition (one of NORMAL/WARNING/CRITICAL) by using some |
-// thresholds and hysteresis. |
+// MemoryConditionObserver observes system memory usage and determines the |
+// current MemoryCondition. It dispatches the current condition if the condition |
+// has changed. |
class CONTENT_EXPORT MemoryConditionObserver { |
public: |
// |coordinator| must outlive than this instance. |
@@ -60,33 +55,6 @@ class CONTENT_EXPORT MemoryConditionObserver { |
scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
base::CancelableClosure update_condition_closure_; |
- // Sets up parameters for the heuristic. |
- void InitializeParameters(); |
- |
- // Validates parameters defined below. |
- bool ValidateParameters(); |
- |
- // Parameters to control the heuristic. |
- |
- // The median size of a renderer on the current platform. This is used to |
- // convert the amount of free memory to an expected number of new renderers |
- // that could be started before hitting critical memory pressure. |
- int expected_renderer_size_; |
- // When in a NORMAL condition and the potential number of new renderers drops |
- // below this level, the coordinator will transition to a WARNING condition. |
- int new_renderers_until_warning_; |
- // When in a NORMAL/WARNING state and the potential number of new renderers |
- // drops below this level, the coordinator will transition to a CRITICAL |
- // condition. |
- int new_renderers_until_critical_; |
- // When in a WARNING/CRITICAL condition and the potential number of new |
- // renderers rises above this level, the coordinator will transition to a |
- // NORMAL condition. |
- int new_renderers_back_to_normal_; |
- // When in a CRITICAL condition and the potential number of new renderers |
- // rises above this level, the coordinator will transition to a WARNING |
- // condition. |
- int new_renderers_back_to_warning_; |
// The current interval of checking the amount of free memory. |
base::TimeDelta monitoring_interval_; |
// The value of |monitoring_interval_| when the browser is foregrounded. |