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

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java

Issue 1879013002: 🍈 Unify application context usage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix content tests. :( Created 4 years, 8 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: android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java b/android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java
index fd8040bed9b4774c2c52f9b4c94e5a281b3b9efb..b42f4d972804f168a69fc6c0e593cd22bdab7d09 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java
@@ -9,6 +9,7 @@ import android.os.StrictMode;
import org.chromium.android_webview.policy.AwPolicyProvider;
import org.chromium.base.CommandLine;
+import org.chromium.base.ContextUtils;
import org.chromium.base.Log;
import org.chromium.base.PathUtils;
import org.chromium.base.ThreadUtils;
@@ -40,14 +41,12 @@ public abstract class AwBrowserProcess {
* Note: it is up to the caller to ensure this is only called once.
*/
public static void loadLibrary(Context context) {
+ ContextUtils.initApplicationContext(context.getApplicationContext());
PathUtils.setPrivateDataDirectorySuffix(PRIVATE_DATA_DIRECTORY_SUFFIX, context);
try {
LibraryLoader libraryLoader = LibraryLoader.get(LibraryProcessType.PROCESS_WEBVIEW);
libraryLoader.loadNow(context);
- // Switch the command line implementation from Java to native.
- // It's okay for the WebView to do this before initialization because we have
- // setup the JNI bindings by this point.
- libraryLoader.switchCommandLineForWebView();
+ libraryLoader.initialize();
Torne 2016/04/15 14:22:43 It doesn't seem like this is safe to do here. The
Peter Wen 2016/04/18 18:49:58 Reverted. Thanks, consolidated the two paths so i
} catch (ProcessInitException e) {
throw new RuntimeException("Cannot load WebView", e);
}

Powered by Google App Engine
This is Rietveld 408576698