Commit 910cc22a authored by Henrique Nakashima's avatar Henrique Nakashima Committed by Commit Bot

Inline instances of CachedFeatureFlags#isEnabled().

Bug: 1012975
Change-Id: I9dc088b3a6b6bfcc50675668c52ae7157124c1de
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2079336Reviewed-by: default avatarMichael Thiessen <mthiesse@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Cr-Commit-Position: refs/heads/master@{#745235}
parent 2de68dab
...@@ -42,6 +42,7 @@ import org.chromium.chrome.browser.dependency_injection.ChromeAppModule; ...@@ -42,6 +42,7 @@ import org.chromium.chrome.browser.dependency_injection.ChromeAppModule;
import org.chromium.chrome.browser.dependency_injection.DaggerChromeAppComponent; import org.chromium.chrome.browser.dependency_injection.DaggerChromeAppComponent;
import org.chromium.chrome.browser.dependency_injection.ModuleFactoryOverrides; import org.chromium.chrome.browser.dependency_injection.ModuleFactoryOverrides;
import org.chromium.chrome.browser.flags.CachedFeatureFlags; import org.chromium.chrome.browser.flags.CachedFeatureFlags;
import org.chromium.chrome.browser.flags.ChromeFeatureList;
import org.chromium.chrome.browser.metrics.UmaUtils; import org.chromium.chrome.browser.metrics.UmaUtils;
import org.chromium.chrome.browser.night_mode.SystemNightModeMonitor; import org.chromium.chrome.browser.night_mode.SystemNightModeMonitor;
import org.chromium.chrome.browser.vr.OnExitVrRequestListener; import org.chromium.chrome.browser.vr.OnExitVrRequestListener;
...@@ -177,7 +178,7 @@ public class ChromeApplication extends Application { ...@@ -177,7 +178,7 @@ public class ChromeApplication extends Application {
} }
private static Boolean shouldUseDebugFlags() { private static Boolean shouldUseDebugFlags() {
return CachedFeatureFlags.isCommandLineOnNonRootedEnabled(); return CachedFeatureFlags.isEnabled(ChromeFeatureList.COMMAND_LINE_ON_NON_ROOTED);
} }
protected static boolean isBrowserProcess() { protected static boolean isBrowserProcess() {
......
...@@ -35,6 +35,7 @@ import org.chromium.chrome.browser.compositor.layouts.OverviewModeBehavior; ...@@ -35,6 +35,7 @@ import org.chromium.chrome.browser.compositor.layouts.OverviewModeBehavior;
import org.chromium.chrome.browser.device.DeviceClassManager; import org.chromium.chrome.browser.device.DeviceClassManager;
import org.chromium.chrome.browser.download.DownloadUtils; import org.chromium.chrome.browser.download.DownloadUtils;
import org.chromium.chrome.browser.flags.CachedFeatureFlags; import org.chromium.chrome.browser.flags.CachedFeatureFlags;
import org.chromium.chrome.browser.flags.ChromeFeatureList;
import org.chromium.chrome.browser.incognito.IncognitoUtils; import org.chromium.chrome.browser.incognito.IncognitoUtils;
import org.chromium.chrome.browser.multiwindow.MultiWindowModeStateDispatcher; import org.chromium.chrome.browser.multiwindow.MultiWindowModeStateDispatcher;
import org.chromium.chrome.browser.omaha.UpdateMenuItemHelper; import org.chromium.chrome.browser.omaha.UpdateMenuItemHelper;
...@@ -264,7 +265,7 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate ...@@ -264,7 +265,7 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate
isChromeScheme || ((TabImpl) currentTab).isShowingInterstitialPage(); isChromeScheme || ((TabImpl) currentTab).isShowingInterstitialPage();
menu.findItem(R.id.paint_preview_capture_id) menu.findItem(R.id.paint_preview_capture_id)
.setVisible(CachedFeatureFlags.isPaintPreviewTestEnabled() .setVisible(CachedFeatureFlags.isEnabled(ChromeFeatureList.PAINT_PREVIEW_TEST)
&& !isChromeOrInterstitialPage && !isIncognito); && !isChromeOrInterstitialPage && !isIncognito);
// Disable find in page on the native NTP. // Disable find in page on the native NTP.
......
...@@ -243,10 +243,6 @@ public class CachedFeatureFlags { ...@@ -243,10 +243,6 @@ public class CachedFeatureFlags {
parameter.getSharedPreferenceKey(), parameter.getDefaultValue()); parameter.getSharedPreferenceKey(), parameter.getDefaultValue());
} }
public static boolean isCommandLineOnNonRootedEnabled() {
return isEnabled(ChromeFeatureList.COMMAND_LINE_ON_NON_ROOTED);
}
private static void cacheStartSurfaceVariation() { private static void cacheStartSurfaceVariation() {
String feature = ChromeFeatureList.getFieldTrialParamByFeature( String feature = ChromeFeatureList.getFieldTrialParamByFeature(
ChromeFeatureList.START_SURFACE_ANDROID, "start_surface_variation"); ChromeFeatureList.START_SURFACE_ANDROID, "start_surface_variation");
...@@ -262,13 +258,6 @@ public class CachedFeatureFlags { ...@@ -262,13 +258,6 @@ public class CachedFeatureFlags {
return isEnabled(ChromeFeatureList.START_SURFACE_ANDROID) && !SysUtils.isLowEndDevice(); return isEnabled(ChromeFeatureList.START_SURFACE_ANDROID) && !SysUtils.isLowEndDevice();
} }
/**
* @return Whether the Paint Preview capture test is enabled.
*/
public static boolean isPaintPreviewTestEnabled() {
return isEnabled(ChromeFeatureList.PAINT_PREVIEW_TEST);
}
/** /**
* @return Whether the Start Surface SinglePane is enabled. * @return Whether the Start Surface SinglePane is enabled.
*/ */
...@@ -296,14 +285,6 @@ public class CachedFeatureFlags { ...@@ -296,14 +285,6 @@ public class CachedFeatureFlags {
&& android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O; && android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O;
} }
/**
* @return Whether or not bootstrap tasks should be prioritized (i.e. bootstrap task
* prioritization experiment is enabled).
*/
public static boolean shouldPrioritizeBootstrapTasks() {
return isEnabled(ChromeFeatureList.PRIORITIZE_BOOTSTRAP_TASKS);
}
/** /**
* Cache whether warming up network service process is enabled, so that the value * Cache whether warming up network service process is enabled, so that the value
* can be made available immediately on next start up. * can be made available immediately on next start up.
......
...@@ -158,7 +158,7 @@ public class ProcessInitializationHandler { ...@@ -158,7 +158,7 @@ public class ProcessInitializationHandler {
protected void handlePreNativeInitialization() { protected void handlePreNativeInitialization() {
BrowserTaskExecutor.register(); BrowserTaskExecutor.register();
BrowserTaskExecutor.setShouldPrioritizeBootstrapTasks( BrowserTaskExecutor.setShouldPrioritizeBootstrapTasks(
CachedFeatureFlags.shouldPrioritizeBootstrapTasks()); CachedFeatureFlags.isEnabled(ChromeFeatureList.PRIORITIZE_BOOTSTRAP_TASKS));
Context application = ContextUtils.getApplicationContext(); Context application = ContextUtils.getApplicationContext();
......
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