OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "chrome/browser/android/java_exception_reporter.h" | 5 #include "chrome/browser/android/java_exception_reporter.h" |
6 | 6 |
7 #include "base/android/build_info.h" | 7 #include "base/android/build_info.h" |
8 #include "base/android/jni_android.h" | 8 #include "base/android/jni_android.h" |
9 #include "base/android/jni_string.h" | 9 #include "base/android/jni_string.h" |
10 #include "base/debug/dump_without_crashing.h" | 10 #include "base/debug/dump_without_crashing.h" |
11 #include "jni/JavaExceptionReporter_jni.h" | 11 #include "jni/JavaExceptionReporter_jni.h" |
12 | 12 |
| 13 using base::android::JavaParamRef; |
| 14 |
13 namespace chrome { | 15 namespace chrome { |
14 namespace android { | 16 namespace android { |
15 | 17 |
16 void InitJavaExceptionReporter() { | 18 void InitJavaExceptionReporter() { |
17 JNIEnv* env = base::android::AttachCurrentThread(); | 19 JNIEnv* env = base::android::AttachCurrentThread(); |
18 Java_JavaExceptionReporter_installHandler(env); | 20 Java_JavaExceptionReporter_installHandler(env); |
19 } | 21 } |
20 | 22 |
21 void ReportJavaException(JNIEnv* env, | 23 void ReportJavaException(JNIEnv* env, |
22 const JavaParamRef<jclass>& jcaller, | 24 const JavaParamRef<jclass>& jcaller, |
(...skipping 16 matching lines...) Expand all Loading... |
39 | 41 |
40 bool RegisterJavaExceptionReporterJni(JNIEnv* env) { | 42 bool RegisterJavaExceptionReporterJni(JNIEnv* env) { |
41 return RegisterNativesImpl(env); | 43 return RegisterNativesImpl(env); |
42 } | 44 } |
43 | 45 |
44 | 46 |
45 } // namespace android | 47 } // namespace android |
46 } // namespace chrome | 48 } // namespace chrome |
47 | 49 |
48 | 50 |
OLD | NEW |