mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 16:22:00 +00:00
Bug 1216265 - Only record tracking protection telemetry in non-private tabs. r=mfinkle
--HG-- extra : commitid : HGTLaZekyfw extra : rebase_source : 776a5f88eb8fd6e00ced8d3bac2e25878e867a94
This commit is contained in:
parent
4923f785f3
commit
f6018c9552
@ -1805,8 +1805,8 @@ var BrowserApp = {
|
||||
PrivateBrowsingUtils.addToTrackingAllowlist(normalizedUrl);
|
||||
} else {
|
||||
Services.perms.add(normalizedUrl, "trackingprotection", Services.perms.ALLOW_ACTION);
|
||||
Telemetry.addData("TRACKING_PROTECTION_EVENTS", 1);
|
||||
}
|
||||
Telemetry.addData("TRACKING_PROTECTION_EVENTS", 1);
|
||||
} else {
|
||||
// Remove the current host from the 'trackingprotection' consumer
|
||||
// of the permission manager. This effectively removes this host
|
||||
@ -1815,8 +1815,8 @@ var BrowserApp = {
|
||||
PrivateBrowsingUtils.removeFromTrackingAllowlist(normalizedUrl);
|
||||
} else {
|
||||
Services.perms.remove(normalizedUrl, "trackingprotection");
|
||||
Telemetry.addData("TRACKING_PROTECTION_EVENTS", 2);
|
||||
}
|
||||
Telemetry.addData("TRACKING_PROTECTION_EVENTS", 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -6549,7 +6549,7 @@ var IdentityHandler = {
|
||||
|
||||
getTrackingMode: function getTrackingMode(aState, aBrowser) {
|
||||
if (aState & Ci.nsIWebProgressListener.STATE_BLOCKED_TRACKING_CONTENT) {
|
||||
Telemetry.addData("TRACKING_PROTECTION_SHIELD", 2);
|
||||
this.shieldHistogramAdd(aBrowser, 2);
|
||||
return this.TRACKING_MODE_CONTENT_BLOCKED;
|
||||
}
|
||||
|
||||
@ -6559,14 +6559,21 @@ var IdentityHandler = {
|
||||
PrivateBrowsingUtils.isBrowserPrivate(aBrowser));
|
||||
|
||||
if ((aState & Ci.nsIWebProgressListener.STATE_LOADED_TRACKING_CONTENT) && tpEnabled) {
|
||||
Telemetry.addData("TRACKING_PROTECTION_SHIELD", 1);
|
||||
this.shieldHistogramAdd(aBrowser, 1);
|
||||
return this.TRACKING_MODE_CONTENT_LOADED;
|
||||
}
|
||||
|
||||
Telemetry.addData("TRACKING_PROTECTION_SHIELD", 0);
|
||||
this.shieldHistogramAdd(aBrowser, 0);
|
||||
return this.TRACKING_MODE_UNKNOWN;
|
||||
},
|
||||
|
||||
shieldHistogramAdd: function(browser, value) {
|
||||
if (PrivateBrowsingUtils.isBrowserPrivate(browser)) {
|
||||
return;
|
||||
}
|
||||
Telemetry.addData("TRACKING_PROTECTION_SHIELD", value);
|
||||
},
|
||||
|
||||
/**
|
||||
* Determine the identity of the page being displayed by examining its SSL cert
|
||||
* (if available). Return the data needed to update the UI.
|
||||
|
Loading…
Reference in New Issue
Block a user