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

Unified Diff: base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java

Issue 643803003: Add UMA for testing whether device supports memory mapping APK files with executable permissions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/java/src/org/chromium/base/library_loader/LibraryLoader.java
diff --git a/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java b/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java
index 91e53678707f17b3b96a8b8bacaebe6ab07818de..ea8fcd95d448fec21f4f44f4bcbeb2829934cc3e 100644
--- a/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java
+++ b/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java
@@ -155,6 +155,7 @@ public class LibraryLoader {
if (useChromiumLinker) {
// Load libraries using the Chromium linker.
Linker.prepareLibraryLoad();
+ Linker.testLoadFromApk(context.getApplicationInfo().sourceDir);
picksi1 2014/10/10 10:52:17 "testLoadFromApk" makes this look like a unit-test
rmcilroy 2014/10/10 11:02:31 I would agree that test is perhaps wrong, but woul
petrcermak 2014/10/10 14:20:13 Done. Renamed to "checkApkMemoryMappingSupport".
rmcilroy 2014/10/10 16:26:07 Sorry, I still think this is the wrong name since
for (String library : NativeLibraries.LIBRARIES) {
String zipfile = null;
@@ -295,6 +296,8 @@ public class LibraryLoader {
if (Linker.isUsed()) {
nativeRecordChromiumAndroidLinkerHistogram(Linker.loadAtFixedAddressFailed(),
SysUtils.isLowEndDevice());
+ nativeRecordChromiumAndroidLinkerLoadFromApkSucceededHistogram(
+ Linker.loadFromApkSucceeded());
rmcilroy 2014/10/10 10:27:05 I think we could just put as an argument in native
petrcermak 2014/10/10 14:20:14 Done.
}
picksi1 2014/10/10 10:52:17 On first reading this code I didn't know if loadFr
petrcermak 2014/10/10 14:20:13 Removed method.
nativeRecordNativeLibraryHack(sNativeLibraryHackWasUsed);
@@ -317,6 +320,11 @@ public class LibraryLoader {
boolean loadedAtFixedAddressFailed,
boolean isLowMemoryDevice);
+ // Method called to record statistics about the support of memory mapping APK files with
+ // executable permissions.
+ private static native void nativeRecordChromiumAndroidLinkerLoadFromApkSucceededHistogram(
+ boolean loadFromApkSucceeded);
+
// Get the version of the native library. This is needed so that we can check we
// have the right version before initializing the (rest of the) JNI.
private static native String nativeGetVersionNumber();

Powered by Google App Engine
This is Rietveld 408576698