Commit 6278b1f1 authored by henry's avatar henry Committed by Pier Angelo Vendrame
Browse files

BB 44520: Disable Experiment API (Firefox Labs).

parent c5fd81ec
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -478,10 +478,19 @@ export const ExperimentAPI = new (class {
  }

  get enabled() {
    if (AppConstants.BASE_BROWSER_VERSION) {
      // Do not allow ExperimentsAPI (which covers either "labs", "studies" or
      // "rollouts") in Base Browser.
      return false;
    }
    return this.labsEnabled || this.rolloutsEnabled || this.studiesEnabled;
  }

  get labsEnabled() {
    if (AppConstants.BASE_BROWSER_VERSION) {
      // Do not allow "Firefox Labs" in Base Browser.
      return false;
    }
    return Services.policies.isAllowed("FirefoxLabs");
  }