Make init command line happen early

This should happen early so that the command line is ready
by the time Chromium is switching the command line
over at the end of loadLibrary. This also fixes the problem
with the CookieManager setup path where it would not get
the command line.

Bug: 12370587
diff --git a/chromium/java/com/android/webview/chromium/WebViewChromiumFactoryProvider.java b/chromium/java/com/android/webview/chromium/WebViewChromiumFactoryProvider.java
index ed3e7fc..c42b1fb 100644
--- a/chromium/java/com/android/webview/chromium/WebViewChromiumFactoryProvider.java
+++ b/chromium/java/com/android/webview/chromium/WebViewChromiumFactoryProvider.java
@@ -83,6 +83,25 @@
     private boolean mStarted;
 
     public WebViewChromiumFactoryProvider() {
+        if (Build.IS_DEBUGGABLE) {
+            CommandLine.initFromFile(COMMAND_LINE_FILE);
+        } else {
+            CommandLine.init(null);
+        }
+
+        CommandLine cl = CommandLine.getInstance();
+
+        // Hardware acceleration in chromium m37+ no longer works with android Kitkat, so force
+        // disable hardware acceleration. This is for AOSP only until L is open sourced.
+        cl.appendSwitch("force-auxiliary-bitmap");
+
+        // TODO: currently in a relase build the DCHECKs only log. We either need to insall
+        // a report handler with SetLogReportHandler to make them assert, or else compile
+        // them out of the build altogether (b/8284203). Either way, so long they're
+        // compiled in, we may as unconditionally enable them here.
+        cl.appendSwitch("enable-dcheck");
+
+
         // Load chromium library.
         AwBrowserProcess.loadLibrary();
         // Load glue-layer support library.
@@ -145,29 +164,6 @@
             return;
         }
 
-        if (Build.IS_DEBUGGABLE) {
-            CommandLine.initFromFile(COMMAND_LINE_FILE);
-        } else {
-            CommandLine.init(null);
-        }
-
-        CommandLine cl = CommandLine.getInstance();
-
-        // Hardware acceleration in chromium m37+ no longer works with android Kitkat, so force
-        // disable hardware acceleration. This is for AOSP only until L is open sourced.
-        cl.appendSwitch("force-auxiliary-bitmap");
-
-        // TODO: currently in a relase build the DCHECKs only log. We either need to insall
-        // a report handler with SetLogReportHandler to make them assert, or else compile
-        // them out of the build altogether (b/8284203). Either way, so long they're
-        // compiled in, we may as unconditionally enable them here.
-        cl.appendSwitch("enable-dcheck");
-
-        // TODO: Remove when GL is supported by default in the upstream code.
-        if (!cl.hasSwitch("disable-webview-gl-mode")) {
-            cl.appendSwitch("testing-webview-gl-mode");
-        }
-
         // We don't need to extract any paks because for WebView, they are
         // in the system image.
         ResourceExtractor.setMandatoryPaksToExtract("");