Bug 1593953 - Make Touch Bar telemetry optional in execCommand. r=mikedeboer
Differential Revision: https://phabricator.services.mozilla.com/D51790
This commit is contained in:
@@ -35,7 +35,7 @@ XPCOMUtils.defineLazyServiceGetter(
|
|||||||
* TouchBarInput.
|
* TouchBarInput.
|
||||||
* @param {string} commandName
|
* @param {string} commandName
|
||||||
* A XUL command.
|
* A XUL command.
|
||||||
* @param {string} telemetryKey
|
* @param {string} [telemetryKey]
|
||||||
* A string describing the command, sent for telemetry purposes.
|
* A string describing the command, sent for telemetry purposes.
|
||||||
* Intended to be shorter and more readable than the XUL command.
|
* Intended to be shorter and more readable than the XUL command.
|
||||||
*/
|
*/
|
||||||
@@ -47,6 +47,11 @@ function execCommand(commandName, telemetryKey) {
|
|||||||
if (command) {
|
if (command) {
|
||||||
command.doCommand();
|
command.doCommand();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!telemetryKey) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let telemetry = Services.telemetry.getHistogramById(
|
let telemetry = Services.telemetry.getHistogramById(
|
||||||
"TOUCHBAR_BUTTON_PRESSES"
|
"TOUCHBAR_BUTTON_PRESSES"
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user