зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1865790 - Part 1: Aggregate suspicious fingerprinter number to fingerprinter category on the protection dashboard. r=anti-tracking-reviewers,pbz
This patch makes the protection dashboard recognize the suspicious fingerprinter ID in the ContentBlockingLog and aggregate the number to the fingerprinter category. Differential Revision: https://phabricator.services.mozilla.com/D194863
This commit is contained in:
Родитель
91771148f1
Коммит
57fb93348d
|
@ -35,6 +35,9 @@ let idToTextMap = new Map([
|
|||
[Ci.nsITrackingDBService.TRACKING_COOKIES_ID, "cookie"],
|
||||
[Ci.nsITrackingDBService.CRYPTOMINERS_ID, "cryptominer"],
|
||||
[Ci.nsITrackingDBService.FINGERPRINTERS_ID, "fingerprinter"],
|
||||
// We map the suspicious fingerprinter to fingerprinter category to aggregate
|
||||
// the number.
|
||||
[Ci.nsITrackingDBService.SUSPICIOUS_FINGERPRINTERS_ID, "fingerprinter"],
|
||||
[Ci.nsITrackingDBService.SOCIAL_ID, "social"],
|
||||
]);
|
||||
|
||||
|
@ -393,8 +396,11 @@ export class AboutProtectionsParent extends JSWindowActorParent {
|
|||
let count = result.getResultByName("count");
|
||||
let type = result.getResultByName("type");
|
||||
let timestamp = result.getResultByName("timestamp");
|
||||
dataToSend[timestamp] = dataToSend[timestamp] || { total: 0 };
|
||||
dataToSend[timestamp][idToTextMap.get(type)] = count;
|
||||
let typeStr = idToTextMap.get(type);
|
||||
dataToSend[timestamp] = dataToSend[timestamp] ?? { total: 0 };
|
||||
let currentCnt = dataToSend[timestamp][typeStr] ?? 0;
|
||||
currentCnt += count;
|
||||
dataToSend[timestamp][typeStr] = currentCnt;
|
||||
dataToSend[timestamp].total += count;
|
||||
// Record the largest amount of tracking events found per day,
|
||||
// to create the tallest column on the graph and compare other days to.
|
||||
|
|
|
@ -244,10 +244,11 @@ document.addEventListener("DOMContentLoaded", e => {
|
|||
"privacy.trackingprotection.cryptomining.enabled",
|
||||
false
|
||||
);
|
||||
let fingerprintingEnabled = RPMGetBoolPref(
|
||||
"privacy.trackingprotection.fingerprinting.enabled",
|
||||
false
|
||||
);
|
||||
let fingerprintingEnabled =
|
||||
RPMGetBoolPref(
|
||||
"privacy.trackingprotection.fingerprinting.enabled",
|
||||
false
|
||||
) || RPMGetBoolPref("privacy.fingerprintingProtection", false);
|
||||
let tpEnabled = RPMGetBoolPref("privacy.trackingprotection.enabled", false);
|
||||
let socialTracking = RPMGetBoolPref(
|
||||
"privacy.trackingprotection.socialtracking.enabled",
|
||||
|
|
|
@ -196,6 +196,7 @@ export let RemotePageAccessManager = {
|
|||
RPMGetBoolPref: [
|
||||
"browser.contentblocking.report.lockwise.enabled",
|
||||
"browser.contentblocking.report.monitor.enabled",
|
||||
"privacy.fingerprintingProtection",
|
||||
"privacy.socialtracking.block_cookies.enabled",
|
||||
"browser.contentblocking.report.proxy.enabled",
|
||||
"privacy.trackingprotection.cryptomining.enabled",
|
||||
|
|
Загрузка…
Ссылка в новой задаче