Bug 1685213 - Part 3: Record launch method telemetry. r=bytesized

Differential Revision: https://phabricator.services.mozilla.com/D106345
This commit is contained in:
Adam Gashlin 2021-02-25 23:15:47 +00:00
parent b638c59199
commit fc0cc700f9
2 changed files with 52 additions and 0 deletions

View File

@ -2333,6 +2333,37 @@ BrowserGlue.prototype = {
},
},
// Report the type of shortcut used to launch
{
condition: AppConstants.platform == "win",
task: () => {
let classification;
let shortcut;
try {
shortcut = Services.appinfo.processStartupShortcut;
let shellService = Cc[
"@mozilla.org/browser/shell-service;1"
].getService(Ci.nsIWindowsShellService);
classification = shellService.classifyShortcut(shortcut);
} catch (ex) {
Cu.reportError(ex);
}
if (!classification) {
if (shortcut) {
classification = "OtherShortcut";
} else {
classification = "Other";
}
}
Services.telemetry.scalarSet(
"os.environment.launch_method",
classification
);
},
},
{
condition: AppConstants.platform == "win",
task: () => {

View File

@ -1774,6 +1774,27 @@ os.environment:
operating_systems:
- "windows"
launch_method:
bug_numbers:
- 1685213
description: >
Records how Firefox was started on Windows.
Currently will be one of "Desktop", "StartMenu" (including pins),
"Taskbar", "OtherShortcut", or "Other"
expires: "94"
kind: string
notification_emails:
- application-update-telemetry-alerts@mozilla.com
- agashlin@mozilla.com
- shong@mozilla.com
release_channel_collection: opt-out
products:
- firefox
record_in_processes:
- main
operating_systems:
- windows
pictureinpicture:
opened_method:
bug_numbers: