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

Unified Diff: mojo/services/network/android_hooks.cc

Issue 858093002: Update the network service from the Mojo repo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « mojo/services/network/DEPS ('k') | mojo/services/network/network_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/network/android_hooks.cc
diff --git a/components/devtools_bridge/test/android/javatests/jni/jni_onload.cc b/mojo/services/network/android_hooks.cc
similarity index 56%
copy from components/devtools_bridge/test/android/javatests/jni/jni_onload.cc
copy to mojo/services/network/android_hooks.cc
index f156aed51c6cb87879d5286eeab80068e5d1965b..190eef178580a843dbef16090d39109bdb7c5dcb 100644
--- a/components/devtools_bridge/test/android/javatests/jni/jni_onload.cc
+++ b/mojo/services/network/android_hooks.cc
@@ -4,19 +4,23 @@
#include "base/android/base_jni_registrar.h"
#include "base/android/jni_android.h"
-#include "base/android/library_loader/library_loader_hooks.h"
-#include "components/devtools_bridge/android/component_loader.h"
-
-using namespace devtools_bridge::android;
+#include "net/android/net_jni_registrar.h"
JNI_EXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
base::android::InitVM(vm);
JNIEnv* env = base::android::AttachCurrentThread();
- if (!base::android::RegisterLibraryLoaderEntryHook(env)) {
+
+ if (!base::android::RegisterJni(env))
return -1;
- }
- if (!ComponentLoader::OnLoad(env)) {
+
+ if (!net::android::RegisterJni(env))
return -1;
- }
+
return JNI_VERSION_1_4;
}
+
+extern "C" JNI_EXPORT void InitApplicationContext(
+ const base::android::JavaRef<jobject>& context) {
+ JNIEnv* env = base::android::AttachCurrentThread();
+ base::android::InitApplicationContext(env, context);
+}
« no previous file with comments | « mojo/services/network/DEPS ('k') | mojo/services/network/network_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698