mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Bug 882467 - Mixed Content Telemetry - How many times do users click Disable Protection r=dolske
This commit is contained in:
parent
a1efd38996
commit
1d2d4a3b19
@ -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);
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user