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

Unified Diff: net/test/android/net_test_jni_onload.cc

Issue 2620303004: Remove JNI onload callback vector construction in favour of direct calls. (Closed)
Patch Set: rebase compile errors Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/test/android/net_test_jni_onload.h ('k') | remoting/client/jni/remoting_jni_onload.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/test/android/net_test_jni_onload.cc
diff --git a/net/test/android/net_test_jni_onload.cc b/net/test/android/net_test_jni_onload.cc
index 6f3db27382194e63b06e362e3f0b0052929e2de4..0f0e5a6c4c6e34304bb96b7440c9b73dbdba8d26 100644
--- a/net/test/android/net_test_jni_onload.cc
+++ b/net/test/android/net_test_jni_onload.cc
@@ -6,6 +6,7 @@
#include "base/android/base_jni_onload.h"
#include "base/android/base_jni_registrar.h"
+#include "base/android/jni_android.h"
#include "base/bind.h"
#include "net/test/embedded_test_server/android/embedded_test_server_android.h"
@@ -19,23 +20,15 @@ bool RegisterJNI(JNIEnv* env) {
RegisterEmbeddedTestServerAndroid(env);
}
-bool Init() {
- return true;
-}
-
} // namesapce
-bool OnJNIOnLoadRegisterJNI(JavaVM* vm) {
- std::vector<base::android::RegisterCallback> register_callbacks;
- register_callbacks.push_back(base::Bind(&RegisterJNI));
- register_callbacks.push_back(base::Bind(&base::android::RegisterJni));
- return base::android::OnJNIOnLoadRegisterJNI(vm, register_callbacks);
+bool OnJNIOnLoadRegisterJNI(JNIEnv* env) {
+ return base::android::OnJNIOnLoadRegisterJNI(env) &&
+ base::android::RegisterJni(env) && RegisterJNI(env);
}
bool OnJNIOnLoadInit() {
- std::vector<base::android::InitCallback> init_callbacks;
- init_callbacks.push_back(base::Bind(&Init));
- return base::android::OnJNIOnLoadInit(init_callbacks);
+ return base::android::OnJNIOnLoadInit();
}
} // namespace test
« no previous file with comments | « net/test/android/net_test_jni_onload.h ('k') | remoting/client/jni/remoting_jni_onload.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698