private void startModerateBindingManagementIfNeeded() {
    // Moderate binding doesn't apply to low end devices.
    if (SysUtils.isLowEndDevice()) return;

    boolean moderateBindingTillBackgrounded =
        FieldTrialList.findFullName("ModerateBindingOnBackgroundTabCreation").equals("Enabled");
    ChildProcessLauncher.startModerateBindingManagement(
        mAppContext, moderateBindingTillBackgrounded);
  }
Esempio n. 2
0
  /**
   * Once native is loaded we can consult the command-line (set via about:flags) and also finch
   * state to see if we should enable WebAPKs.
   */
  public static void cacheEnabledStateForNextLaunch() {
    boolean wasEnabled = isEnabledInPrefs();
    CommandLine instance = CommandLine.getInstance();
    String experiment = FieldTrialList.findFullName(WEBAPK_DISABLE_EXPERIMENT_NAME);
    boolean isEnabled =
        (!WEBAPK_RUNTIME_DISABLED.equals(experiment)
            && instance.hasSwitch(ChromeSwitches.ENABLE_WEBAPK));

    if (isEnabled != wasEnabled) {
      Log.d(TAG, "WebApk setting changed (%s => %s)", wasEnabled, isEnabled);
      ChromePreferenceManager.getInstance(ContextUtils.getApplicationContext())
          .setCachedWebApkRuntimeEnabled(isEnabled);
    }
  }
 protected boolean shouldShowDataReductionPage() {
   return !DataReductionProxySettings.getInstance().isDataReductionProxyManaged()
       && FieldTrialList.findFullName("DataReductionProxyFREPromo").startsWith("Enabled");
 }