Index: content/common/sandbox_linux.cc |
diff --git a/content/common/sandbox_linux.cc b/content/common/sandbox_linux.cc |
index 6384d22c9022e878737ca62d493d5a5d98924bcb..fb39c11d31b108252119d000c27cd15c655b73af 100644 |
--- a/content/common/sandbox_linux.cc |
+++ b/content/common/sandbox_linux.cc |
@@ -37,15 +37,17 @@ void LogSandboxStarted(const std::string& sandbox_name) { |
// 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) |
// Off by default. Allow turning on with a switch. |
- return CommandLine::ForCurrentProcess()->HasSwitch( |
- switches::kEnableSeccompSandbox); |
+ return command_line->HasSwitch(switches::kEnableSeccompSandbox); |
#else |
// On by default. Allow turning off with a switch. |
- return !CommandLine::ForCurrentProcess()->HasSwitch( |
- switches::kDisableSeccompSandbox); |
+ return !command_line->HasSwitch(switches::kDisableSeccompSandbox); |
#endif // NDEBUG |
#endif // SECCOMP_SANDBOX |
return false; |