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

Unified Diff: trunk/src/base/memory/discardable_memory_provider.h

Issue 135113003: Revert 244229 "base: Fix registering of memory pressure listener..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 11 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: trunk/src/base/memory/discardable_memory_provider.h
===================================================================
--- trunk/src/base/memory/discardable_memory_provider.h (revision 244277)
+++ trunk/src/base/memory/discardable_memory_provider.h (working copy)
@@ -46,13 +46,6 @@
DiscardableMemoryProvider();
~DiscardableMemoryProvider();
- // Call this to register memory pressure listener. Must be called on a
- // thread with a MessageLoop current.
- void RegisterMemoryPressureListener();
-
- // Call this to unregister memory pressure listener.
- void UnregisterMemoryPressureListener();
-
// The maximum number of bytes of discardable memory that may be allocated
// before we force a purge. If this amount is zero, it is interpreted as
// having no limit at all.
@@ -106,7 +99,7 @@
typedef HashingMRUCache<const DiscardableMemory*, Allocation> AllocationMap;
// This can be called as a hint that the system is under memory pressure.
- void OnMemoryPressure(
+ void NotifyMemoryPressure(
MemoryPressureListener::MemoryPressureLevel pressure_level);
// Purges |bytes_to_reclaim_under_moderate_pressure_| bytes of
@@ -139,7 +132,7 @@
// Allows us to be respond when the system reports that it is under memory
// pressure.
- scoped_ptr<MemoryPressureListener> memory_pressure_listener_;
+ MemoryPressureListener memory_pressure_listener_;
DISALLOW_COPY_AND_ASSIGN(DiscardableMemoryProvider);
};
« no previous file with comments | « trunk/src/base/memory/discardable_memory_mac.cc ('k') | trunk/src/base/memory/discardable_memory_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698