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

Unified Diff: content/shell/android/linker_test_apk/src/org/chromium/chromium_linker_test_apk/ChromiumLinkerTestActivity.java

Issue 2247143004: Remove app context init from LibraryLoader. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix ChildProcessServiceImpl. Created 4 years, 3 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/shell/android/linker_test_apk/src/org/chromium/chromium_linker_test_apk/ChromiumLinkerTestActivity.java
diff --git a/content/shell/android/linker_test_apk/src/org/chromium/chromium_linker_test_apk/ChromiumLinkerTestActivity.java b/content/shell/android/linker_test_apk/src/org/chromium/chromium_linker_test_apk/ChromiumLinkerTestActivity.java
index 96e1772e506b77b99ad51b58cfac01d954f6dc1b..3bad7fe3c931732d0db105c031dcf812e81005e0 100644
--- a/content/shell/android/linker_test_apk/src/org/chromium/chromium_linker_test_apk/ChromiumLinkerTestActivity.java
+++ b/content/shell/android/linker_test_apk/src/org/chromium/chromium_linker_test_apk/ChromiumLinkerTestActivity.java
@@ -13,6 +13,7 @@ import android.view.View;
import org.chromium.base.BaseSwitches;
import org.chromium.base.CommandLine;
+import org.chromium.base.ContextUtils;
import org.chromium.base.Log;
import org.chromium.base.annotations.SuppressFBWarnings;
import org.chromium.base.library_loader.LibraryLoader;
@@ -66,6 +67,8 @@ public class ChromiumLinkerTestActivity extends Activity {
}
waitForDebuggerIfNeeded();
+ ContextUtils.initApplicationContext(getApplicationContext());
+
// CommandLine.getInstance().hasSwitch() doesn't work here for some funky
// reason, so parse the command-line differently here:
boolean hasLowMemoryDeviceSwitch = false;
@@ -118,8 +121,7 @@ public class ChromiumLinkerTestActivity extends Activity {
// Load the library in the browser process, this will also run the test
// runner in this process.
try {
- LibraryLoader.get(LibraryProcessType.PROCESS_BROWSER)
- .ensureInitialized(getApplicationContext());
+ LibraryLoader.get(LibraryProcessType.PROCESS_BROWSER).ensureInitialized();
} catch (ProcessInitException e) {
Log.i(TAG, "Cannot load chromium_linker_test:" + e);
}

Powered by Google App Engine
This is Rietveld 408576698