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

Unified Diff: components/nacl/loader/nacl_ipc_adapter.cc

Issue 150713003: Create IPC channel to communicate with the renderer in NaClListener::OnStart(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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
Index: components/nacl/loader/nacl_ipc_adapter.cc
diff --git a/components/nacl/loader/nacl_ipc_adapter.cc b/components/nacl/loader/nacl_ipc_adapter.cc
index 3843572dd9ec26594af859f4dbd9f307c5cab7ce..bad4b7539f1e97782fbe6dd440e6f191b57707cd 100644
--- a/components/nacl/loader/nacl_ipc_adapter.cc
+++ b/components/nacl/loader/nacl_ipc_adapter.cc
@@ -505,28 +505,6 @@ bool NaClIPCAdapter::OnMessageReceived(const IPC::Message& msg) {
)));
break;
}
- case ppapi::proxy::SerializedHandle::CHANNEL_HANDLE: {
- // Check that this came from a PpapiMsg_CreateNaClChannel message.
- // This code here is only appropriate for that message.
- DCHECK(msg.type() == PpapiMsg_CreateNaClChannel::ID);
- IPC::ChannelHandle channel_handle =
- IPC::Channel::GenerateVerifiedChannelID("nacl");
- scoped_refptr<NaClIPCAdapter> ipc_adapter(
- new NaClIPCAdapter(channel_handle, task_runner_.get()));
- ipc_adapter->ConnectChannel();
-#if defined(OS_POSIX)
- channel_handle.socket = base::FileDescriptor(
- ipc_adapter->TakeClientFileDescriptor(), true);
-#endif
- nacl_desc.reset(new NaClDescWrapper(ipc_adapter->MakeNaClDesc()));
- // Send back a message that the channel was created.
- scoped_ptr<IPC::Message> response(
- new PpapiHostMsg_NaClChannelCreated(channel_handle));
- task_runner_->PostTask(FROM_HERE,
- base::Bind(&NaClIPCAdapter::SendMessageOnIOThread, this,
- base::Passed(&response)));
- break;
- }
case ppapi::proxy::SerializedHandle::FILE: {
// Create the NaClDesc for the file descriptor. If quota checking is
// required, wrap it in a NaClDescQuota.
@@ -547,6 +525,7 @@ bool NaClIPCAdapter::OnMessageReceived(const IPC::Message& msg) {
break;
}
+ case ppapi::proxy::SerializedHandle::CHANNEL_HANDLE:
Mark Seaborn 2014/02/04 19:28:12 Should we also remove the definition of CHANNEL_HA
hidehiko 2014/02/05 06:30:16 Done.
case ppapi::proxy::SerializedHandle::INVALID: {
// Nothing to do. TODO(dmichael): Should we log this? Or is it
// sometimes okay to pass an INVALID handle?

Powered by Google App Engine
This is Rietveld 408576698