Commit 1d156793 authored by henry's avatar henry Committed by Pier Angelo Vendrame
Browse files

BB 44520: Disable Experiment API (Firefox Labs).

parent cecd2ff3
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -445,10 +445,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");
  }