Bug 1517639: Add launcher process state to the telemetry environment; r=janerik

Differential Revision: https://phabricator.services.mozilla.com/D15761

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Aaron Klotz 2019-01-23 18:59:51 +00:00
Родитель 8c0ca384fa
Коммит 9ef5dc5728
3 изменённых файлов: 12 добавлений и 0 удалений

Просмотреть файл

@ -1424,6 +1424,12 @@ EnvironmentCache.prototype = {
sandbox: this._getSandboxData(),
};
// Services.appinfo.launcherProcessState is not available in all build
// configurations, in which case an exception may be thrown.
try {
this._currentEnvironment.settings.launcherProcessState = Services.appinfo.launcherProcessState;
} catch (e) {}
this._currentEnvironment.settings.addonCompatibilityCheckEnabled =
AddonManager.checkCompatibility;

Просмотреть файл

@ -45,6 +45,7 @@ Structure:
submissionURL: <string> // set for default engines or well known search domains
},
searchCohort: <string>, // optional, contains an identifier for any active search A/B experiments
launcherProcessState: <integer>, // optional, values correspond to values of mozilla::LauncherRegistryInfo::EnabledState enum
e10sEnabled: <bool>, // whether e10s is on, i.e. browser tabs open by default in a different process
telemetryEnabled: <bool>, // false on failure
locale: <string>, // e.g. "it", null on failure

Просмотреть файл

@ -420,6 +420,11 @@ function checkSettingsSection(data) {
f + " must have the correct type.");
}
// This property is not always present, but when it is, it must be a number.
if ("launcherProcessState" in data.settings) {
Assert.equal(typeof data.settings.launcherProcessState, "number");
}
// Check "addonCompatibilityCheckEnabled" separately.
Assert.equal(data.settings.addonCompatibilityCheckEnabled, AddonManager.checkCompatibility);