Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Side by Side Diff: components/cronet/android/test/cronet_test_jni.cc

Issue 2919553004: Remove base::android::OnJNIOnLoadRegisterJNI() (Closed)
Patch Set: remove unused Callback Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include <jni.h> 5 #include <jni.h>
6 6
7 #include "base/android/base_jni_onload.h" 7 #include "base/android/base_jni_onload.h"
8 #include "base/android/base_jni_registrar.h" 8 #include "base/android/base_jni_registrar.h"
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_registrar.h" 10 #include "base/android/jni_registrar.h"
(...skipping 23 matching lines...) Expand all
34 {"CronetTestUtil", cronet::TestUtil::Register}, 34 {"CronetTestUtil", cronet::TestUtil::Register},
35 }; 35 };
36 36
37 } // namespace 37 } // namespace
38 38
39 // This is called by the VM when the shared library is first loaded. 39 // This is called by the VM when the shared library is first loaded.
40 // Checks the available version of JNI. Also, caches Java reflection artifacts. 40 // Checks the available version of JNI. Also, caches Java reflection artifacts.
41 extern "C" jint JNI_OnLoad(JavaVM* vm, void* reserved) { 41 extern "C" jint JNI_OnLoad(JavaVM* vm, void* reserved) {
42 base::android::InitVM(vm); 42 base::android::InitVM(vm);
43 JNIEnv* env = base::android::AttachCurrentThread(); 43 JNIEnv* env = base::android::AttachCurrentThread();
44 if (!base::android::OnJNIOnLoadRegisterJNI(env) || 44 if (!base::android::OnJNIOnLoadInit()) {
45 !base::android::OnJNIOnLoadInit()) {
46 return -1; 45 return -1;
47 } 46 }
48 47
49 if (!base::android::RegisterNativeMethods( 48 if (!base::android::RegisterNativeMethods(
50 env, 49 env,
51 kCronetTestsRegisteredMethods, 50 kCronetTestsRegisteredMethods,
52 arraysize(kCronetTestsRegisteredMethods))) { 51 arraysize(kCronetTestsRegisteredMethods))) {
53 return -1; 52 return -1;
54 } 53 }
55 return JNI_VERSION_1_6; 54 return JNI_VERSION_1_6;
56 } 55 }
57 56
58 extern "C" void JNI_OnUnLoad(JavaVM* vm, void* reserved) { 57 extern "C" void JNI_OnUnLoad(JavaVM* vm, void* reserved) {
59 base::android::LibraryLoaderExitHook(); 58 base::android::LibraryLoaderExitHook();
60 } 59 }
OLDNEW
« no previous file with comments | « components/cronet/android/cronet_library_loader.cc ('k') | content/app/android/content_jni_onload.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698