Bug 882467 - Mixed Content Telemetry - How many times do users click Disable Protection r=dolske

This commit is contained in:
David Dahl 2013-09-05 18:18:04 -05:00
parent a1efd38996
commit 1d2d4a3b19
3 changed files with 13 additions and 0 deletions

View File

@ -6606,6 +6606,11 @@ var gIdentityHandler = {
label: gNavigatorBundle.getString("mixedContentBlocked.unblock.label"),
accessKey: gNavigatorBundle.getString("mixedContentBlocked.unblock.accesskey"),
callback: function() {
// Use telemetry to measure how often unblocking happens
const kMIXED_CONTENT_UNBLOCK_EVENT = 2;
let histogram =
Services.telemetry.getHistogramById("MIXED_CONTENT_UNBLOCK_COUNTER");
histogram.add(kMIXED_CONTENT_UNBLOCK_EVENT);
// Reload the page with the content unblocked
BrowserReloadWithFlags(nsIWebNavigation.LOAD_FLAGS_ALLOW_MIXED_CONTENT);
}

View File

@ -1431,6 +1431,9 @@ nsDocument::~nsDocument()
}
if (!isAboutScheme) {
// Record the page load
uint32_t pageLoaded = 1;
Accumulate(Telemetry::MIXED_CONTENT_UNBLOCK_COUNTER, pageLoaded);
// Record the mixed content status of the docshell in Telemetry
enum {
NO_MIXED_CONTENT = 0, // There is no Mixed Content on the page

View File

@ -3893,6 +3893,11 @@
"n_values": 4,
"description": "Accumulates type of content (mixed, mixed passive, unmixed) per page load"
},
"MIXED_CONTENT_UNBLOCK_COUNTER": {
"kind": "enumerated",
"n_values": 3,
"description": "A simple counter of daily mixed-content unblock operations and top documents loaded"
},
"NTLM_MODULE_USED": {
"kind": "enumerated",
"n_values": 8,