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

Side by Side Diff: components/nacl/loader/nacl_listener.cc

Issue 177113009: Support non-SFI mode in NaCl manifest file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 9 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 unified diff | Download patch
« no previous file with comments | « components/nacl/common/nacl_types.cc ('k') | components/nacl/renderer/ppb_nacl_private_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/nacl/loader/nacl_listener.h" 5 #include "components/nacl/loader/nacl_listener.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 9
10 #if defined(OS_POSIX) 10 #if defined(OS_POSIX)
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 } 280 }
281 281
282 IPC::ChannelHandle browser_handle; 282 IPC::ChannelHandle browser_handle;
283 IPC::ChannelHandle ppapi_renderer_handle; 283 IPC::ChannelHandle ppapi_renderer_handle;
284 284
285 if (params.enable_ipc_proxy) { 285 if (params.enable_ipc_proxy) {
286 browser_handle = IPC::Channel::GenerateVerifiedChannelID("nacl"); 286 browser_handle = IPC::Channel::GenerateVerifiedChannelID("nacl");
287 ppapi_renderer_handle = IPC::Channel::GenerateVerifiedChannelID("nacl"); 287 ppapi_renderer_handle = IPC::Channel::GenerateVerifiedChannelID("nacl");
288 288
289 #if defined(OS_LINUX) 289 #if defined(OS_LINUX)
290 if (params.enable_nonsfi_mode) { 290 if (params.uses_nonsfi_mode) {
291 // In non-SFI mode, we neither intercept nor rewrite the message using 291 // In non-SFI mode, we neither intercept nor rewrite the message using
292 // NaClIPCAdapter, and the channels are connected between the plugin and 292 // NaClIPCAdapter, and the channels are connected between the plugin and
293 // the hosts directly. So, the IPC::Channel instances will be created in 293 // the hosts directly. So, the IPC::Channel instances will be created in
294 // the plugin side, because the IPC::Listener needs to live on the 294 // the plugin side, because the IPC::Listener needs to live on the
295 // plugin's main thread. However, on initialization (i.e. before loading 295 // plugin's main thread. However, on initialization (i.e. before loading
296 // the plugin binary), the FD needs to be passed to the hosts. So, here 296 // the plugin binary), the FD needs to be passed to the hosts. So, here
297 // we create raw FD pairs, and pass the client side FDs to the hosts, 297 // we create raw FD pairs, and pass the client side FDs to the hosts,
298 // and the server side FDs to the plugin. 298 // and the server side FDs to the plugin.
299 int browser_server_ppapi_fd; 299 int browser_server_ppapi_fd;
300 int browser_client_ppapi_fd; 300 int browser_client_ppapi_fd;
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 #endif 409 #endif
410 #if defined(OS_WIN) 410 #if defined(OS_WIN)
411 args->broker_duplicate_handle_func = BrokerDuplicateHandle; 411 args->broker_duplicate_handle_func = BrokerDuplicateHandle;
412 args->attach_debug_exception_handler_func = AttachDebugExceptionHandler; 412 args->attach_debug_exception_handler_func = AttachDebugExceptionHandler;
413 #endif 413 #endif
414 #if defined(OS_LINUX) 414 #if defined(OS_LINUX)
415 args->prereserved_sandbox_size = prereserved_sandbox_size_; 415 args->prereserved_sandbox_size = prereserved_sandbox_size_;
416 #endif 416 #endif
417 417
418 #if defined(OS_LINUX) 418 #if defined(OS_LINUX)
419 if (params.enable_nonsfi_mode) { 419 if (params.uses_nonsfi_mode) {
420 nacl::nonsfi::MainStart(args->imc_bootstrap_handle); 420 nacl::nonsfi::MainStart(args->imc_bootstrap_handle);
421 NOTREACHED(); 421 NOTREACHED();
422 return; 422 return;
423 } 423 }
424 #endif 424 #endif
425 NaClChromeMainStartApp(nap, args); 425 NaClChromeMainStartApp(nap, args);
426 NOTREACHED(); 426 NOTREACHED();
427 } 427 }
OLDNEW
« no previous file with comments | « components/nacl/common/nacl_types.cc ('k') | components/nacl/renderer/ppb_nacl_private_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698