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

Unified Diff: content/common/seccomp_sandbox.h

Issue 10843059: Create a LinuxSandbox class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 months 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
« no previous file with comments | « content/common/sandbox_methods_linux.h ('k') | content/content_common.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/seccomp_sandbox.h
diff --git a/content/common/seccomp_sandbox.h b/content/common/seccomp_sandbox.h
index 0c59a1142d6075e5bd809c47901f3d1a004b68be..06cf9f8b765929f14d26590de3183ec4f60dcda2 100644
--- a/content/common/seccomp_sandbox.h
+++ b/content/common/seccomp_sandbox.h
@@ -8,14 +8,8 @@
// Seccomp enable/disable logic is centralized here.
// - We define SECCOMP_SANDBOX if seccomp is compiled in at all: currently,
// on non-views (non-ChromeOS) non-ARM non-Clang Linux only.
-// - If we have SECCOMP_SANDBOX, we provide SeccompSandboxEnabled() as
-// a run-time test to determine whether to turn on seccomp:
-// currently, on by default in debug builds and off by default in
-// release.
-#include "base/command_line.h"
#include "build/build_config.h"
-#include "content/public/common/content_switches.h"
#if defined(ARCH_CPU_X86_FAMILY) && !defined(CHROMIUM_SELINUX) && \
!defined(OS_CHROMEOS) && !defined(TOOLKIT_VIEWS) && !defined(OS_OPENBSD)
@@ -23,22 +17,4 @@
#include "sandbox/linux/seccomp-legacy/sandbox.h"
#endif
-#if defined(SECCOMP_SANDBOX)
-// Return true if seccomp is enabled.
-static bool SeccompSandboxEnabled() {
- // TODO(evan): turn on for release too once we've flushed out all the bugs,
- // allowing us to delete this file entirely and just rely on the "disabled"
- // switch.
-#ifdef NDEBUG
- // Off by default; allow turning on with a switch.
- return CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableSeccompSandbox);
-#else
- // On by default; allow turning off with a switch.
- return !CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDisableSeccompSandbox);
-#endif // NDEBUG
-}
-#endif // SECCOMP_SANDBOX
-
#endif // CONTENT_COMMON_SECCOMP_SANDBOX_H_
« no previous file with comments | « content/common/sandbox_methods_linux.h ('k') | content/content_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698