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

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

Issue 1314823003: Make Linker.isUsed() static, and clean up the fallout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tiny log tweak, protected->private, rebase to master. Created 5 years, 4 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 2fab33fcd64e2e31d9463d679f5c23896a29e787..82c0b40551b82959174520c8956f71d245dae805 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
@@ -219,13 +219,10 @@ public class LibraryLoader {
assert !mInitialized;
long startTime = SystemClock.uptimeMillis();
- Linker linker = Linker.getInstance();
- boolean useChromiumLinker = linker.isUsed();
- if (useChromiumLinker) {
- // Determine the APK file path.
- String apkFilePath = getLibraryApkPath(context);
+ if (Linker.isUsed()) {
// Load libraries using the Chromium linker.
+ Linker linker = Linker.getInstance();
linker.prepareLibraryLoad();
for (String library : NativeLibraries.LIBRARIES) {
@@ -242,8 +239,8 @@ public class LibraryLoader {
String libFilePath = System.mapLibraryName(library);
if (linker.isInZipFile()) {
// Load directly from the APK.
- zipFilePath = apkFilePath;
- Log.i(TAG, "Loading " + library + " from within " + apkFilePath);
+ zipFilePath = getLibraryApkPath(context);
+ Log.i(TAG, "Loading " + library + " from within " + zipFilePath);
} else {
// The library is in its own file.
Log.i(TAG, "Loading " + library);

Powered by Google App Engine
This is Rietveld 408576698