| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "base/memory/discardable_memory.h" | |
| 6 | |
| 7 #include "base/compiler_specific.h" | |
| 8 #include "base/logging.h" | |
| 9 | |
| 10 namespace base { | |
| 11 | |
| 12 // Stub implementations for platforms that don't support discardable memory. | |
| 13 | |
| 14 #if !defined(OS_ANDROID) && !defined(OS_MACOSX) | |
| 15 | |
| 16 // static | |
| 17 bool DiscardableMemory::Supported() { | |
| 18 return false; | |
| 19 } | |
| 20 | |
| 21 // static | |
| 22 scoped_ptr<DiscardableMemory> DiscardableMemory::CreateLockedMemory( | |
| 23 size_t size) { | |
| 24 return scoped_ptr<DiscardableMemory>(); | |
| 25 } | |
| 26 | |
| 27 // static | |
| 28 bool DiscardableMemory::PurgeForTestingSupported() { | |
| 29 return false; | |
| 30 } | |
| 31 | |
| 32 // static | |
| 33 void DiscardableMemory::PurgeForTesting() { | |
| 34 NOTIMPLEMENTED(); | |
| 35 } | |
| 36 | |
| 37 #endif // OS_* | |
| 38 | |
| 39 } // namespace base | |
| OLD | NEW |