Bug 1593953 - Make Touch Bar telemetry optional in execCommand. r=mikedeboer

Differential Revision: https://phabricator.services.mozilla.com/D51790
This commit is contained in:
Harry Twyford
2019-11-05 12:54:19 +00:00
parent 10f0dacdb9
commit 9f9609e5fa

View File

@@ -35,7 +35,7 @@ XPCOMUtils.defineLazyServiceGetter(
* TouchBarInput.
* @param {string} commandName
* A XUL command.
* @param {string} telemetryKey
* @param {string} [telemetryKey]
* A string describing the command, sent for telemetry purposes.
* Intended to be shorter and more readable than the XUL command.
*/
@@ -47,6 +47,11 @@ function execCommand(commandName, telemetryKey) {
if (command) {
command.doCommand();
}
if (!telemetryKey) {
return;
}
let telemetry = Services.telemetry.getHistogramById(
"TOUCHBAR_BUTTON_PRESSES"
);