| 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 "base/android/base_jni_onload.h" | 5 #include "base/android/base_jni_onload.h" |
| 6 | 6 |
| 7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
| 8 #include "base/android/jni_utils.h" | 8 #include "base/android/jni_utils.h" |
| 9 #include "base/android/library_loader/library_loader_hooks.h" | 9 #include "base/android/library_loader/library_loader_hooks.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 | 11 |
| 12 namespace base { | 12 namespace base { |
| 13 namespace android { | 13 namespace android { |
| 14 | 14 |
| 15 bool OnJNIOnLoadRegisterJNI(JNIEnv* env) { | |
| 16 return RegisterLibraryLoaderEntryHook(env); | |
| 17 } | |
| 18 | |
| 19 bool OnJNIOnLoadInit() { | 15 bool OnJNIOnLoadInit() { |
| 20 InitAtExitManager(); | 16 InitAtExitManager(); |
| 21 JNIEnv* env = base::android::AttachCurrentThread(); | 17 JNIEnv* env = base::android::AttachCurrentThread(); |
| 22 base::android::InitReplacementClassLoader(env, | 18 base::android::InitReplacementClassLoader(env, |
| 23 base::android::GetClassLoader(env)); | 19 base::android::GetClassLoader(env)); |
| 24 return true; | 20 return true; |
| 25 } | 21 } |
| 26 | 22 |
| 27 } // namespace android | 23 } // namespace android |
| 28 } // namespace base | 24 } // namespace base |
| OLD | NEW |