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

Unified Diff: android_webview/lib/main/webview_entry_point.cc

Issue 141223002: Move the android library loader from content to base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix final nits Created 6 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
Index: android_webview/lib/main/webview_entry_point.cc
diff --git a/android_webview/lib/main/webview_entry_point.cc b/android_webview/lib/main/webview_entry_point.cc
index 7038416fc9b12b2c4b0cffff7ace9c5c7c261aed..1eefd526138bacff89ca60951a90f5dd1e9b0deb 100644
--- a/android_webview/lib/main/webview_entry_point.cc
+++ b/android_webview/lib/main/webview_entry_point.cc
@@ -6,6 +6,7 @@
#include "android_webview/native/android_webview_jni_registrar.h"
#include "base/android/jni_android.h"
#include "base/android/jni_registrar.h"
+#include "base/android/library_loader/library_loader_hooks.h"
#include "components/navigation_interception/component_jni_registrar.h"
#include "components/web_contents_delegate_android/component_jni_registrar.h"
#include "content/public/app/android_library_loader_hooks.h"
@@ -23,9 +24,12 @@ static base::android::RegistrationMethod
// This is called by the VM when the shared library is first loaded.
// Most of the initialization is done in LibraryLoadedOnMainThread(), not here.
JNI_EXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
+
+ base::android::SetLibraryLoadedHook(&content::LibraryLoaded);
+
base::android::InitVM(vm);
JNIEnv* env = base::android::AttachCurrentThread();
- if (!content::RegisterLibraryLoaderEntryHook(env))
+ if (!base::android::RegisterLibraryLoaderEntryHook(env))
return -1;
// Register content JNI functions now, rather than waiting until

Powered by Google App Engine
This is Rietveld 408576698