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

Unified Diff: base/memory/discardable_memory.h

Issue 1013463003: Update from https://crrev.com/320931 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « base/memory/BUILD.gn ('k') | base/memory/discardable_memory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/discardable_memory.h
diff --git a/base/memory/discardable_memory.h b/base/memory/discardable_memory.h
index 4e5a9af7aa5b3f5b88bd3747dc1b0c7542aad522..ce0f0bbe75c7eff42006f8e299c8e8015c1d62bf 100644
--- a/base/memory/discardable_memory.h
+++ b/base/memory/discardable_memory.h
@@ -15,11 +15,6 @@
namespace base {
-enum DiscardableMemoryType {
- DISCARDABLE_MEMORY_TYPE_NONE,
- DISCARDABLE_MEMORY_TYPE_SHMEM
-};
-
// 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
@@ -55,29 +50,7 @@ class BASE_EXPORT DiscardableMemory {
public:
virtual ~DiscardableMemory() {}
- // Gets the discardable memory type with a given name.
- static DiscardableMemoryType GetNamedType(const std::string& name);
-
- // Gets the name of a discardable memory type.
- static const char* GetTypeName(DiscardableMemoryType type);
-
- // Gets system supported discardable memory types. Default preferred type
- // at the front of vector.
- static void GetSupportedTypes(std::vector<DiscardableMemoryType>* types);
-
- // Sets the preferred discardable memory type. This overrides the default
- // preferred type. Can only be called once prior to GetPreferredType()
- // or CreateLockedMemory(). Caller is responsible for correct ordering.
- static void SetPreferredType(DiscardableMemoryType type);
-
- // Gets the preferred discardable memory type.
- static DiscardableMemoryType GetPreferredType();
-
- // Create a DiscardableMemory instance with specified |type| and |size|.
- static scoped_ptr<DiscardableMemory> CreateLockedMemoryWithType(
- DiscardableMemoryType type, size_t size);
-
- // Create a DiscardableMemory instance with preferred type and |size|.
+ // Create a DiscardableMemory instance with |size|.
static scoped_ptr<DiscardableMemory> CreateLockedMemory(size_t size);
// Locks the memory so that it will not be purged by the system. Returns
« no previous file with comments | « base/memory/BUILD.gn ('k') | base/memory/discardable_memory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698