Chromium Code Reviews| 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 14 matching lines...) Expand all Loading... | |
| 25 #include "ipc/ipc_sync_channel.h" | 25 #include "ipc/ipc_sync_channel.h" |
| 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 "components/nacl/loader/nonsfi/nonsfi_main.h" | |
| 35 #include "content/public/common/child_process_sandbox_support_linux.h" | 36 #include "content/public/common/child_process_sandbox_support_linux.h" |
| 36 #endif | 37 #endif |
| 37 | 38 |
| 38 #if defined(OS_WIN) | 39 #if defined(OS_WIN) |
| 39 #include <fcntl.h> | 40 #include <fcntl.h> |
| 40 #include <io.h> | 41 #include <io.h> |
| 41 | 42 |
| 42 #include "content/public/common/sandbox_init.h" | 43 #include "content/public/common/sandbox_init.h" |
| 43 #endif | 44 #endif |
| 44 | 45 |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 324 args->debug_stub_server_bound_socket_fd = nacl::ToNativeHandle( | 325 args->debug_stub_server_bound_socket_fd = nacl::ToNativeHandle( |
| 325 params.debug_stub_server_bound_socket); | 326 params.debug_stub_server_bound_socket); |
| 326 #endif | 327 #endif |
| 327 #if defined(OS_WIN) | 328 #if defined(OS_WIN) |
| 328 args->broker_duplicate_handle_func = BrokerDuplicateHandle; | 329 args->broker_duplicate_handle_func = BrokerDuplicateHandle; |
| 329 args->attach_debug_exception_handler_func = AttachDebugExceptionHandler; | 330 args->attach_debug_exception_handler_func = AttachDebugExceptionHandler; |
| 330 #endif | 331 #endif |
| 331 #if defined(OS_LINUX) | 332 #if defined(OS_LINUX) |
| 332 args->prereserved_sandbox_size = prereserved_sandbox_size_; | 333 args->prereserved_sandbox_size = prereserved_sandbox_size_; |
| 333 #endif | 334 #endif |
| 334 NaClChromeMainStart(args); | 335 |
| 336 | |
| 337 #if defined(OS_LINUX) | |
| 338 if (params.enable_nonsfi_mode) { | |
| 339 nacl::nonsfi::MainStart(args->imc_bootstrap_handle); | |
| 340 } else | |
|
Mark Seaborn
2013/12/10 19:56:44
You could avoid the awkward dangling else by doing
hidehiko
2013/12/11 07:56:14
Done.
| |
| 341 #endif | |
| 342 { | |
| 343 NaClChromeMainStart(args); | |
| 344 } | |
| 335 NOTREACHED(); | 345 NOTREACHED(); |
| 336 } | 346 } |
| OLD | NEW |