| Index: base/android/linker/linker_jni.cc
|
| diff --git a/base/android/linker/linker_jni.cc b/base/android/linker/linker_jni.cc
|
| index a545c528ed336e44953138c9a51f8ad5647a1bf4..a42010100eda699d660ef58f31cea602b9a52a9c 100644
|
| --- a/base/android/linker/linker_jni.cc
|
| +++ b/base/android/linker/linker_jni.cc
|
| @@ -350,6 +350,18 @@ jboolean LoadLibrary(JNIEnv* env,
|
| static_cast<size_t>(load_address), lib_info_obj, opener);
|
| }
|
|
|
| +const size_t kMaxFilenameInZip = 256;
|
| +jstring LibraryFilenameInZipFile(JNIEnv* env, jclass clazz, jstring lib_name) {
|
| + String lib_name_str(env, lib_name);
|
| + char buffer[kMaxFilenameInZip + 1];
|
| + if (CRAZY_STATUS_SUCCESS != crazy_library_filename_in_zip_file(
|
| + lib_name_str.c_str(), buffer, sizeof(buffer))) {
|
| + LOG_ERROR("Failure to get library filename from zipfile");
|
| + buffer[0] = '\0';
|
| + }
|
| + return env->NewStringUTF(buffer);
|
| +}
|
| +
|
| // Load a library from a zipfile with the chromium linker. The
|
| // library in the zipfile must be uncompressed and page aligned.
|
| // The basename of the library is given. The library is expected
|
| @@ -622,6 +634,12 @@ const JNINativeMethod kNativeMethods[] = {
|
| ")"
|
| "Z",
|
| reinterpret_cast<void*>(&LoadLibrary)},
|
| + {"nativeLibraryFilenameInZipFile",
|
| + "("
|
| + "Ljava/lang/String;"
|
| + ")"
|
| + "Ljava/lang/String;",
|
| + reinterpret_cast<void*>(&LibraryFilenameInZipFile)},
|
| {"nativeLoadLibraryInZipFile",
|
| "("
|
| "Ljava/lang/String;"
|
|
|