Bug 1956093 - Make DAPTelemetrySender toggle without restart r=simonf,firefox-desktop-core-reviewers ,mconley,chutten

Move the data upload pref check into each `sendReport` call instead of checking
only at startup. Also fixup various things in test_dap.js.

Differential Revision: https://phabricator.services.mozilla.com/D243247
This commit is contained in:
Ted Campbell
2025-03-27 19:44:09 +00:00
parent e1ac9df163
commit 1639b734e1
3 changed files with 51 additions and 17 deletions

View File

@@ -3021,12 +3021,7 @@ BrowserGlue.prototype = {
{
name: "DAPTelemetrySender.startup",
condition:
AppConstants.MOZ_TELEMETRY_REPORTING &&
Services.prefs.getBoolPref(
"datareporting.healthreport.uploadEnabled",
false
),
condition: AppConstants.MOZ_TELEMETRY_REPORTING,
task: async () => {
await lazy.DAPTelemetrySender.startup();
},