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

Unified Diff: chromecast/shell/android/apk/src/org/chromium/chromecast/shell/CastBrowserHelper.java

Issue 625823002: Chromecast Android buildfix: rework CommandLine initialization logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « chromecast/shell/android/apk/src/org/chromium/chromecast/shell/CastApplication.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/shell/android/apk/src/org/chromium/chromecast/shell/CastBrowserHelper.java
diff --git a/chromecast/shell/android/apk/src/org/chromium/chromecast/shell/CastBrowserHelper.java b/chromecast/shell/android/apk/src/org/chromium/chromecast/shell/CastBrowserHelper.java
index d3ea8eaebfa07d2f38d749b24b5a6dd7a14aec74..f9e593291a0d7f0bf2de26fed0695e68b6cc1aea 100644
--- a/chromecast/shell/android/apk/src/org/chromium/chromecast/shell/CastBrowserHelper.java
+++ b/chromecast/shell/android/apk/src/org/chromium/chromecast/shell/CastBrowserHelper.java
@@ -7,7 +7,6 @@ package org.chromium.chromecast.shell;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
-import android.os.Build;
import android.os.Debug;
import android.util.Log;
@@ -15,6 +14,7 @@ import org.chromium.base.BaseSwitches;
import org.chromium.base.CommandLine;
import org.chromium.base.library_loader.LibraryLoader;
import org.chromium.base.library_loader.ProcessInitException;
+import org.chromium.content.app.ContentApplication;
import org.chromium.content.browser.BrowserStartupController;
import org.chromium.content.browser.DeviceUtils;
import org.chromium.content.common.ContentSwitches;
@@ -25,7 +25,6 @@ import org.chromium.content.common.ContentSwitches;
public class CastBrowserHelper {
private static final String TAG = "CastBrowserHelper";
- public static final String COMMAND_LINE_FILE = "/data/local/tmp/castshell-command-line";
public static final String COMMAND_LINE_ARGS_KEY = "commandLineArgs";
private static boolean sIsBrowserInitialized = false;
@@ -44,12 +43,7 @@ public class CastBrowserHelper {
// Initializing the command line must occur before loading the library.
if (!CommandLine.isInitialized()) {
- if (allowCommandLineImport()) {
- Log.d(TAG, "Initializing command line from " + COMMAND_LINE_FILE);
- CommandLine.initFromFile(COMMAND_LINE_FILE);
- } else {
- CommandLine.init(null);
- }
+ ContentApplication.initCommandLine(context);
if (context instanceof Activity) {
Intent launchingIntent = ((Activity) context).getIntent();
@@ -81,10 +75,6 @@ public class CastBrowserHelper {
}
}
- private static boolean allowCommandLineImport() {
- return !Build.TYPE.equals("user");
- }
-
private static String[] getCommandLineParamsFromIntent(Intent intent) {
return intent != null ? intent.getStringArrayExtra(COMMAND_LINE_ARGS_KEY) : null;
}
« no previous file with comments | « chromecast/shell/android/apk/src/org/chromium/chromecast/shell/CastApplication.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698