mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-22 23:27:30 +09:00
[Basilisk] tracking-protection: remove telemetry
This commit is contained in:
parent
c2e9a2691f
commit
b0ccff1c6c
1 changed files with 0 additions and 47 deletions
|
|
@ -28,9 +28,6 @@ var TrackingProtection = {
|
||||||
gNavigatorBundle.getString("trackingProtection.icon.activeTooltip");
|
gNavigatorBundle.getString("trackingProtection.icon.activeTooltip");
|
||||||
this.disabledTooltipText =
|
this.disabledTooltipText =
|
||||||
gNavigatorBundle.getString("trackingProtection.icon.disabledTooltip");
|
gNavigatorBundle.getString("trackingProtection.icon.disabledTooltip");
|
||||||
|
|
||||||
this.enabledHistogramAdd(this.enabledGlobally);
|
|
||||||
this.disabledPBMHistogramAdd(!this.enabledInPrivateWindows);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
uninit() {
|
uninit() {
|
||||||
|
|
@ -56,34 +53,6 @@ var TrackingProtection = {
|
||||||
this.container.hidden = !this.enabled;
|
this.container.hidden = !this.enabled;
|
||||||
},
|
},
|
||||||
|
|
||||||
enabledHistogramAdd(value) {
|
|
||||||
if (PrivateBrowsingUtils.isWindowPrivate(window)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Services.telemetry.getHistogramById("TRACKING_PROTECTION_ENABLED").add(value);
|
|
||||||
},
|
|
||||||
|
|
||||||
disabledPBMHistogramAdd(value) {
|
|
||||||
if (PrivateBrowsingUtils.isWindowPrivate(window)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Services.telemetry.getHistogramById("TRACKING_PROTECTION_PBM_DISABLED").add(value);
|
|
||||||
},
|
|
||||||
|
|
||||||
eventsHistogramAdd(value) {
|
|
||||||
if (PrivateBrowsingUtils.isWindowPrivate(window)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Services.telemetry.getHistogramById("TRACKING_PROTECTION_EVENTS").add(value);
|
|
||||||
},
|
|
||||||
|
|
||||||
shieldHistogramAdd(value) {
|
|
||||||
if (PrivateBrowsingUtils.isWindowPrivate(window)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Services.telemetry.getHistogramById("TRACKING_PROTECTION_SHIELD").add(value);
|
|
||||||
},
|
|
||||||
|
|
||||||
onSecurityChange(state, isSimulated) {
|
onSecurityChange(state, isSimulated) {
|
||||||
if (!this.enabled) {
|
if (!this.enabled) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -104,25 +73,15 @@ var TrackingProtection = {
|
||||||
this.icon.setAttribute("tooltiptext", this.activeTooltipText);
|
this.icon.setAttribute("tooltiptext", this.activeTooltipText);
|
||||||
this.icon.setAttribute("state", "blocked-tracking-content");
|
this.icon.setAttribute("state", "blocked-tracking-content");
|
||||||
this.content.setAttribute("state", "blocked-tracking-content");
|
this.content.setAttribute("state", "blocked-tracking-content");
|
||||||
|
|
||||||
this.shieldHistogramAdd(2);
|
|
||||||
} else if (isAllowing) {
|
} else if (isAllowing) {
|
||||||
this.icon.setAttribute("tooltiptext", this.disabledTooltipText);
|
this.icon.setAttribute("tooltiptext", this.disabledTooltipText);
|
||||||
this.icon.setAttribute("state", "loaded-tracking-content");
|
this.icon.setAttribute("state", "loaded-tracking-content");
|
||||||
this.content.setAttribute("state", "loaded-tracking-content");
|
this.content.setAttribute("state", "loaded-tracking-content");
|
||||||
|
|
||||||
this.shieldHistogramAdd(1);
|
|
||||||
} else {
|
} else {
|
||||||
this.icon.removeAttribute("tooltiptext");
|
this.icon.removeAttribute("tooltiptext");
|
||||||
this.icon.removeAttribute("state");
|
this.icon.removeAttribute("state");
|
||||||
this.content.removeAttribute("state");
|
this.content.removeAttribute("state");
|
||||||
|
|
||||||
// We didn't show the shield
|
|
||||||
this.shieldHistogramAdd(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Telemetry for state change.
|
|
||||||
this.eventsHistogramAdd(0);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
disableForCurrentPage() {
|
disableForCurrentPage() {
|
||||||
|
|
@ -143,9 +102,6 @@ var TrackingProtection = {
|
||||||
"trackingprotection", Services.perms.ALLOW_ACTION);
|
"trackingprotection", Services.perms.ALLOW_ACTION);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Telemetry for disable protection.
|
|
||||||
this.eventsHistogramAdd(1);
|
|
||||||
|
|
||||||
// Hide the control center.
|
// Hide the control center.
|
||||||
document.getElementById("identity-popup").hidePopup();
|
document.getElementById("identity-popup").hidePopup();
|
||||||
|
|
||||||
|
|
@ -166,9 +122,6 @@ var TrackingProtection = {
|
||||||
Services.perms.remove(normalizedUrl, "trackingprotection");
|
Services.perms.remove(normalizedUrl, "trackingprotection");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Telemetry for enable protection.
|
|
||||||
this.eventsHistogramAdd(2);
|
|
||||||
|
|
||||||
// Hide the control center.
|
// Hide the control center.
|
||||||
document.getElementById("identity-popup").hidePopup();
|
document.getElementById("identity-popup").hidePopup();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue