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

Unified Diff: base/memory/discardable_memory_provider.h

Issue 111713008: base: Refactor DiscardableMemoryProvider to build and be tested on all platforms. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix native_discardable_memory on ios. Created 7 years 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: base/memory/discardable_memory_provider.h
diff --git a/base/memory/discardable_memory_provider.h b/base/memory/discardable_memory_provider.h
index ea887a302d64b3e99ad5ec1f9df2fc530255bc02..6c343c0d9299505b453ded54c58476c3091f08ef 100644
--- a/base/memory/discardable_memory_provider.h
+++ b/base/memory/discardable_memory_provider.h
@@ -46,14 +46,6 @@ class BASE_EXPORT_PRIVATE DiscardableMemoryProvider {
DiscardableMemoryProvider();
~DiscardableMemoryProvider();
- static DiscardableMemoryProvider* GetInstance();
-
- // Sets the instance of DiscardableMemoryProvider to be returned by
- // GetInstance. This should only be used by tests and must be called
- // prior to GetInstance(). The ownership of the given provider is
- // retained by the caller.
- static void SetInstanceForTest(DiscardableMemoryProvider* provider);
-
// 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.
@@ -107,7 +99,7 @@ class BASE_EXPORT_PRIVATE DiscardableMemoryProvider {
typedef HashingMRUCache<const DiscardableMemory*, Allocation> AllocationMap;
// This can be called as a hint that the system is under memory pressure.
- static void NotifyMemoryPressure(
+ void NotifyMemoryPressure(
MemoryPressureListener::MemoryPressureLevel pressure_level);
// Purges |bytes_to_reclaim_under_moderate_pressure_| bytes of

Powered by Google App Engine
This is Rietveld 408576698