content/common/sandbox_linux.cc
// Implement the command line enabling logic for seccomp-legacy.
Implement the command line enabling logic for seccomp-legacy.
Implement the command line enabling logic for seccomp - legacy .
bool IsSeccompLegacyDesired() {
  CommandLine* command_line = CommandLine::ForCurrentProcess();
  if (command_line->HasSwitch(switches::kNoSandbox)) {
    return false;
  }
#if defined(SECCOMP_SANDBOX)
#if defined(NDEBUG)
  return command_line->HasSwitch(switches::kEnableSeccompSandbox);
#else
  return !command_line->HasSwitch(switches::kDisableSeccompSandbox);
#endif  
#endif  
  return false;
}
bool IsSeccompLegacyDesired ( ) { CommandLine * command_line = CommandLine :: ForCurrentProcess ( ) ; if ( command_line -> HasSwitch ( switches :: kNoSandbox ) ) { return false ; } #if defined ( SECCOMP_SANDBOX ) #if defined ( NDEBUG ) return command_line -> HasSwitch ( switches :: kEnableSeccompSandbox ) ; #else return ! command_line -> HasSwitch ( switches :: kDisableSeccompSandbox ) ; #endif #endif return false ; }
Implement the command line enabling logic for seccomp-legacy.
Implement the command line enabling logic for seccomp - legacy .
// Off by default. Allow turning on with a switch. // On by default. Allow turning off with a switch. // NDEBUG // SECCOMP_SANDBOX