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

Unified Diff: content/child/child_thread_impl.cc

Issue 2485623002: discardable_memory: Using mojo IPC to replace Chrome IPC (Closed)
Patch Set: Fix bot issues 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
« no previous file with comments | « content/child/child_thread_impl.h ('k') | content/child/child_thread_impl_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/child_thread_impl.cc
diff --git a/content/child/child_thread_impl.cc b/content/child/child_thread_impl.cc
index 7f2755b3e00f3859bfe499adb57561c2686db6ca..2fba1bee8a04cd46510cc2a77c281ca2774dee5b 100644
--- a/content/child/child_thread_impl.cc
+++ b/content/child/child_thread_impl.cc
@@ -32,7 +32,6 @@
#include "base/timer/elapsed_timer.h"
#include "base/tracked_objects.h"
#include "build/build_config.h"
-#include "components/discardable_memory/client/client_discardable_shared_memory_manager.h"
#include "components/tracing/child/child_trace_message_filter.h"
#include "content/child/child_histogram_message_filter.h"
#include "content/child/child_process.h"
@@ -318,8 +317,7 @@ ChildThreadImpl::Options::Builder::AutoStartServiceManagerConnection(
}
ChildThreadImpl::Options::Builder&
-ChildThreadImpl::Options::Builder::ConnectToBrowser(
- bool connect_to_browser) {
+ChildThreadImpl::Options::Builder::ConnectToBrowser(bool connect_to_browser) {
options_.connect_to_browser = connect_to_browser;
return *this;
}
@@ -356,33 +354,6 @@ bool ChildThreadImpl::ChildThreadMessageRouter::RouteMessage(
return handled;
}
-class ChildThreadImpl::ClientDiscardableSharedMemoryManagerDelegate
- : public discardable_memory::ClientDiscardableSharedMemoryManager::
- Delegate {
- public:
- explicit ClientDiscardableSharedMemoryManagerDelegate(
- scoped_refptr<ThreadSafeSender> sender)
- : sender_(sender) {}
- ~ClientDiscardableSharedMemoryManagerDelegate() override {}
-
- void AllocateLockedDiscardableSharedMemory(
- size_t size,
- discardable_memory::DiscardableSharedMemoryId id,
- base::SharedMemoryHandle* handle) override {
- sender_->Send(
- new ChildProcessHostMsg_SyncAllocateLockedDiscardableSharedMemory(
- size, id, handle));
- }
-
- void DeletedDiscardableSharedMemory(
- discardable_memory::DiscardableSharedMemoryId id) override {
- sender_->Send(new ChildProcessHostMsg_DeletedDiscardableSharedMemory(id));
- }
-
- private:
- scoped_refptr<ThreadSafeSender> sender_;
-};
-
ChildThreadImpl::ChildThreadImpl()
: route_provider_binding_(this),
associated_interface_provider_bindings_(
@@ -406,7 +377,7 @@ ChildThreadImpl::ChildThreadImpl(const Options& options)
Init(options);
}
-scoped_refptr<base::SequencedTaskRunner> ChildThreadImpl::GetIOTaskRunner() {
+scoped_refptr<base::SingleThreadTaskRunner> ChildThreadImpl::GetIOTaskRunner() {
if (IsInBrowserProcess())
return browser_process_io_runner_;
return ChildProcess::current()->io_task_runner();
@@ -593,13 +564,6 @@ void ChildThreadImpl::Init(const Options& options) {
shared_bitmap_manager_.reset(
new ChildSharedBitmapManager(thread_safe_sender()));
-
- client_discardable_shared_memory_manager_delegate_ =
- base::MakeUnique<ClientDiscardableSharedMemoryManagerDelegate>(
- thread_safe_sender());
- discardable_shared_memory_manager_ = base::MakeUnique<
- discardable_memory::ClientDiscardableSharedMemoryManager>(
- client_discardable_shared_memory_manager_delegate_.get());
}
ChildThreadImpl::~ChildThreadImpl() {
@@ -630,10 +594,6 @@ void ChildThreadImpl::Shutdown() {
WebFileSystemImpl::DeleteThreadSpecificInstance();
}
-void ChildThreadImpl::ShutdownDiscardableSharedMemoryManager() {
- discardable_shared_memory_manager_.reset();
-}
-
void ChildThreadImpl::OnChannelConnected(int32_t peer_pid) {
channel_connected_factory_.reset();
}
« no previous file with comments | « content/child/child_thread_impl.h ('k') | content/child/child_thread_impl_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698