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

Unified Diff: base/android/java/src/org/chromium/base/CommandLine.java

Issue 1263433002: [Android] Move @CommandLineFlag setup to BaseInstrumentationTestRunner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 5 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: base/android/java/src/org/chromium/base/CommandLine.java
diff --git a/base/android/java/src/org/chromium/base/CommandLine.java b/base/android/java/src/org/chromium/base/CommandLine.java
index 409329cfabf8ec6b05adec145155e75f3e973ad8..9f5407921a9fd492f760d9e9ab2875cc99dcb5a8 100644
--- a/base/android/java/src/org/chromium/base/CommandLine.java
+++ b/base/android/java/src/org/chromium/base/CommandLine.java
@@ -16,7 +16,6 @@ import java.io.Reader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
-import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
/**
@@ -26,15 +25,6 @@ import java.util.concurrent.atomic.AtomicReference;
* ContentShellApplication.COMMAND_LINE_FILE or ChromeShellApplication.COMMAND_LINE_FILE.
**/
public abstract class CommandLine {
- /**
- * Allows classes who cache command line flags to be notified when those arguments are updated
- * at runtime. This happens in tests.
- */
- public interface ResetListener {
- /** Called when the command line arguments are reset. */
- void onCommandLineReset();
- }
-
// Public abstract interface, implemented in derived classes.
// All these methods reflect their native-side counterparts.
/**
@@ -97,7 +87,6 @@ public abstract class CommandLine {
return false;
}
- private static final List<ResetListener> sResetListeners = new ArrayList<>();
private static final AtomicReference<CommandLine> sCommandLine =
new AtomicReference<CommandLine>();
@@ -143,20 +132,6 @@ public abstract class CommandLine {
@VisibleForTesting
public static void reset() {
setInstance(null);
- ThreadUtils.postOnUiThread(new Runnable() {
- @Override
- public void run() {
- for (ResetListener listener : sResetListeners) listener.onCommandLineReset();
- }
- });
- }
-
- public static void addResetListener(ResetListener listener) {
- sResetListeners.add(listener);
- }
-
- public static void removeResetListener(ResetListener listener) {
- sResetListeners.remove(listener);
}
/**

Powered by Google App Engine
This is Rietveld 408576698