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
3 // found in the LICENSE file.
5 #include "net/test/android/net_test_jni_onload.h"
7 #include "base/android/base_jni_onload.h"
9 #include "net/test/embedded_test_server/android/embedded_test_server_android.h"
16 bool RegisterJNI(JNIEnv
* env
) {
17 return net::test_server::EmbeddedTestServerAndroid::
18 RegisterEmbeddedTestServerAndroid(env
);
27 bool OnJNIOnLoadRegisterJNI(JavaVM
* vm
) {
28 std::vector
<base::android::RegisterCallback
> register_callbacks
;
29 register_callbacks
.push_back(base::Bind(&RegisterJNI
));
30 return base::android::OnJNIOnLoadRegisterJNI(vm
, register_callbacks
);
33 bool OnJNIOnLoadInit() {
34 std::vector
<base::android::InitCallback
> init_callbacks
;
35 init_callbacks
.push_back(base::Bind(&Init
));
36 return base::android::OnJNIOnLoadInit(init_callbacks
);