Bug 932854 telemetry - add telemetry for showing the plugin infobar and its two buttons, r=jaws

This commit is contained in:
Benjamin Smedberg 2013-11-19 08:17:03 -05:00
parent fe46a8bf89
commit 8afde9f593
2 changed files with 21 additions and 0 deletions

View File

@ -963,6 +963,9 @@ var gPluginHandler = {
return;
}
Services.telemetry.getHistogramById("PLUGINS_INFOBAR_SHOWN").
add(true);
let message;
// Icons set directly cannot be manipulated using moz-image-region, so
// we use CSS classes instead.
@ -1007,6 +1010,9 @@ var gPluginHandler = {
label: gNavigatorBundle.getString("pluginBlockNow.label"),
accessKey: gNavigatorBundle.getString("pluginBlockNow.accesskey"),
callback: function() {
Services.telemetry.getHistogramById("PLUGINS_INFOBAR_BLOCK").
add(true);
Services.perms.addFromPrincipal(aBrowser.contentDocument.nodePrincipal,
"plugin-hidden-notification",
Services.perms.DENY_ACTION);
@ -1016,6 +1022,9 @@ var gPluginHandler = {
label: gNavigatorBundle.getString("offlineApps.allow"),
accessKey: gNavigatorBundle.getString("offlineApps.allowAccessKey"),
callback: function() {
Services.telemetry.getHistogramById("PLUGINS_INFOBAR_ALLOW").
add(true);
let curNotification =
PopupNotifications.getNotification("click-to-play-plugins",
aBrowser);

View File

@ -3671,6 +3671,18 @@
"n_values": 3,
"description": "User actions taken in the plugin notification: 0: allownow 1: allowalways 2: block"
},
"PLUGINS_INFOBAR_SHOWN": {
"kind": "boolean",
"description": "Count of when the hidden-plugin infobar was displayed."
},
"PLUGINS_INFOBAR_BLOCK": {
"kind": "boolean",
"description": "Count the number of times the user clicked 'block' on the hidden-plugin infobar."
},
"PLUGINS_INFOBAR_ALLOW": {
"kind": "boolean",
"description": "Count the number of times the user clicked 'allow' on the hidden-plugin infobar."
},
"POPUP_NOTIFICATION_MAINACTION_TRIGGERED_MS": {
"kind": "linear",
"low": 25,