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

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

Issue 231793003: Add IPC Channel for new ManifestService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | « components/nacl/common/nacl_types.cc ('k') | components/nacl/loader/nonsfi/nonsfi_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/loader/nacl_listener.cc
diff --git a/components/nacl/loader/nacl_listener.cc b/components/nacl/loader/nacl_listener.cc
index 132eed3a99c843c4db42e24d210d88a23094299d..6f24702acfdce2daa60cf6ea1d3b9a5a31df186d 100644
--- a/components/nacl/loader/nacl_listener.cc
+++ b/components/nacl/loader/nacl_listener.cc
@@ -292,6 +292,7 @@ void NaClListener::OnStart(const nacl::NaClStartParams& params) {
IPC::ChannelHandle browser_handle;
IPC::ChannelHandle ppapi_renderer_handle;
+ IPC::ChannelHandle manifest_service_handle;
if (params.enable_ipc_proxy) {
browser_handle = IPC::Channel::GenerateVerifiedChannelID("nacl");
@@ -299,6 +300,9 @@ void NaClListener::OnStart(const nacl::NaClStartParams& params) {
#if defined(OS_LINUX)
if (uses_nonsfi_mode_) {
+ manifest_service_handle =
+ IPC::Channel::GenerateVerifiedChannelID("nacl");
+
// In non-SFI mode, we neither intercept nor rewrite the message using
// NaClIPCAdapter, and the channels are connected between the plugin and
// the hosts directly. So, the IPC::Channel instances will be created in
@@ -311,23 +315,31 @@ void NaClListener::OnStart(const nacl::NaClStartParams& params) {
int browser_client_ppapi_fd;
int renderer_server_ppapi_fd;
int renderer_client_ppapi_fd;
+ int manifest_service_server_fd;
+ int manifest_service_client_fd;
if (!IPC::SocketPair(
&browser_server_ppapi_fd, &browser_client_ppapi_fd) ||
!IPC::SocketPair(
- &renderer_server_ppapi_fd, &renderer_client_ppapi_fd)) {
+ &renderer_server_ppapi_fd, &renderer_client_ppapi_fd) ||
+ !IPC::SocketPair(
+ &manifest_service_server_fd, &manifest_service_client_fd)) {
LOG(ERROR) << "Failed to create sockets for IPC.";
return;
}
// Set the plugin IPC channel FDs.
- ppapi::SetIPCFileDescriptors(
- browser_server_ppapi_fd, renderer_server_ppapi_fd);
+ ppapi::SetIPCFileDescriptors(browser_server_ppapi_fd,
+ renderer_server_ppapi_fd,
+ manifest_service_server_fd);
+ ppapi::StartUpPlugin();
// Send back to the client side IPC channel FD to the host.
browser_handle.socket =
base::FileDescriptor(browser_client_ppapi_fd, true);
ppapi_renderer_handle.socket =
base::FileDescriptor(renderer_client_ppapi_fd, true);
+ manifest_service_handle.socket =
+ base::FileDescriptor(manifest_service_client_fd, true);
} else {
#endif
// Create the PPAPI IPC channels between the NaCl IRT and the host
@@ -355,7 +367,8 @@ void NaClListener::OnStart(const nacl::NaClStartParams& params) {
trusted_listener_->TakeClientFileDescriptor(), true);
#endif
if (!Send(new NaClProcessHostMsg_PpapiChannelsCreated(
- browser_handle, ppapi_renderer_handle, trusted_renderer_handle)))
+ browser_handle, ppapi_renderer_handle,
+ trusted_renderer_handle, manifest_service_handle)))
LOG(ERROR) << "Failed to send IPC channel handle to NaClProcessHost.";
std::vector<nacl::FileDescriptor> handles = params.handles;
« no previous file with comments | « components/nacl/common/nacl_types.cc ('k') | components/nacl/loader/nonsfi/nonsfi_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698