| OLD | NEW |
| 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 #include "content/child/web_discardable_memory_impl.h" | 5 #include "content/child/web_discardable_memory_impl.h" |
| 6 | 6 |
| 7 #include "base/memory/discardable_memory.h" | 7 #include "base/memory/discardable_memory.h" |
| 8 #include "base/memory/discardable_memory_allocator.h" | 8 #include "base/memory/discardable_memory_allocator.h" |
| 9 | 9 |
| 10 namespace content { | 10 namespace content { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 bool WebDiscardableMemoryImpl::lock() { | 22 bool WebDiscardableMemoryImpl::lock() { |
| 23 return discardable_->Lock(); | 23 return discardable_->Lock(); |
| 24 } | 24 } |
| 25 | 25 |
| 26 void WebDiscardableMemoryImpl::unlock() { | 26 void WebDiscardableMemoryImpl::unlock() { |
| 27 discardable_->Unlock(); | 27 discardable_->Unlock(); |
| 28 } | 28 } |
| 29 | 29 |
| 30 void* WebDiscardableMemoryImpl::data() { | 30 void* WebDiscardableMemoryImpl::data() { |
| 31 return discardable_->Memory(); | 31 return discardable_->data(); |
| 32 } | 32 } |
| 33 | 33 |
| 34 WebDiscardableMemoryImpl::WebDiscardableMemoryImpl( | 34 WebDiscardableMemoryImpl::WebDiscardableMemoryImpl( |
| 35 scoped_ptr<base::DiscardableMemory> memory) | 35 scoped_ptr<base::DiscardableMemory> memory) |
| 36 : discardable_(memory.Pass()) { | 36 : discardable_(memory.Pass()) { |
| 37 } | 37 } |
| 38 | 38 |
| 39 } // namespace content | 39 } // namespace content |
| OLD | NEW |