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

Unified Diff: content/ppapi_plugin/ppapi_thread.cc

Issue 2485623002: discardable_memory: Using mojo IPC to replace Chrome IPC (Closed)
Patch Set: Fix build bots. 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
Index: content/ppapi_plugin/ppapi_thread.cc
diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc
index 5829f837086061c51d729fed63072f4311e472b5..0f23b4ad624c657ce20d3140a059ce486694d12e 100644
--- a/content/ppapi_plugin/ppapi_thread.cc
+++ b/content/ppapi_plugin/ppapi_thread.cc
@@ -48,6 +48,7 @@
#include "ppapi/proxy/plugin_message_filter.h"
#include "ppapi/proxy/ppapi_messages.h"
#include "ppapi/proxy/resource_reply_thread_registrar.h"
+#include "services/service_manager/public/cpp/interface_provider.h"
#include "third_party/WebKit/public/web/WebKit.h"
#include "ui/base/ui_base_switches.h"
@@ -130,8 +131,14 @@ PpapiThread::PpapiThread(const base::CommandLine& command_line, bool is_broker)
// In single process, browser main loop set up the discardable memory
// allocator.
if (!command_line.HasSwitch(switches::kSingleProcess)) {
+ discardable_memory::mojom::DiscardableSharedMemoryManagerPtr manager_ptr;
+ ChildThread::Get()->GetRemoteInterfaces()->GetInterface(
+ mojo::GetProxy(&manager_ptr));
+ discardable_shared_memory_manager_ = base::MakeUnique<
+ discardable_memory::ClientDiscardableSharedMemoryManager>(
+ manager_ptr.PassInterface(), GetIOTaskRunner().get());
dcheng 2016/11/25 00:07:08 Nit: the fact that we end up rebinding this interf
Peng 2016/11/25 16:41:53 Done.
base::DiscardableMemoryAllocator::SetInstance(
- ChildThreadImpl::discardable_shared_memory_manager());
+ discardable_shared_memory_manager_.get());
}
}

Powered by Google App Engine
This is Rietveld 408576698