Files
tubestation/browser/components/preferences
Malte Jürgens 3809a1239b Bug 1910312 - Unbreak privacy and security settings when MOZ_DATA_REPORTING is disabled r=settings-reviewers,mossop
Disabling `MOZ_DATA_REPORTING` results in the `PREF_UPLOAD_ENABLED` pref not
being loaded with `Preferences.add`. This means
`Preferences.get(PREF_UPLOAD_ENABLED)` can possibly be `null`, which was
previously not handled and resulted in an error for the whole privacy.js file.

So only call `dataCollectionCheckboxHandler` for the `privateAttribution`
checkbox if `MOZ_DATA_REPORTING` is enabled (otherwise the `privateAttribution`
checkbox also just doesn't exist). Also move the call into separate
`initPrivateAttributionCheckbox` function to be more consistent with previous
code.

Differential Revision: https://phabricator.services.mozilla.com/D218265
2024-08-09 12:45:27 +00:00
..