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

Unified Diff: base/android/library_loader/library_loader_hooks.cc

Issue 1001343002: Prefetch the native library from native code by parsing /proc/pid/maps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Missing BASE_EXPORT. Created 5 years, 8 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: base/android/library_loader/library_loader_hooks.cc
diff --git a/base/android/library_loader/library_loader_hooks.cc b/base/android/library_loader/library_loader_hooks.cc
index 555420a5aa5e65bab2dac58afee9d6a01aa39ceb..0b59a30429676b131f428de41b5b8e6c3889b483 100644
--- a/base/android/library_loader/library_loader_hooks.cc
+++ b/base/android/library_loader/library_loader_hooks.cc
@@ -7,6 +7,7 @@
#include "base/android/command_line_android.h"
#include "base/android/jni_string.h"
#include "base/android/library_loader/library_load_from_apk_status_codes.h"
+#include "base/android/library_loader/library_prefetcher.h"
#include "base/at_exit.h"
#include "base/metrics/histogram.h"
#include "jni/LibraryLoader_jni.h"
@@ -122,6 +123,10 @@ void LibraryLoaderExitHook() {
}
}
+static jboolean ForkAndPrefetchNativeLibrary(JNIEnv* env, jclass clazz) {
+ return NativeLibraryPrefetcher::ForkAndPrefetchNativeLibrary();
+}
+
bool RegisterLibraryLoaderEntryHook(JNIEnv* env) {
return RegisterNativesImpl(env);
}

Powered by Google App Engine
This is Rietveld 408576698