Chromium Code Reviews| 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()); |
| } |
| } |