Bug 1249094 - Add UI Telemetry probes for application foreground / background changes r=margaret

This commit is contained in:
Mark Finkle 2016-02-19 14:56:40 -05:00
parent 18b8ed813c
commit 46c9b10f56
3 changed files with 8 additions and 1 deletions

View File

@ -188,6 +188,9 @@ public interface TelemetryContract {
// Action triggered from a suggestion provided to the user. // Action triggered from a suggestion provided to the user.
SUGGESTION("suggestion"), SUGGESTION("suggestion"),
// Action triggered from an OS system action.
SYSTEM("system"),
// Action triggered from the Tabs tray. // Action triggered from the Tabs tray.
TABSTRAY("tabstray"), TABSTRAY("tabstray"),

View File

@ -6801,6 +6801,8 @@ var ActivityObserver = {
let isForeground = false; let isForeground = false;
let tab = BrowserApp.selectedTab; let tab = BrowserApp.selectedTab;
UITelemetry.addEvent("show.1", "system", null, aTopic);
switch (aTopic) { switch (aTopic) {
case "application-background" : case "application-background" :
let doc = (tab ? tab.browser.contentDocument : null); let doc = (tab ? tab.browser.contentDocument : null);
@ -6828,7 +6830,6 @@ var Telemetry = {
}; };
var Experiments = { var Experiments = {
// Enable malware download protection (bug 936041) // Enable malware download protection (bug 936041)
MALWARE_DOWNLOAD_PROTECTION: "malware-download-protection", MALWARE_DOWNLOAD_PROTECTION: "malware-download-protection",

View File

@ -230,6 +230,9 @@ Methods
``suggestion`` ``suggestion``
Action triggered from a suggested result, like those from search engines or default tiles. Action triggered from a suggested result, like those from search engines or default tiles.
``system``
Action triggered from an OS level action, like application foreground / background.
``toast`` ``toast``
Action triggered from an unobtrusive, temporary notification. Action triggered from an unobtrusive, temporary notification.