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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.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: chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java b/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java
index 5374422015ed78145365a419501a48f6c15df527..112ab3cd6ff88984bb598ec5d2fec0fa99ea0597 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java
@@ -34,8 +34,6 @@ public class FeatureUtilities {
private static Boolean sHasRecognitionIntentHandler;
private static Boolean sDocumentModeDisabled;
private static Boolean sCustomTabVisible;
- /** Used to track if cached command line flags should be refreshed. */
- private static CommandLine.ResetListener sResetListener = null;
/**
* Determines whether or not the {@link RecognizerIntent#ACTION_WEB_SEARCH} {@link Intent}
@@ -100,7 +98,6 @@ public class FeatureUtilities {
*/
public static boolean isDocumentMode(Context context) {
if (sDocumentModeDisabled == null && CommandLine.isInitialized()) {
- initResetListener();
sDocumentModeDisabled = CommandLine.getInstance().hasSwitch(
ChromeSwitches.DISABLE_DOCUMENT_MODE);
}
@@ -147,18 +144,6 @@ public class FeatureUtilities {
return sCustomTabVisible;
}
- private static void initResetListener() {
- if (sResetListener != null) return;
-
- sResetListener = new CommandLine.ResetListener() {
- @Override
- public void onCommandLineReset() {
- sDocumentModeDisabled = null;
- }
- };
- CommandLine.addResetListener(sResetListener);
- }
-
private static native void nativeSetDocumentModeEnabled(boolean enabled);
private static native void nativeSetCustomTabVisible(boolean visible);
private static native boolean nativeGetCustomTabVisible();

Powered by Google App Engine
This is Rietveld 408576698