Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit 87504dc

Browse files
committed
Bug 1709892 - Add hasWinPackageId to telemetry environment. r=mhowell,chutten
Differential Revision: https://phabricator.services.mozilla.com/D114562
1 parent 8e4d13f commit 87504dc

4 files changed

Lines changed: 13 additions & 1 deletion

File tree

toolkit/components/telemetry/app/TelemetryEnvironment.jsm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2032,6 +2032,7 @@ EnvironmentCache.prototype = {
20322032
hdd: this._getHDDData(),
20332033
gfx: this._getGFXData(),
20342034
appleModelId: getSysinfoProperty("appleModelId", null),
2035+
hasWinPackageId: getSysinfoProperty("hasWinPackageId", null),
20352036
};
20362037

20372038
if (AppConstants.platform === "win") {

toolkit/components/telemetry/docs/data/environment.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ Structure:
117117
memoryMB: <number>,
118118
virtualMaxMB: <number>, // windows-only
119119
isWow64: <bool>, // windows-only
120-
isWowARM64: <bool>, // windows-only
120+
isWowARM64: <bool>, // windows-only
121+
hasWinPackageId: <bool>, // windows-only
121122
cpu: {
122123
count: <number>, // desktop only, e.g. 8, or null on failure - logical cpus
123124
cores: <number>, // desktop only, e.g., 4, or null on failure - physical cores

toolkit/components/telemetry/tests/unit/TelemetryEnvironmentTesting.jsm

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,11 @@ var TelemetryEnvironmentTesting = {
495495
"boolean",
496496
"isWowARM64 must be available on Windows and have the correct type."
497497
);
498+
Assert.equal(
499+
typeof data.system.hasWinPackageId,
500+
"boolean",
501+
"hasWinPackageId must be available on Windows and have the correct type."
502+
);
498503
Assert.ok(
499504
"virtualMaxMB" in data.system,
500505
"virtualMaxMB must be available."

toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1210,6 +1210,11 @@ if (gIsWindows) {
12101210
"boolean",
12111211
"isWowARM64 must be a boolean."
12121212
);
1213+
Assert.equal(
1214+
typeof data.system.hasWinPackageId,
1215+
"boolean",
1216+
"hasWinPackageId must be a boolean."
1217+
);
12131218
// These should be numbers if they are not null
12141219
for (let f of [
12151220
"count",

0 commit comments

Comments
 (0)