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

Unified Diff: content/child/child_thread_impl.cc

Issue 2544953002: content: Some code cleanup related to shared memory allocation. (Closed)
Patch Set: . Created 4 years 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_thread_impl.cc
diff --git a/content/child/child_thread_impl.cc b/content/child/child_thread_impl.cc
index b62412f285267a0e9edcbb3707889c9448a54302..8151a2eb33bbdf9d070654f0143524daff0268db 100644
--- a/content/child/child_thread_impl.cc
+++ b/content/child/child_thread_impl.cc
@@ -677,23 +677,13 @@ mojom::RouteProvider* ChildThreadImpl::GetRemoteRouteProvider() {
return remote_route_provider_.get();
}
-std::unique_ptr<base::SharedMemory> ChildThreadImpl::AllocateSharedMemory(
- size_t buf_size) {
- DCHECK(message_loop_->task_runner()->BelongsToCurrentThread());
- return AllocateSharedMemory(buf_size, this, nullptr);
-}
-
// static
std::unique_ptr<base::SharedMemory> ChildThreadImpl::AllocateSharedMemory(
- size_t buf_size,
- IPC::Sender* sender,
- bool* out_of_memory) {
+ size_t buf_size) {
mojo::ScopedSharedBufferHandle mojo_buf =
mojo::SharedBufferHandle::Create(buf_size);
if (!mojo_buf->is_valid()) {
LOG(WARNING) << "Browser failed to allocate shared memory";
- if (out_of_memory)
- *out_of_memory = true;
return nullptr;
}
« no previous file with comments | « content/child/child_thread_impl.h ('k') | content/renderer/media/renderer_gpu_video_accelerator_factories.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698