| Index: content/app/android/content_jni_onload.cc
|
| diff --git a/content/app/android/content_jni_onload.cc b/content/app/android/content_jni_onload.cc
|
| index ab9596526ebfa1a23f6e4ea15f7d298a5b301889..ef7864ad1e63e6451d2231ca5293b442c7e75e99 100644
|
| --- a/content/app/android/content_jni_onload.cc
|
| +++ b/content/app/android/content_jni_onload.cc
|
| @@ -20,29 +20,34 @@ namespace {
|
| class ContentJNIOnLoadDelegate
|
| : public base::android::JNIOnLoadDelegate {
|
| public:
|
| - bool RegisterJNI(JNIEnv* env) override;
|
| - bool Init() override;
|
| + bool RegisterJNI(JNIEnv* env) override {
|
| + return content::EnsureJniRegistered(env);
|
| + }
|
| + bool Init() override {
|
| + base::android::SetLibraryLoadedHook(&content::LibraryLoaded);
|
| + return true;
|
| + }
|
| };
|
|
|
| -bool ContentJNIOnLoadDelegate::RegisterJNI(JNIEnv* env) {
|
| - return content::EnsureJniRegistered(env);
|
| -}
|
| -
|
| -bool ContentJNIOnLoadDelegate::Init() {
|
| - base::android::SetLibraryLoadedHook(&content::LibraryLoaded);
|
| - return true;
|
| -}
|
| -
|
| } // namespace
|
|
|
|
|
| -bool OnJNIOnLoad(JavaVM* vm,
|
| - base::android::JNIOnLoadDelegate* delegate) {
|
| +bool OnJNIOnLoadRegisterJNI(
|
| + JavaVM* vm,
|
| + base::android::JNIOnLoadDelegate* delegate) {
|
| + std::vector<base::android::JNIOnLoadDelegate*> delegates;
|
| + ContentJNIOnLoadDelegate content_delegate;
|
| + delegates.push_back(delegate);
|
| + delegates.push_back(&content_delegate);
|
| + return base::android::OnJNIOnLoadRegisterJNI(vm, &delegates);
|
| +}
|
| +
|
| +bool OnJNIOnLoadInit(base::android::JNIOnLoadDelegate* delegate) {
|
| std::vector<base::android::JNIOnLoadDelegate*> delegates;
|
| ContentJNIOnLoadDelegate content_delegate;
|
| delegates.push_back(delegate);
|
| delegates.push_back(&content_delegate);
|
| - return base::android::OnJNIOnLoad(vm, &delegates);
|
| + return base::android::OnJNIOnLoadInit(&delegates);
|
| }
|
|
|
| } // namespace android
|
|
|