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

Unified Diff: mojo/services/html_viewer/html_viewer_discardable_memory_shmem_allocator.cc

Issue 1016493002: Add a DiscardableMemoryShmemeAllocator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.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
Index: mojo/services/html_viewer/html_viewer_discardable_memory_shmem_allocator.cc
diff --git a/base/test/test_discardable_memory_shmem_allocator.cc b/mojo/services/html_viewer/html_viewer_discardable_memory_shmem_allocator.cc
similarity index 53%
copy from base/test/test_discardable_memory_shmem_allocator.cc
copy to mojo/services/html_viewer/html_viewer_discardable_memory_shmem_allocator.cc
index 24185a20f8a857493df7a30dcedbb61768069bf4..d6c2ce482d331deed2e4b00ebb8ea5186a74238c 100644
--- a/base/test/test_discardable_memory_shmem_allocator.cc
+++ b/mojo/services/html_viewer/html_viewer_discardable_memory_shmem_allocator.cc
@@ -2,14 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/test/test_discardable_memory_shmem_allocator.h"
+#include "mojo/services/html_viewer/html_viewer_discardable_memory_shmem_allocator.h"
-#include <stdint.h>
-
-namespace base {
+namespace html_viewer {
namespace {
-class DiscardableMemoryShmemChunkImpl : public DiscardableMemoryShmemChunk {
+class DiscardableMemoryShmemChunkImpl
+ : public base::DiscardableMemoryShmemChunk {
public:
explicit DiscardableMemoryShmemChunkImpl(size_t size)
: memory_(new uint8_t[size]) {}
@@ -25,16 +24,18 @@ class DiscardableMemoryShmemChunkImpl : public DiscardableMemoryShmemChunk {
} // namespace
-TestDiscardableMemoryShmemAllocator::TestDiscardableMemoryShmemAllocator() {
+HtmlViewerDiscardableMemoryShmemAllocator::
+ HtmlViewerDiscardableMemoryShmemAllocator() {
}
-TestDiscardableMemoryShmemAllocator::~TestDiscardableMemoryShmemAllocator() {
+HtmlViewerDiscardableMemoryShmemAllocator::
+ ~HtmlViewerDiscardableMemoryShmemAllocator() {
}
-scoped_ptr<DiscardableMemoryShmemChunk>
-TestDiscardableMemoryShmemAllocator::AllocateLockedDiscardableMemory(
+scoped_ptr<base::DiscardableMemoryShmemChunk>
+HtmlViewerDiscardableMemoryShmemAllocator::AllocateLockedDiscardableMemory(
size_t size) {
return make_scoped_ptr(new DiscardableMemoryShmemChunkImpl(size));
}
-} // namespace base
+} // namespace html_viewer

Powered by Google App Engine
This is Rietveld 408576698