mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 1178456 - Experiments service shouldn't use FHR prefs. r=gfritzsche
This commit is contained in:
parent
ef08b9d390
commit
2bd3068c47
@ -21,8 +21,13 @@ const PREF_EXPERIMENTS_ENABLED = "experiments.enabled";
|
||||
const PREF_ACTIVE_EXPERIMENT = "experiments.activeExperiment"; // whether we have an active experiment
|
||||
const PREF_HEALTHREPORT_ENABLED = "datareporting.healthreport.service.enabled";
|
||||
const PREF_TELEMETRY_ENABLED = "toolkit.telemetry.enabled";
|
||||
const PREF_TELEMETRY_UNIFIED = "toolkit.telemetry.unified";
|
||||
const DELAY_INIT_MS = 30 * 1000;
|
||||
|
||||
// Whether the FHR/Telemetry unification features are enabled.
|
||||
// Changing this pref requires a restart.
|
||||
const IS_UNIFIED_TELEMETRY = Preferences.get(PREF_TELEMETRY_UNIFIED, false);
|
||||
|
||||
XPCOMUtils.defineLazyGetter(
|
||||
this, "gPrefs", () => {
|
||||
return new Preferences();
|
||||
@ -30,9 +35,11 @@ XPCOMUtils.defineLazyGetter(
|
||||
|
||||
XPCOMUtils.defineLazyGetter(
|
||||
this, "gExperimentsEnabled", () => {
|
||||
// We can enable experiments if either unified Telemetry or FHR is on, and the user
|
||||
// has opted into Telemetry.
|
||||
return gPrefs.get(PREF_EXPERIMENTS_ENABLED, false) &&
|
||||
gPrefs.get(PREF_TELEMETRY_ENABLED, false) &&
|
||||
gPrefs.get(PREF_HEALTHREPORT_ENABLED, false);
|
||||
(gPrefs.get(PREF_HEALTHREPORT_ENABLED, false) || IS_UNIFIED_TELEMETRY) &&
|
||||
gPrefs.get(PREF_TELEMETRY_ENABLED, false);
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(
|
||||
|
Loading…
Reference in New Issue
Block a user