Home | History | Annotate | Download | only in common
      1 // Copyright 2014 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #include "components/nacl/common/nacl_nonsfi_util.h"
      6 
      7 #include "base/command_line.h"
      8 #include "build/build_config.h"
      9 #include "components/nacl/common/nacl_switches.h"
     10 
     11 namespace nacl {
     12 
     13 bool IsNonSFIModeEnabled() {
     14 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL)
     15   return true;
     16 #elif defined(OS_LINUX)
     17   return CommandLine::ForCurrentProcess()->HasSwitch(
     18       switches::kEnableNaClNonSfiMode);
     19 #else
     20   return false;
     21 #endif
     22 }
     23 
     24 }  // namespace nacl
     25