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

Unified Diff: content/common/child_process_host_impl.cc

Issue 2478343002: Removing the ChildProcessHostMsg_SyncAllocateSharedMemory IPC message. (Closed)
Patch Set: Synced Created 4 years, 1 month 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
« no previous file with comments | « content/common/child_process_host_impl.h ('k') | content/common/child_process_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/child_process_host_impl.cc
diff --git a/content/common/child_process_host_impl.cc b/content/common/child_process_host_impl.cc
index 71a34fcc6d9e244060725270f20ecda6b6fa252a..59325c330ddfeece1e2a14bdcd3a87c708736a7a 100644
--- a/content/common/child_process_host_impl.cc
+++ b/content/common/child_process_host_impl.cc
@@ -185,18 +185,6 @@ bool ChildProcessHostImpl::Send(IPC::Message* message) {
return channel_->Send(message);
}
-void ChildProcessHostImpl::AllocateSharedMemory(
- size_t buffer_size, base::ProcessHandle child_process_handle,
- base::SharedMemoryHandle* shared_memory_handle) {
- base::SharedMemory shared_buf;
- if (!shared_buf.CreateAnonymous(buffer_size)) {
- *shared_memory_handle = base::SharedMemory::NULLHandle();
- NOTREACHED() << "Cannot create shared memory buffer";
- return;
- }
- shared_buf.GiveToProcess(child_process_handle, shared_memory_handle);
-}
-
int ChildProcessHostImpl::GenerateChildProcessUniqueId() {
// This function must be threadsafe.
//
@@ -255,12 +243,9 @@ bool ChildProcessHostImpl::OnMessageReceived(const IPC::Message& msg) {
IPC_BEGIN_MESSAGE_MAP(ChildProcessHostImpl, msg)
IPC_MESSAGE_HANDLER(ChildProcessHostMsg_ShutdownRequest,
OnShutdownRequest)
- // NB: The SyncAllocateSharedMemory, SyncAllocateGpuMemoryBuffer, and
- // DeletedGpuMemoryBuffer IPCs are handled here for non-renderer child
- // processes. For renderer processes, they are handled in
- // RenderMessageFilter.
- IPC_MESSAGE_HANDLER(ChildProcessHostMsg_SyncAllocateSharedMemory,
- OnAllocateSharedMemory)
+ // NB: The SyncAllocateGpuMemoryBuffer and DeletedGpuMemoryBuffer IPCs are
+ // handled here for non-renderer child processes. For renderer processes,
+ // they are handled in RenderMessageFilter.
IPC_MESSAGE_HANDLER(ChildProcessHostMsg_SyncAllocateGpuMemoryBuffer,
OnAllocateGpuMemoryBuffer)
IPC_MESSAGE_HANDLER(ChildProcessHostMsg_DeletedGpuMemoryBuffer,
@@ -307,12 +292,6 @@ void ChildProcessHostImpl::OnBadMessageReceived(const IPC::Message& message) {
delegate_->OnBadMessageReceived(message);
}
-void ChildProcessHostImpl::OnAllocateSharedMemory(
- uint32_t buffer_size,
- base::SharedMemoryHandle* handle) {
- AllocateSharedMemory(buffer_size, peer_process_.Handle(), handle);
-}
-
void ChildProcessHostImpl::OnShutdownRequest() {
if (delegate_->CanShutdown())
Send(new ChildProcessMsg_Shutdown());
« no previous file with comments | « content/common/child_process_host_impl.h ('k') | content/common/child_process_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698