Index: content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java |
diff --git a/content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java b/content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java |
index 0bdca83e1868f3b299c2b0134784413c4e284256..997b9ebc9b7ac018d49e0d5f409b1c4861c284c4 100644 |
--- a/content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java |
+++ b/content/public/android/java/src/org/chromium/content/browser/BrowserStartupController.java |
@@ -8,6 +8,7 @@ import android.content.Context; |
import android.os.Handler; |
import android.os.StrictMode; |
+import org.chromium.base.ContextUtils; |
import org.chromium.base.Log; |
import org.chromium.base.ResourceExtractor; |
import org.chromium.base.ThreadUtils; |
@@ -118,7 +119,7 @@ public class BrowserStartupController { |
BrowserStartupController(Context context, int libraryProcessType) { |
mContext = context.getApplicationContext(); |
- mAsyncStartupCallbacks = new ArrayList<StartupCallback>(); |
+ mAsyncStartupCallbacks = new ArrayList<>(); |
mLibraryProcessType = libraryProcessType; |
} |
@@ -287,6 +288,8 @@ public class BrowserStartupController { |
throws ProcessInitException { |
Log.i(TAG, "Initializing chromium process, singleProcess=%b", singleProcess); |
+ ContextUtils.initApplicationContext(mContext.getApplicationContext()); |
Ted C
2016/09/21 18:36:51
Why is this needed? With this here, isn't chrome
Torne
2016/09/26 09:21:35
We want to get rid of BaseChromiumApplication enti
Peter Wen
2016/09/28 15:55:16
Right, this should not be necessary here.
|
+ |
// Normally Main.java will have kicked this off asynchronously for Chrome. But other |
// ContentView apps like tests also need them so we make sure we've extracted resources |
// here. We can still make it a little async (wait until the library is loaded). |
@@ -302,7 +305,7 @@ public class BrowserStartupController { |
try { |
// Normally Main.java will have already loaded the library asynchronously, we only need |
// to load it here if we arrived via another flow, e.g. bookmark access & sync setup. |
- LibraryLoader.get(mLibraryProcessType).ensureInitialized(mContext); |
+ LibraryLoader.get(mLibraryProcessType).ensureInitialized(); |
} finally { |
StrictMode.setThreadPolicy(oldPolicy); |
} |