summaryrefslogtreecommitdiffstats
path: root/toolkit/components/resistfingerprinting/FingerprintingWebCompatService.sys.mjs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--toolkit/components/resistfingerprinting/FingerprintingWebCompatService.sys.mjs14
1 files changed, 14 insertions, 0 deletions
diff --git a/toolkit/components/resistfingerprinting/FingerprintingWebCompatService.sys.mjs b/toolkit/components/resistfingerprinting/FingerprintingWebCompatService.sys.mjs
index 56f6435e47..676f06ea68 100644
--- a/toolkit/components/resistfingerprinting/FingerprintingWebCompatService.sys.mjs
+++ b/toolkit/components/resistfingerprinting/FingerprintingWebCompatService.sys.mjs
@@ -49,6 +49,8 @@ const SCHEMA = `{
const COLLECTION_NAME = "fingerprinting-protection-overrides";
const PREF_GRANULAR_OVERRIDES =
"privacy.fingerprintingProtection.granularOverrides";
+const PREF_REMOTE_OVERRIDES_ENABLED =
+ "privacy.fingerprintingProtection.remoteOverrides.enabled";
XPCOMUtils.defineLazyPreferenceGetter(
lazy,
@@ -56,6 +58,12 @@ XPCOMUtils.defineLazyPreferenceGetter(
PREF_GRANULAR_OVERRIDES
);
+XPCOMUtils.defineLazyPreferenceGetter(
+ lazy,
+ "remoteOverridesEnabled",
+ PREF_REMOTE_OVERRIDES_ENABLED
+);
+
/**
* The object represents a fingerprinting override.
*/
@@ -195,6 +203,12 @@ export class FingerprintingWebCompatService {
#onRemoteUpdate(entries) {
lazy.logConsole.debug("onUpdateEntries", { entries });
+
+ if (!lazy.remoteOverridesEnabled) {
+ lazy.logConsole.debug("Abort remote overrides");
+ return;
+ }
+
// Clear all overrides before we update the overrides.
this.#remoteOverrides.clear();