Commit d983c6ef authored by Nate Fischer's avatar Nate Fischer Committed by Commit Bot

Android: expose CommandLine java methods

No change to logic. This exposes CommandLine.hasSwitch() and
CommandLine.appendSwitch(). These are used all over the code base, and
I can't think of a good reason to mark them @VisibleForTesting.

I know Android WebView definitely needs to use these APIs, since we have
some Java-only processes which need to check and manipulate the
commandline state, as well as some browser-process code which needs to
check the CommandLine early in startup (before native initialization).

Bug: 1107950
Test: autoninja -C out/Default system_webview_apk
Change-Id: Id0293c7e59c3c437cfd4870732de86e342b182d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2310833
Commit-Queue: Nate Fischer <ntfschr@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Auto-Submit: Nate Fischer <ntfschr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#790574}
parent 3ec74cb3
...@@ -36,7 +36,6 @@ public abstract class CommandLine { ...@@ -36,7 +36,6 @@ public abstract class CommandLine {
* Returns true if this command line contains the given switch. * Returns true if this command line contains the given switch.
* (Switch names ARE case-sensitive). * (Switch names ARE case-sensitive).
*/ */
@VisibleForTesting
public abstract boolean hasSwitch(String switchString); public abstract boolean hasSwitch(String switchString);
/** /**
...@@ -68,7 +67,6 @@ public abstract class CommandLine { ...@@ -68,7 +67,6 @@ public abstract class CommandLine {
* this action happens before the switch is needed. * this action happens before the switch is needed.
* @param switchString the switch to add. It should NOT start with '--' ! * @param switchString the switch to add. It should NOT start with '--' !
*/ */
@VisibleForTesting
public abstract void appendSwitch(String switchString); public abstract void appendSwitch(String switchString);
/** /**
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment