Index: content/common/sandbox_seccomp_bpf_linux.cc |
diff --git a/content/common/sandbox_seccomp_bpf_linux.cc b/content/common/sandbox_seccomp_bpf_linux.cc |
index fea84bf444cd86443b5215359b328b41ffd8d3bf..8e8a761df097d3bc4a4caded5d8260d8fa42f4db 100644 |
--- a/content/common/sandbox_seccomp_bpf_linux.cc |
+++ b/content/common/sandbox_seccomp_bpf_linux.cc |
@@ -30,6 +30,7 @@ |
#include "base/command_line.h" |
#include "base/logging.h" |
#include "build/build_config.h" |
+#include "build/build_config_functions.h" |
#include "content/common/sandbox_linux.h" |
#include "content/common/sandbox_seccomp_bpf_linux.h" |
#include "content/public/common/content_switches.h" |
@@ -56,54 +57,6 @@ namespace { |
void StartSandboxWithPolicy(Sandbox::EvaluateSyscall syscall_policy, |
BrokerProcess* broker_process); |
-inline bool RunningOnASAN() { |
-#if defined(ADDRESS_SANITIZER) |
- return true; |
-#else |
- return false; |
-#endif |
-} |
- |
-inline bool IsChromeOS() { |
-#if defined(OS_CHROMEOS) |
- return true; |
-#else |
- return false; |
-#endif |
-} |
- |
-inline bool IsArchitectureX86_64() { |
-#if defined(__x86_64__) |
- return true; |
-#else |
- return false; |
-#endif |
-} |
- |
-inline bool IsArchitectureI386() { |
-#if defined(__i386__) |
- return true; |
-#else |
- return false; |
-#endif |
-} |
- |
-inline bool IsArchitectureArm() { |
-#if defined(__arm__) |
- return true; |
-#else |
- return false; |
-#endif |
-} |
- |
-inline bool IsUsingToolKitGtk() { |
-#if defined(TOOLKIT_GTK) |
- return true; |
-#else |
- return false; |
-#endif |
-} |
- |
// Write |error_message| to stderr. Similar to RawLog(), but a bit more careful |
// about async-signal safety. |size| is the size to write and should typically |
// not include a terminating \0. |
@@ -1593,7 +1546,7 @@ ErrorCode ArmGpuBrokerProcessPolicy(Sandbox* sandbox, |
// Don't restrict on ASAN. |
ErrorCode RestrictCloneToThreadsAndEPERMFork(Sandbox* sandbox) { |
// Glibc's pthread. |
- if (!RunningOnASAN()) { |
+ if (!IsASANBuild()) { |
return sandbox->Cond(0, ErrorCode::TP_32BIT, ErrorCode::OP_EQUAL, |
CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | |
CLONE_THREAD | CLONE_SYSVSEM | CLONE_SETTLS | |