Commit 9f50bb71 authored by henry's avatar henry Committed by henry
Browse files

BB 44520: Disable Experiment API (Firefox Labs).




(cherry picked from commit 7d6331a534130b279c08d10d048f5c6c647a23d1)

Co-authored-by: default avatarHenry Wilkes <henry@torproject.org>
parent 1d13a4e1
Loading
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -396,10 +396,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.studiesEnabled || this.labsEnabled;
  }

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