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

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

Issue 100373005: Initial implementation of Bare Metal Mode for NaCl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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_listener.cc
diff --git a/components/nacl/loader/nacl_listener.cc b/components/nacl/loader/nacl_listener.cc
index cd175dda5f6e0aa540f0c25fed7ebd8aa4ee2906..aa98596502f49329064b0bff9f62e1a09f8ac99d 100644
--- a/components/nacl/loader/nacl_listener.cc
+++ b/components/nacl/loader/nacl_listener.cc
@@ -33,7 +33,13 @@
#if defined(OS_LINUX)
#include "content/public/common/child_process_sandbox_support_linux.h"
-#endif
+
+#if NACL_BUILD_SUBARCH == 32
+#include "components/nacl/loader/nonsfi/nonsfi_main.h"
+#include "content/public/common/content_switches.h"
+#endif // NACL_BUILD_SUBARCH == 32
+
+#endif // OS_LINUX
#if defined(OS_WIN)
#include <fcntl.h>
@@ -331,6 +337,15 @@ void NaClListener::OnStart(const nacl::NaClStartParams& params) {
#if defined(OS_LINUX)
args->prereserved_sandbox_size = prereserved_sandbox_size_;
#endif
- NaClChromeMainStart(args);
+
+
+#if defined(OS_LINUX) && NACL_BUILD_SUBARCH == 32
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableNaClSfi)) {
+ nacl::nonsfi::MainStart(args->imc_bootstrap_handle);
+ } else
+#endif
+ {
+ NaClChromeMainStart(args);
+ }
NOTREACHED();
}

Powered by Google App Engine
This is Rietveld 408576698