Bug 1112189 - Additional telemetry for tracking protection shield. r=mfinkle
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -344,16 +344,18 @@ var BrowserApp = {
#ifdef MOZ_SAFE_BROWSING
Services.tm.mainThread.dispatch(function() {
// Bug 778855 - Perf regression if we do this here. To be addressed in bug 779008.
SafeBrowsing.init();
}, Ci.nsIThread.DISPATCH_NORMAL);
#endif
#ifdef NIGHTLY_BUILD
WebcompatReporter.init();
+ Telemetry.addData("TRACKING_PROTECTION_ENABLED",
+ Services.prefs.getBoolPref("privacy.trackingprotection.enabled"));
#endif
} catch(ex) { console.log(ex); }
}, false);
BrowserEventHandler.init();
ViewportHandler.init();
Services.androidBridge.browserApp = this;
@@ -6783,25 +6785,28 @@ var IdentityHandler = {
return this.MIXED_MODE_CONTENT_LOADED;
}
return this.MIXED_MODE_UNKNOWN;
},
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;
},
/**
* Determine the identity of the page being displayed by examining its SSL cert
* (if available). Return the data needed to update the UI.
*/
checkIdentity: function checkIdentity(aState, aBrowser) {