diff options
author | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-06 02:09:11 +0000 |
---|---|---|
committer | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-06 02:09:11 +0000 |
commit | 189b1875bf9129556e8c926f9acb06e20b0541da (patch) | |
tree | 1c05dbb53edaa6794a7cc4ad6036d8a22b209865 /sandbox | |
parent | 5a40544f1d5d52d30225abad0d0ec7fc7b3da2df (diff) | |
download | chromium_src-189b1875bf9129556e8c926f9acb06e20b0541da.zip chromium_src-189b1875bf9129556e8c926f9acb06e20b0541da.tar.gz chromium_src-189b1875bf9129556e8c926f9acb06e20b0541da.tar.bz2 |
Revert 239102 "Move build/build_config_functions.h to sandbox/"
> Move build/build_config_functions.h to sandbox/
>
> There is not much support for build/build_config_functions.h,
> as highlighted in http://goo.gl/3ufXOJ. Move it away.
>
> R=jww@chromium.org
>
> Review URL: https://codereview.chromium.org/106163008
TBR=jln@chromium.org
Review URL: https://codereview.chromium.org/107643002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239105 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox')
-rw-r--r-- | sandbox/linux/seccomp-bpf/bpf_tests.h | 4 | ||||
-rw-r--r-- | sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc | 2 | ||||
-rw-r--r-- | sandbox/linux/services/build_config_functions.h | 86 |
3 files changed, 3 insertions, 89 deletions
diff --git a/sandbox/linux/seccomp-bpf/bpf_tests.h b/sandbox/linux/seccomp-bpf/bpf_tests.h index 598ef55..a1984d6 100644 --- a/sandbox/linux/seccomp-bpf/bpf_tests.h +++ b/sandbox/linux/seccomp-bpf/bpf_tests.h @@ -10,9 +10,9 @@ #include <sys/types.h> #include "build/build_config.h" -#include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" -#include "sandbox/linux/services/build_config_functions.h" +#include "build/build_config_functions.h" #include "sandbox/linux/tests/unit_tests.h" +#include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" namespace sandbox { diff --git a/sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc b/sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc index 4225929..97811c1 100644 --- a/sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc +++ b/sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc @@ -22,12 +22,12 @@ #include "base/memory/scoped_ptr.h" #include "build/build_config.h" +#include "build/build_config_functions.h" #include "sandbox/linux/seccomp-bpf/bpf_tests.h" #include "sandbox/linux/seccomp-bpf/syscall.h" #include "sandbox/linux/seccomp-bpf/trap.h" #include "sandbox/linux/seccomp-bpf/verifier.h" #include "sandbox/linux/services/broker_process.h" -#include "sandbox/linux/services/build_config_functions.h" #include "sandbox/linux/services/linux_syscalls.h" #include "sandbox/linux/tests/unit_tests.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/sandbox/linux/services/build_config_functions.h b/sandbox/linux/services/build_config_functions.h deleted file mode 100644 index 4c7587c..0000000 --- a/sandbox/linux/services/build_config_functions.h +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// These helpers allow to avoid the use of an #ifdef when the code can -// compile without them. Thanks to compiler optimizations, the final generated -// binary should look the same when using these. - -#ifndef SANDBOX_LINUX_SERVICES_BUILD_CONFIG_FUNCTIONS_H_ -#define SANDBOX_LINUX_SERVICES_BUILD_CONFIG_FUNCTIONS_H_ - -#include "build/build_config.h" - -namespace sandbox { - -namespace { - -inline bool IsASANBuild() { -#if defined(ADDRESS_SANITIZER) - return true; -#else - return false; -#endif -} - -inline bool IsLinux() { -#if defined(OS_LINUX) - return true; -#else - return false; -#endif -} - -inline bool IsChromeOS() { -#if defined(OS_CHROMEOS) - return true; -#else - return false; -#endif -} - -inline bool IsAndroid() { -#if defined(OS_ANDROID) - return true; -#else - return false; -#endif -} - -inline bool IsArchitectureX86_64() { -#if defined(ARCH_CPU_X86_64) - return true; -#else - return false; -#endif -} - -inline bool IsArchitectureI386() { -#if defined(ARCH_CPU_X86) - return true; -#else - return false; -#endif -} - -inline bool IsArchitectureARM() { -#if defined(ARCH_CPU_ARM_FAMILY) - return true; -#else - return false; -#endif -} - -inline bool IsUsingToolKitGtk() { -#if defined(TOOLKIT_GTK) - return true; -#else - return false; -#endif -} - -} // namespace. - -} // namespace sandbox. - -#endif // SANDBOX_LINUX_SERVICES_BUILD_CONFIG_FUNCTIONS_H_ |