Index: base/memory/memory_pressure_listener.h |
diff --git a/base/memory/memory_pressure_listener.h b/base/memory/memory_pressure_listener.h |
index 7e97010085dc8dcaea7f0fb68993b968fc5484c5..a6ce702ccb0f68df89a80b53934a884f4463926f 100644 |
--- a/base/memory/memory_pressure_listener.h |
+++ b/base/memory/memory_pressure_listener.h |
@@ -51,27 +51,22 @@ |
// No problems, there is enough memory to use. This event is not sent via |
// callback, but the enum is used in other places to find out the current |
// state of the system. |
- MEMORY_PRESSURE_LEVEL_NONE, |
+ MEMORY_PRESSURE_LEVEL_NONE = -1, |
// Modules are advised to free buffers that are cheap to re-allocate and not |
// immediately needed. |
- MEMORY_PRESSURE_LEVEL_MODERATE, |
+ MEMORY_PRESSURE_LEVEL_MODERATE = 0, |
// At this level, modules are advised to free all possible memory. The |
// alternative is to be killed by the system, which means all memory will |
// have to be re-created, plus the cost of a cold start. |
- MEMORY_PRESSURE_LEVEL_CRITICAL, |
+ MEMORY_PRESSURE_LEVEL_CRITICAL = 2, |
}; |
- typedef Callback<void(MemoryPressureLevel)> MemoryPressureCallback; |
- typedef Callback<void(MemoryPressureLevel)> SyncMemoryPressureCallback; |
+ typedef base::Callback<void(MemoryPressureLevel)> MemoryPressureCallback; |
explicit MemoryPressureListener( |
const MemoryPressureCallback& memory_pressure_callback); |
- MemoryPressureListener( |
- const MemoryPressureCallback& memory_pressure_callback, |
- const SyncMemoryPressureCallback& sync_memory_pressure_callback); |
- |
~MemoryPressureListener(); |
// Intended for use by the platform specific implementation. |
@@ -85,14 +80,12 @@ |
static void SimulatePressureNotification( |
MemoryPressureLevel memory_pressure_level); |
+ private: |
void Notify(MemoryPressureLevel memory_pressure_level); |
- void SyncNotify(MemoryPressureLevel memory_pressure_level); |
- private: |
static void DoNotifyMemoryPressure(MemoryPressureLevel memory_pressure_level); |
MemoryPressureCallback callback_; |
- SyncMemoryPressureCallback sync_memory_pressure_callback_; |
DISALLOW_COPY_AND_ASSIGN(MemoryPressureListener); |
}; |