mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 1276006 - Add telemetry to count how many users use container tabs, r=mconley, data-review=bsmedberg
This commit is contained in:
parent
79a926a3d8
commit
6761995b11
@ -4346,6 +4346,7 @@
|
||||
case "Browser:WindowCreated": {
|
||||
let tab = this.getTabForBrowser(browser);
|
||||
if (tab && data.userContextId) {
|
||||
ContextualIdentityService.telemetry(data.userContextId);
|
||||
tab.setUserContextId(data.userContextId);
|
||||
}
|
||||
|
||||
|
@ -21,22 +21,26 @@ this.ContextualIdentityService = {
|
||||
icon: "chrome://browser/skin/usercontext/personal.svg",
|
||||
color: "#00a7e0",
|
||||
label: "userContextPersonal.label",
|
||||
accessKey: "userContextPersonal.accesskey" },
|
||||
accessKey: "userContextPersonal.accesskey",
|
||||
alreadyOpened: false },
|
||||
{ userContextId: 2,
|
||||
icon: "chrome://browser/skin/usercontext/work.svg",
|
||||
color: "#f89c24",
|
||||
label: "userContextWork.label",
|
||||
accessKey: "userContextWork.accesskey" },
|
||||
accessKey: "userContextWork.accesskey",
|
||||
alreadyOpened: false },
|
||||
{ userContextId: 3,
|
||||
icon: "chrome://browser/skin/usercontext/banking.svg",
|
||||
color: "#7dc14c",
|
||||
label: "userContextBanking.label",
|
||||
accessKey: "userContextBanking.accesskey" },
|
||||
accessKey: "userContextBanking.accesskey",
|
||||
alreadyOpened: false },
|
||||
{ userContextId: 4,
|
||||
icon: "chrome://browser/skin/usercontext/shopping.svg",
|
||||
color: "#ee5195",
|
||||
label: "userContextShopping.label",
|
||||
accessKey: "userContextShopping.accesskey" },
|
||||
accessKey: "userContextShopping.accesskey",
|
||||
alreadyOpened: false },
|
||||
],
|
||||
|
||||
_cssRule: false,
|
||||
@ -72,4 +76,14 @@ this.ContextualIdentityService = {
|
||||
tab.style.backgroundSize = "auto 2px";
|
||||
tab.style.backgroundRepeat = "no-repeat";
|
||||
},
|
||||
|
||||
telemetry(userContextId) {
|
||||
let identity = this.getIdentityFromId(userContextId);
|
||||
if (!identity.alreadyOpened) {
|
||||
identity.alreadyOpened = true;
|
||||
Services.telemetry.getHistogramById("UNIQUE_CONTAINERS_OPENED").add(1);
|
||||
}
|
||||
|
||||
Services.telemetry.getHistogramById("TOTAL_CONTAINERS_OPENED").add(1);
|
||||
},
|
||||
}
|
||||
|
@ -9989,5 +9989,19 @@
|
||||
"bug_numbers": [1272501],
|
||||
"releaseChannelCollection": "opt-out",
|
||||
"description": "HTMLInputElement.webkitdirectory attribute used"
|
||||
},
|
||||
"UNIQUE_CONTAINERS_OPENED": {
|
||||
"alert_emails": ["amarchesini@mozilla.com"],
|
||||
"expires_in_version": "never",
|
||||
"bug_numbers": [1276006],
|
||||
"kind": "count",
|
||||
"description": "Tracking the unique number of opened Containers."
|
||||
},
|
||||
"TOTAL_CONTAINERS_OPENED": {
|
||||
"alert_emails": ["amarchesini@mozilla.com"],
|
||||
"expires_in_version": "never",
|
||||
"bug_numbers": [1276006],
|
||||
"kind": "count",
|
||||
"description": "Tracking the total number of opened Containers."
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user