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

Unified Diff: content/public/android/java/src/org/chromium/content/app/LibraryLoader.java

Issue 10696025: Upstream ChildProcessLauncher changes for Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add additional assert and comments Created 8 years, 6 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: content/public/android/java/src/org/chromium/content/app/LibraryLoader.java
diff --git a/content/public/android/java/src/org/chromium/content/app/LibraryLoader.java b/content/public/android/java/src/org/chromium/content/app/LibraryLoader.java
index 963cdd28fbcbdcc1e4aee2b4ff2628557c2738f2..33a493714e6877c252243e6b81aea7d115a86b4c 100644
--- a/content/public/android/java/src/org/chromium/content/app/LibraryLoader.java
+++ b/content/public/android/java/src/org/chromium/content/app/LibraryLoader.java
@@ -21,9 +21,7 @@ import org.chromium.content.common.TraceEvent;
public class LibraryLoader {
private static final String TAG = "LibraryLoader";
- /* TODO(jrg): resolve up and downstream discrepancy; there is no
- * upstream libchromeview.so */
- private static String sLibrary = "chromeview";
+ private static String sLibrary = null;
private static boolean sLoaded = false;
@@ -62,6 +60,13 @@ public class LibraryLoader {
}
/**
+ * @return The name of the native library set to be loaded.
+ */
+ public static String getLibraryToLoad() {
+ return sLibrary;
+ }
+
+ /**
* This method blocks until the library is fully loaded and initialized;
* must be called on the thread that the native will call its "main" thread.
*/
@@ -168,6 +173,10 @@ public class LibraryLoader {
* @return Whether the native library was successfully loaded.
*/
static boolean loadNow() {
+ if (sLibrary == null) {
+ assert false : "No library specified to load. Call setLibraryToLoad before first.";
+ return false;
+ }
assert !sInitialized;
try {
Log.i(TAG, "loading: " + sLibrary);

Powered by Google App Engine
This is Rietveld 408576698