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

Side by Side Diff: base/memory/discardable_memory_ashmem.h

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « base/memory/discardable_memory_android.cc ('k') | base/memory/discardable_memory_ashmem.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_MEMORY_DISCARDABLE_MEMORY_ASHMEM_H_ 5 #ifndef BASE_MEMORY_DISCARDABLE_MEMORY_ASHMEM_H_
6 #define BASE_MEMORY_DISCARDABLE_MEMORY_ASHMEM_H_ 6 #define BASE_MEMORY_DISCARDABLE_MEMORY_ASHMEM_H_
7 7
8 #include "base/memory/discardable_memory.h" 8 #include "base/memory/discardable_memory.h"
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 20 matching lines...) Expand all
31 31
32 // Overridden from DiscardableMemory: 32 // Overridden from DiscardableMemory:
33 DiscardableMemoryLockStatus Lock() override; 33 DiscardableMemoryLockStatus Lock() override;
34 void Unlock() override; 34 void Unlock() override;
35 void* Memory() const override; 35 void* Memory() const override;
36 36
37 // Overridden from internal::DiscardableMemoryManagerAllocation: 37 // Overridden from internal::DiscardableMemoryManagerAllocation:
38 bool AllocateAndAcquireLock() override; 38 bool AllocateAndAcquireLock() override;
39 void ReleaseLock() override; 39 void ReleaseLock() override;
40 void Purge() override; 40 void Purge() override;
41 bool IsMemoryResident() const override;
42 41
43 private: 42 private:
44 const size_t bytes_; 43 const size_t bytes_;
45 DiscardableMemoryAshmemAllocator* const allocator_; 44 DiscardableMemoryAshmemAllocator* const allocator_;
46 DiscardableMemoryManager* const manager_; 45 DiscardableMemoryManager* const manager_;
47 bool is_locked_; 46 bool is_locked_;
48 scoped_ptr<DiscardableAshmemChunk> ashmem_chunk_; 47 scoped_ptr<DiscardableAshmemChunk> ashmem_chunk_;
49 48
50 DISALLOW_COPY_AND_ASSIGN(DiscardableMemoryAshmem); 49 DISALLOW_COPY_AND_ASSIGN(DiscardableMemoryAshmem);
51 }; 50 };
52 51
53 } // namespace internal 52 } // namespace internal
54 } // namespace base 53 } // namespace base
55 54
56 #endif // BASE_MEMORY_DISCARDABLE_MEMORY_ASHMEM_H_ 55 #endif // BASE_MEMORY_DISCARDABLE_MEMORY_ASHMEM_H_
OLDNEW
« no previous file with comments | « base/memory/discardable_memory_android.cc ('k') | base/memory/discardable_memory_ashmem.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698