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

Unified Diff: content/ppapi_plugin/ppapi_thread.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/ppapi_plugin/ppapi_thread.h ('k') | content/public/app/mojo/content_browser_manifest.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « content/ppapi_plugin/ppapi_thread.h ('k') | content/public/app/mojo/content_browser_manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698