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

Unified Diff: base/memory/discardable_memory_emulated.h

Issue 195863005: Use DiscardableMemoryManager on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add |DiscardableMemoryAshmem::is_locked| Created 6 years, 8 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: base/memory/discardable_memory_emulated.h
diff --git a/base/memory/discardable_memory_emulated.h b/base/memory/discardable_memory_emulated.h
index 35ce08e286392fe06c1cb1f45a2a640e1269c892..3242245c10b8958e9ff64a3bc6e81189ceb16396 100644
--- a/base/memory/discardable_memory_emulated.h
+++ b/base/memory/discardable_memory_emulated.h
@@ -16,7 +16,7 @@ class DiscardableMemoryEmulated
: public DiscardableMemory,
public internal::DiscardableMemoryManagerAllocation {
public:
- explicit DiscardableMemoryEmulated(size_t size);
+ explicit DiscardableMemoryEmulated(size_t bytes);
virtual ~DiscardableMemoryEmulated();
static void RegisterMemoryPressureListeners();
@@ -32,11 +32,12 @@ class DiscardableMemoryEmulated
virtual void* Memory() const OVERRIDE;
// Overridden from internal::DiscardableMemoryManagerAllocation:
- virtual bool AllocateAndAcquireLock(size_t bytes) OVERRIDE;
+ virtual bool AllocateAndAcquireLock() OVERRIDE;
virtual void ReleaseLock() OVERRIDE {}
virtual void Purge() OVERRIDE;
private:
+ const size_t bytes_;
scoped_ptr<uint8[]> memory_;
bool is_locked_;

Powered by Google App Engine
This is Rietveld 408576698