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

Unified Diff: ppapi/proxy/plugin_main_nacl.cc

Issue 11722017: Use an explicit PID for duplicating Pepper handles rather than the Channel's. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 12 months 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 | « ppapi/proxy/plugin_dispatcher.cc ('k') | ppapi/proxy/ppapi_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/plugin_main_nacl.cc
diff --git a/ppapi/proxy/plugin_main_nacl.cc b/ppapi/proxy/plugin_main_nacl.cc
index 04d9be356485bcbd60fe60be13cc9f19620539a0..8733b9c46748ba8c90d48d89ba7833c89bad0724 100644
--- a/ppapi/proxy/plugin_main_nacl.cc
+++ b/ppapi/proxy/plugin_main_nacl.cc
@@ -66,7 +66,7 @@ class PpapiDispatcher : public ProxyChannel,
virtual base::WaitableEvent* GetShutdownEvent() OVERRIDE;
virtual IPC::PlatformFileForTransit ShareHandleWithRemote(
base::PlatformFile handle,
- const IPC::SyncChannel& channel,
+ base::ProcessId peer_pid,
bool should_close_source) OVERRIDE;
virtual std::set<PP_Instance>* GetGloballySeenInstanceIDSet() OVERRIDE;
virtual uint32 Register(PluginDispatcher* plugin_dispatcher) OVERRIDE;
@@ -104,7 +104,10 @@ PpapiDispatcher::PpapiDispatcher(scoped_refptr<base::MessageLoopProxy> io_loop)
shutdown_event_(true, false) {
IPC::ChannelHandle channel_handle(
"NaCl IPC", base::FileDescriptor(NACL_IPC_FD, false));
- InitWithChannel(this, channel_handle, false); // Channel is server.
+ // We don't have/need a PID since handle sharing happens outside of the
+ // NaCl sandbox.
+ InitWithChannel(this, base::kNullProcessId, channel_handle,
+ false); // Channel is server.
channel()->AddFilter(
new components::ChildTraceMessageFilter(message_loop_));
}
@@ -119,7 +122,7 @@ base::WaitableEvent* PpapiDispatcher::GetShutdownEvent() {
IPC::PlatformFileForTransit PpapiDispatcher::ShareHandleWithRemote(
base::PlatformFile handle,
- const IPC::SyncChannel& channel,
+ base::ProcessId peer_pid,
bool should_close_source) {
return IPC::InvalidPlatformFileForTransit();
}
@@ -190,7 +193,8 @@ void PpapiDispatcher::OnMsgCreateNaClChannel(
new PluginDispatcher(::PPP_GetInterface, permissions, incognito);
// The channel handle's true name is not revealed here.
IPC::ChannelHandle channel_handle("nacl", handle.descriptor());
- if (!dispatcher->InitPluginWithChannel(this, channel_handle, false)) {
+ if (!dispatcher->InitPluginWithChannel(this, base::kNullProcessId,
+ channel_handle, false)) {
delete dispatcher;
return;
}
« no previous file with comments | « ppapi/proxy/plugin_dispatcher.cc ('k') | ppapi/proxy/ppapi_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698