| Index: base/memory/discardable_memory.h
|
| diff --git a/base/memory/discardable_memory.h b/base/memory/discardable_memory.h
|
| index c49a99f7a8c78af772cce254b1aca081dea6d15e..4e5a9af7aa5b3f5b88bd3747dc1b0c7542aad522 100644
|
| --- a/base/memory/discardable_memory.h
|
| +++ b/base/memory/discardable_memory.h
|
| @@ -17,18 +17,9 @@ namespace base {
|
|
|
| enum DiscardableMemoryType {
|
| DISCARDABLE_MEMORY_TYPE_NONE,
|
| - DISCARDABLE_MEMORY_TYPE_ASHMEM,
|
| - DISCARDABLE_MEMORY_TYPE_MACH,
|
| - DISCARDABLE_MEMORY_TYPE_EMULATED,
|
| DISCARDABLE_MEMORY_TYPE_SHMEM
|
| };
|
|
|
| -enum DiscardableMemoryLockStatus {
|
| - DISCARDABLE_MEMORY_LOCK_STATUS_FAILED,
|
| - DISCARDABLE_MEMORY_LOCK_STATUS_PURGED,
|
| - DISCARDABLE_MEMORY_LOCK_STATUS_SUCCESS
|
| -};
|
| -
|
| // Platform abstraction for discardable memory. DiscardableMemory is used to
|
| // cache large objects without worrying about blowing out memory, both on mobile
|
| // devices where there is no swap, and desktop devices where unused free memory
|
| @@ -89,23 +80,10 @@ class BASE_EXPORT DiscardableMemory {
|
| // Create a DiscardableMemory instance with preferred type and |size|.
|
| static scoped_ptr<DiscardableMemory> CreateLockedMemory(size_t size);
|
|
|
| - // Discardable memory implementations might allow an elevated usage level
|
| - // while in frequent use. Call this to have the usage reduced to the base
|
| - // level. Returns true if there's no need to call this again until
|
| - // memory instances have been used. This indicates that all discardable
|
| - // memory implementations have reduced usage to the base level or below.
|
| - // Note: calling this too often or while discardable memory is in frequent
|
| - // use can hurt performance, whereas calling it too infrequently can result
|
| - // in memory bloat.
|
| - static bool ReduceMemoryUsage();
|
| -
|
| // Locks the memory so that it will not be purged by the system. Returns
|
| - // DISCARDABLE_MEMORY_LOCK_STATUS_SUCCESS on success. If the return value is
|
| - // DISCARDABLE_MEMORY_LOCK_STATUS_FAILED then this object should be
|
| - // discarded and a new one should be created. If the return value is
|
| - // DISCARDABLE_MEMORY_LOCK_STATUS_PURGED then the memory is present but any
|
| - // data that was in it is gone.
|
| - virtual DiscardableMemoryLockStatus Lock() WARN_UNUSED_RESULT = 0;
|
| + // true on success. If the return value is false then this object should be
|
| + // discarded and a new one should be created.
|
| + virtual bool Lock() WARN_UNUSED_RESULT = 0;
|
|
|
| // Unlocks the memory so that it can be purged by the system. Must be called
|
| // after every successful lock call.
|
|
|