1 // Copyright 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.
5 #include "base/memory/discardable_memory_emulated.h"
10 bool DiscardableMemory::SupportedNatively() {
15 scoped_ptr
<DiscardableMemory
> DiscardableMemory::CreateLockedMemory(
17 scoped_ptr
<internal::DiscardableMemoryEmulated
> memory(
18 new internal::DiscardableMemoryEmulated(size
));
19 if (!memory
->Initialize())
20 return scoped_ptr
<DiscardableMemory
>();
22 return memory
.PassAs
<DiscardableMemory
>();
26 bool DiscardableMemory::PurgeForTestingSupported() {
31 void DiscardableMemory::PurgeForTesting() {
32 internal::DiscardableMemoryEmulated::PurgeForTesting();