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

Unified Diff: content/child/child_discardable_shared_memory_manager_browsertest.cc

Issue 1001873002: base: Rename discardable memory allocator interface and remove unnecessary class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-dm-types
Patch Set: fix child process DiscardableMemoryImpl 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: content/child/child_discardable_shared_memory_manager_browsertest.cc
diff --git a/content/child/child_discardable_shared_memory_manager_browsertest.cc b/content/child/child_discardable_shared_memory_manager_browsertest.cc
index 813c55d5b3ea266e9fb9b0f1c2c42a448db1159b..1764cb045c6060ccbcd689317d43111ce93255bc 100644
--- a/content/child/child_discardable_shared_memory_manager_browsertest.cc
+++ b/content/child/child_discardable_shared_memory_manager_browsertest.cc
@@ -4,6 +4,7 @@
#include "base/bind.h"
#include "base/command_line.h"
+#include "base/memory/discardable_memory.h"
#include "content/child/child_discardable_shared_memory_manager.h"
#include "content/child/child_thread_impl.h"
#include "content/common/host_discardable_shared_memory_manager.h"
@@ -30,23 +31,21 @@ class ChildDiscardableSharedMemoryManagerBrowserTest
static void AllocateLockedMemory(
size_t size,
- scoped_ptr<base::DiscardableMemoryShmemChunk>* memory) {
+ scoped_ptr<base::DiscardableMemory>* memory) {
*memory = ChildThreadImpl::current()
->discardable_shared_memory_manager()
->AllocateLockedDiscardableMemory(size);
}
- static void LockMemory(base::DiscardableMemoryShmemChunk* memory,
- bool* result) {
+ static void LockMemory(base::DiscardableMemory* memory, bool* result) {
*result = memory->Lock();
}
- static void UnlockMemory(base::DiscardableMemoryShmemChunk* memory) {
+ static void UnlockMemory(base::DiscardableMemory* memory) {
memory->Unlock();
}
- static void FreeMemory(scoped_ptr<base::DiscardableMemoryShmemChunk> memory) {
- }
+ static void FreeMemory(scoped_ptr<base::DiscardableMemory> memory) {}
};
IN_PROC_BROWSER_TEST_F(ChildDiscardableSharedMemoryManagerBrowserTest,
@@ -55,7 +54,7 @@ IN_PROC_BROWSER_TEST_F(ChildDiscardableSharedMemoryManagerBrowserTest,
NavigateToURL(shell(), GURL(url::kAboutBlankURL));
- scoped_ptr<base::DiscardableMemoryShmemChunk> memory;
+ scoped_ptr<base::DiscardableMemory> memory;
PostTaskToInProcessRendererAndWait(base::Bind(
&ChildDiscardableSharedMemoryManagerBrowserTest::AllocateLockedMemory,
kSize, &memory));
@@ -91,7 +90,7 @@ IN_PROC_BROWSER_TEST_F(ChildDiscardableSharedMemoryManagerBrowserTest,
NavigateToURL(shell(), GURL(url::kAboutBlankURL));
- scoped_ptr<base::DiscardableMemoryShmemChunk> instances[kNumberOfInstances];
+ scoped_ptr<base::DiscardableMemory> instances[kNumberOfInstances];
for (auto& memory : instances) {
PostTaskToInProcessRendererAndWait(base::Bind(
&ChildDiscardableSharedMemoryManagerBrowserTest::AllocateLockedMemory,
@@ -117,7 +116,7 @@ IN_PROC_BROWSER_TEST_F(ChildDiscardableSharedMemoryManagerBrowserTest,
NavigateToURL(shell(), GURL(url::kAboutBlankURL));
- scoped_ptr<base::DiscardableMemoryShmemChunk> memory;
+ scoped_ptr<base::DiscardableMemory> memory;
PostTaskToInProcessRendererAndWait(base::Bind(
&ChildDiscardableSharedMemoryManagerBrowserTest::AllocateLockedMemory,
kSize, &memory));
« no previous file with comments | « content/child/child_discardable_shared_memory_manager.cc ('k') | content/common/host_discardable_shared_memory_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698