Index: base/memory/discardable_memory_shmem_allocator.h |
diff --git a/base/memory/discardable_memory_shmem_allocator.h b/base/memory/discardable_memory_shmem_allocator.h |
index 68624b3960b3c979dd9989850361b93b12157f77..ed40672151849313aff651390c94e0992099a1fe 100644 |
--- a/base/memory/discardable_memory_shmem_allocator.h |
+++ b/base/memory/discardable_memory_shmem_allocator.h |
@@ -9,7 +9,18 @@ |
#include "base/memory/scoped_ptr.h" |
namespace base { |
-class DiscardableSharedMemory; |
+ |
+// TODO(reveman): Remove this by having allocator interface return |
+// real DiscardableMemory instances. crbug.com/442945 |
+class BASE_EXPORT DiscardableMemoryShmemChunk { |
+ public: |
+ virtual ~DiscardableMemoryShmemChunk() {} |
+ |
+ virtual bool Lock() = 0; |
+ virtual void Unlock() = 0; |
+ virtual void* Memory() const = 0; |
+ virtual bool IsMemoryResident() const = 0; |
+}; |
class BASE_EXPORT DiscardableMemoryShmemAllocator { |
public: |
@@ -20,8 +31,8 @@ class BASE_EXPORT DiscardableMemoryShmemAllocator { |
// Ownership of |instance| remains with the caller. |
static void SetInstance(DiscardableMemoryShmemAllocator* allocator); |
- virtual scoped_ptr<DiscardableSharedMemory> |
- AllocateLockedDiscardableSharedMemory(size_t size) = 0; |
+ virtual scoped_ptr<DiscardableMemoryShmemChunk> |
+ AllocateLockedDiscardableMemory(size_t size) = 0; |
protected: |
virtual ~DiscardableMemoryShmemAllocator() {} |