Index: content/ppapi_plugin/ppapi_thread.cc |
diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc |
index 71c436ce56d4dca36fa3c184770d183fa64a75ed..85b2c6cb1995e66e9669e38a5b6e769f717a3f9c 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" |
@@ -131,8 +132,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>( |
+ std::move(manager_ptr), GetIOTaskRunner()); |
base::DiscardableMemoryAllocator::SetInstance( |
- ChildThreadImpl::discardable_shared_memory_manager()); |
+ discardable_shared_memory_manager_.get()); |
} |
field_trial_syncer_.InitFieldTrialObserving(command_line, |
switches::kSingleProcess); |