| OLD | NEW |
| 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 15 matching lines...) Expand all Loading... |
| 26 #include "ipc/ipc_sync_message_filter.h" | 26 #include "ipc/ipc_sync_message_filter.h" |
| 27 #include "native_client/src/trusted/service_runtime/sel_main_chrome.h" | 27 #include "native_client/src/trusted/service_runtime/sel_main_chrome.h" |
| 28 #include "native_client/src/trusted/validator/nacl_file_info.h" | 28 #include "native_client/src/trusted/validator/nacl_file_info.h" |
| 29 | 29 |
| 30 #if defined(OS_POSIX) | 30 #if defined(OS_POSIX) |
| 31 #include "base/file_descriptor_posix.h" | 31 #include "base/file_descriptor_posix.h" |
| 32 #endif | 32 #endif |
| 33 | 33 |
| 34 #if defined(OS_LINUX) | 34 #if defined(OS_LINUX) |
| 35 #include "content/public/common/child_process_sandbox_support_linux.h" | 35 #include "content/public/common/child_process_sandbox_support_linux.h" |
| 36 #endif | 36 |
| 37 #if NACL_BUILD_SUBARCH == 32 |
| 38 #include "components/nacl/loader/nonsfi/nonsfi_main.h" |
| 39 #include "content/public/common/content_switches.h" |
| 40 #endif // NACL_BUILD_SUBARCH == 32 |
| 41 |
| 42 #endif // OS_LINUX |
| 37 | 43 |
| 38 #if defined(OS_WIN) | 44 #if defined(OS_WIN) |
| 39 #include <fcntl.h> | 45 #include <fcntl.h> |
| 40 #include <io.h> | 46 #include <io.h> |
| 41 | 47 |
| 42 #include "content/public/common/sandbox_init.h" | 48 #include "content/public/common/sandbox_init.h" |
| 43 #endif | 49 #endif |
| 44 | 50 |
| 45 namespace { | 51 namespace { |
| 46 #if defined(OS_MACOSX) | 52 #if defined(OS_MACOSX) |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 args->debug_stub_server_bound_socket_fd = nacl::ToNativeHandle( | 330 args->debug_stub_server_bound_socket_fd = nacl::ToNativeHandle( |
| 325 params.debug_stub_server_bound_socket); | 331 params.debug_stub_server_bound_socket); |
| 326 #endif | 332 #endif |
| 327 #if defined(OS_WIN) | 333 #if defined(OS_WIN) |
| 328 args->broker_duplicate_handle_func = BrokerDuplicateHandle; | 334 args->broker_duplicate_handle_func = BrokerDuplicateHandle; |
| 329 args->attach_debug_exception_handler_func = AttachDebugExceptionHandler; | 335 args->attach_debug_exception_handler_func = AttachDebugExceptionHandler; |
| 330 #endif | 336 #endif |
| 331 #if defined(OS_LINUX) | 337 #if defined(OS_LINUX) |
| 332 args->prereserved_sandbox_size = prereserved_sandbox_size_; | 338 args->prereserved_sandbox_size = prereserved_sandbox_size_; |
| 333 #endif | 339 #endif |
| 334 NaClChromeMainStart(args); | 340 |
| 341 |
| 342 #if defined(OS_LINUX) && NACL_BUILD_SUBARCH == 32 |
| 343 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableNaClSfi)) { |
| 344 nacl::nonsfi::MainStart(args->imc_bootstrap_handle); |
| 345 } else |
| 346 #endif |
| 347 { |
| 348 NaClChromeMainStart(args); |
| 349 } |
| 335 NOTREACHED(); | 350 NOTREACHED(); |
| 336 } | 351 } |
| OLD | NEW |