Index: components/nacl/browser/nacl_process_host.cc |
diff --git a/components/nacl/browser/nacl_process_host.cc b/components/nacl/browser/nacl_process_host.cc |
index f3c91a97ea7c22ca5bd137ac29c1e7bc11e06adf..29b194cdc0abe91d96f555ba405ffc04e6bc9a3d 100644 |
--- a/components/nacl/browser/nacl_process_host.cc |
+++ b/components/nacl/browser/nacl_process_host.cc |
@@ -27,6 +27,7 @@ |
#include "base/win/windows_version.h" |
#include "build/build_config.h" |
#include "components/nacl/browser/nacl_browser.h" |
+#include "components/nacl/browser/nacl_browser_delegate.h" |
#include "components/nacl/browser/nacl_host_message_filter.h" |
#include "components/nacl/common/nacl_cmd_line.h" |
#include "components/nacl/common/nacl_host_messages.h" |
@@ -430,15 +431,18 @@ void NaClProcessHost::Launch( |
} |
if (uses_nonsfi_mode_) { |
+ bool nonsfi_mode_enabled = false; |
#if defined(OS_LINUX) |
- const bool kNonSFIModeSupported = true; |
-#else |
- const bool kNonSFIModeSupported = false; |
+ nonsfi_mode_enabled = nonsfi_mode_enabled || |
jln (very slow on Chromium)
2014/05/08 23:22:41
This is fine, but if you don't mind havint differe
jln (very slow on Chromium)
2014/05/08 23:44:57
err, enabled, not disabled:
nonsfi_mode_enabled =
elijahtaylor1
2014/05/09 00:33:28
Done.
|
+ cmd->HasSwitch(switches::kEnableNaClNonSfiMode); |
+# if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) |
+ nonsfi_mode_enabled = nonsfi_mode_enabled || |
+ NaClBrowser::GetDelegate()->IsNonSfiModeAllowed(manifest_url_); |
+# endif |
#endif |
- if (!kNonSFIModeSupported || |
- !cmd->HasSwitch(switches::kEnableNaClNonSfiMode)) { |
- SendErrorToRenderer("NaCl non-SFI mode works only on Linux with" |
- " --enable-nacl-nonsfi-mode specified"); |
+ if (!nonsfi_mode_enabled) { |
+ SendErrorToRenderer("NaCl non-SFI mode is not available for this platform" |
+ " and NaCl module."); |
delete this; |
return; |
} |