OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This file implements the native methods of | 5 // This file implements the native methods of |
6 // org.content.chromium.app.LinkerTests | 6 // org.content.chromium.app.LinkerTests |
7 // Unlike the content of linker_jni.cc, it is part of the content library and | 7 // Unlike the content of linker_jni.cc, it is part of the content library and |
8 // can thus use base/ and the C++ STL. | 8 // can thus use base/ and the C++ STL. |
9 | 9 |
10 #include "content/shell/android/linker_test_apk/chromium_linker_test_linker_test
s.h" | 10 #include "content/shell/android/linker_test_apk/chromium_linker_test_linker_test
s.h" |
11 | 11 |
12 #include <sys/mman.h> | 12 #include <sys/mman.h> |
13 #include <errno.h> | 13 #include <errno.h> |
14 #include <stdio.h> | 14 #include <stdio.h> |
15 #include <string> | 15 #include <string> |
16 #include <vector> | 16 #include <vector> |
17 | 17 |
18 #include "base/basictypes.h" | 18 #include "base/basictypes.h" |
19 #include "base/debug/proc_maps_linux.h" | 19 #include "base/debug/proc_maps_linux.h" |
20 #include "base/logging.h" | 20 #include "base/logging.h" |
21 #include "base/strings/stringprintf.h" | 21 #include "base/strings/stringprintf.h" |
22 #include "jni/LinkerTests_jni.h" | 22 #include "jni/LinkerTests_jni.h" |
23 #include "third_party/re2/re2/re2.h" | 23 #include "third_party/re2/src/re2/re2.h" |
24 | 24 |
25 namespace content { | 25 namespace content { |
26 | 26 |
27 namespace { | 27 namespace { |
28 | 28 |
29 using base::debug::MappedMemoryRegion; | 29 using base::debug::MappedMemoryRegion; |
30 | 30 |
31 jboolean RunChecks(bool in_browser_process, bool need_relros) { | 31 jboolean RunChecks(bool in_browser_process, bool need_relros) { |
32 // IMPORTANT NOTE: The Python test control script reads the logcat for | 32 // IMPORTANT NOTE: The Python test control script reads the logcat for |
33 // lines like: | 33 // lines like: |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 | 203 |
204 jboolean CheckForNoSharedRelros(JNIEnv* env, | 204 jboolean CheckForNoSharedRelros(JNIEnv* env, |
205 const JavaParamRef<jclass>& clazz, | 205 const JavaParamRef<jclass>& clazz, |
206 jboolean in_browser_process) { | 206 jboolean in_browser_process) { |
207 return RunChecks(in_browser_process, false); | 207 return RunChecks(in_browser_process, false); |
208 } | 208 } |
209 | 209 |
210 bool RegisterLinkerTestsJni(JNIEnv* env) { return RegisterNativesImpl(env); } | 210 bool RegisterLinkerTestsJni(JNIEnv* env) { return RegisterNativesImpl(env); } |
211 | 211 |
212 } // namespace content | 212 } // namespace content |
OLD | NEW |