Bug 1112189 - Additional telemetry for tracking protection shield. r=mfinkle

--HG--
extra : rebase_source : eda2d69c36118cc93540ab0bed934d53c9de0c03
This commit is contained in:
Margaret Leibovic 2014-12-17 17:30:38 -08:00
parent 71f74038cd
commit 8bc141ec58

View File

@ -349,6 +349,8 @@ var BrowserApp = {
#endif
#ifdef NIGHTLY_BUILD
WebcompatReporter.init();
Telemetry.addData("TRACKING_PROTECTION_ENABLED",
Services.prefs.getBoolPref("privacy.trackingprotection.enabled"));
#endif
} catch(ex) { console.log(ex); }
}, false);
@ -6788,15 +6790,18 @@ var IdentityHandler = {
getTrackingMode: function getTrackingMode(aState) {
if (aState & Ci.nsIWebProgressListener.STATE_BLOCKED_TRACKING_CONTENT) {
Telemetry.addData("TRACKING_PROTECTION_SHIELD", 2);
return this.TRACKING_MODE_CONTENT_BLOCKED;
}
// Only show an indicator for loaded tracking content if the pref to block it is enabled
if ((aState & Ci.nsIWebProgressListener.STATE_LOADED_TRACKING_CONTENT) &&
Services.prefs.getBoolPref("privacy.trackingprotection.enabled")) {
Telemetry.addData("TRACKING_PROTECTION_SHIELD", 1);
return this.TRACKING_MODE_CONTENT_LOADED;
}
Telemetry.addData("TRACKING_PROTECTION_SHIELD", 0);
return this.TRACKING_MODE_UNKNOWN;
},