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

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: Move DiscardableMemoryEmulated to internal namespace 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
« no previous file with comments | « base/memory/discardable_memory_linux.cc ('k') | base/memory/discardable_memory_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..a172b05652e814afb17d9f6cf95d75123afca6c5 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.
@@ -108,6 +100,7 @@ class BASE_EXPORT_PRIVATE DiscardableMemoryProvider {
// This can be called as a hint that the system is under memory pressure.
static void NotifyMemoryPressure(
+ DiscardableMemoryProvider* provider,
willchan no longer on Chromium 2013/12/13 19:45:39 If you're going to add the provider, why isn't thi
reveman 2013/12/13 20:12:59 Good call. Fixed.
MemoryPressureListener::MemoryPressureLevel pressure_level);
// Purges |bytes_to_reclaim_under_moderate_pressure_| bytes of
« no previous file with comments | « base/memory/discardable_memory_linux.cc ('k') | base/memory/discardable_memory_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698