diff options
author | Hidehiko Abe <hidehiko@google.com> | 2018-02-22 01:29:44 +0900 |
---|---|---|
committer | Hidehiko Abe <hidehiko@google.com> | 2018-02-22 01:33:01 +0900 |
commit | db03e04f4e02b208da755fc87770ee92c1ed0657 (patch) | |
tree | 7a56bdf0141b59e3f5f257dbd35479c41027fd98 | |
parent | f810b5921dde57180956b9eadf39a3a2b8cb5855 (diff) | |
download | libchrome-db03e04f4e02b208da755fc87770ee92c1ed0657.tar.gz |
Use header files to proxy system headers.
Instead of directly modifying include directives,
use header files to proxy system headers.
This reduces line-by-line modification from Chrome repository.
Bug: 73270448
Test: Built locally. Treehugger.
Change-Id: I8f7315fc21634d3c2fb46bb9a72a43974140b9dc
-rw-r--r-- | base/base64.cc | 2 | ||||
-rw-r--r-- | base/base64url.cc | 3 | ||||
-rw-r--r-- | base/debug/debugger_posix.cc | 2 | ||||
-rw-r--r-- | base/debug/stack_trace_posix.cc | 2 | ||||
-rw-r--r-- | base/memory/shared_memory_android.cc | 5 | ||||
-rw-r--r-- | base/memory/shared_memory_posix.cc | 4 | ||||
-rw-r--r-- | base/third_party/symbolize/symbolize.h | 15 | ||||
-rw-r--r-- | third_party/ashmem/ashmem.h | 17 | ||||
-rw-r--r-- | third_party/modp_b64/modp_b64.h | 16 |
9 files changed, 54 insertions, 12 deletions
diff --git a/base/base64.cc b/base/base64.cc index 61d853897b..ca8ee93907 100644 --- a/base/base64.cc +++ b/base/base64.cc @@ -6,7 +6,7 @@ #include <stddef.h> -#include <modp_b64/modp_b64.h> +#include "third_party/modp_b64/modp_b64.h" namespace base { diff --git a/base/base64url.cc b/base/base64url.cc index 942229e76a..0a2c04511f 100644 --- a/base/base64url.cc +++ b/base/base64url.cc @@ -10,8 +10,7 @@ #include "base/macros.h" #include "base/numerics/safe_math.h" #include "base/strings/string_util.h" - -#include <modp_b64/modp_b64.h> +#include "third_party/modp_b64/modp_b64.h" namespace base { diff --git a/base/debug/debugger_posix.cc b/base/debug/debugger_posix.cc index ebe9d611f7..3255552333 100644 --- a/base/debug/debugger_posix.cc +++ b/base/debug/debugger_posix.cc @@ -46,7 +46,7 @@ #include "base/strings/string_piece.h" #if defined(USE_SYMBOLIZE) -#error "symbolize support was removed from libchrome" +#include "base/third_party/symbolize/symbolize.h" #endif #if defined(OS_ANDROID) diff --git a/base/debug/stack_trace_posix.cc b/base/debug/stack_trace_posix.cc index c134f494eb..ab4c34b021 100644 --- a/base/debug/stack_trace_posix.cc +++ b/base/debug/stack_trace_posix.cc @@ -49,7 +49,7 @@ #include "build/build_config.h" #if defined(USE_SYMBOLIZE) -#error "symbolize support was removed from libchrome" +#include "base/third_party/symbolize/symbolize.h" #endif namespace base { diff --git a/base/memory/shared_memory_android.cc b/base/memory/shared_memory_android.cc index dffd1e3712..6f1d9cb874 100644 --- a/base/memory/shared_memory_android.cc +++ b/base/memory/shared_memory_android.cc @@ -8,12 +8,7 @@ #include <sys/mman.h> #include "base/logging.h" - -#if defined(__ANDROID__) -#include <cutils/ashmem.h> -#else #include "third_party/ashmem/ashmem.h" -#endif namespace base { diff --git a/base/memory/shared_memory_posix.cc b/base/memory/shared_memory_posix.cc index e5f67bd1e6..287e55d823 100644 --- a/base/memory/shared_memory_posix.cc +++ b/base/memory/shared_memory_posix.cc @@ -27,9 +27,9 @@ #if defined(OS_ANDROID) #include "base/os_compat_android.h" +#endif +#if defined(OS_ANDROID) || defined(__ANDROID__) #include "third_party/ashmem/ashmem.h" -#elif defined(__ANDROID__) -#include <cutils/ashmem.h> #endif namespace base { diff --git a/base/third_party/symbolize/symbolize.h b/base/third_party/symbolize/symbolize.h new file mode 100644 index 0000000000..59beafb7cb --- /dev/null +++ b/base/third_party/symbolize/symbolize.h @@ -0,0 +1,15 @@ +// Copyright (C) 2018 The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#error "symbolize support was removed from libchrome" diff --git a/third_party/ashmem/ashmem.h b/third_party/ashmem/ashmem.h new file mode 100644 index 0000000000..3ef9f73c80 --- /dev/null +++ b/third_party/ashmem/ashmem.h @@ -0,0 +1,17 @@ +// Copyright (C) 2018 The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// third_party/ashmem is Android shared memory. Instead of clone it here, +// use cutils/ashmem.h directly. +#include <cutils/ashmem.h> diff --git a/third_party/modp_b64/modp_b64.h b/third_party/modp_b64/modp_b64.h new file mode 100644 index 0000000000..ed24ac8494 --- /dev/null +++ b/third_party/modp_b64/modp_b64.h @@ -0,0 +1,16 @@ +// Copyright (C) 2018 The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Redirect to system header. +#include <modp_b64/modp_b64.h> |