[Basilisk] Issue #19 - Implement GlobalPrivacyControl

This commit is contained in:
Basilisk-Dev 2022-08-10 18:15:18 -04:00 committed by roytam1
commit 30e47eb5bc
5 changed files with 30 additions and 20 deletions

View file

@ -1524,7 +1524,7 @@ BrowserGlue.prototype = {
},
_migrateUI: function() {
const UI_VERSION = 43;
const UI_VERSION = 44;
const BROWSER_DOCURL = "chrome://browser/content/browser.xul";
let currentUIVersion;
@ -1858,6 +1858,15 @@ BrowserGlue.prototype = {
Services.prefs.clearUserPref("layers.acceleration.force-enabled");
}
if (currentUIVersion < 44) {
// DoNotTrack is now GPC. Carry across user preference.
if (Services.prefs.prefHasUserValue("privacy.donottrackheader.enabled")) {
let DNTEnabled = Services.prefs.getBoolPref("privacy.donottrackheader.enabled");
Services.prefs.setBoolPref("privacy.GPCheader.enabled", DNTEnabled);
Services.prefs.clearUserPref("privacy.donottrackheader.enabled");
}
}
// Update the migration version.
Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
},