summaryrefslogtreecommitdiffstats
path: root/toolkit/components/telemetry/TelemetryEnvironment.jsm
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-05-13 22:46:04 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-05-13 22:46:04 +0200
commit1124fb525bf7b8341170d886b8de070e20323efd (patch)
treeed5b0ee5976d7e1411c9ed3ac163b32383ba76e4 /toolkit/components/telemetry/TelemetryEnvironment.jsm
parenta6de0846702b2eb21ce2f29ba42bf968fbd4fe2f (diff)
downloadUXP-1124fb525bf7b8341170d886b8de070e20323efd.tar
UXP-1124fb525bf7b8341170d886b8de070e20323efd.tar.gz
UXP-1124fb525bf7b8341170d886b8de070e20323efd.tar.lz
UXP-1124fb525bf7b8341170d886b8de070e20323efd.tar.xz
UXP-1124fb525bf7b8341170d886b8de070e20323efd.zip
Remove other gonk widget conditionals and unused files.
Tag #288.
Diffstat (limited to 'toolkit/components/telemetry/TelemetryEnvironment.jsm')
-rw-r--r--toolkit/components/telemetry/TelemetryEnvironment.jsm44
1 files changed, 14 insertions, 30 deletions
diff --git a/toolkit/components/telemetry/TelemetryEnvironment.jsm b/toolkit/components/telemetry/TelemetryEnvironment.jsm
index 910d804ae..295679ca4 100644
--- a/toolkit/components/telemetry/TelemetryEnvironment.jsm
+++ b/toolkit/components/telemetry/TelemetryEnvironment.jsm
@@ -28,11 +28,9 @@ XPCOMUtils.defineLazyModuleGetter(this, "AttributionCode",
"resource:///modules/AttributionCode.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "ctypes",
"resource://gre/modules/ctypes.jsm");
-if (AppConstants.platform !== "gonk") {
- Cu.import("resource://gre/modules/AddonManager.jsm");
- XPCOMUtils.defineLazyModuleGetter(this, "LightweightThemeManager",
- "resource://gre/modules/LightweightThemeManager.jsm");
-}
+Cu.import("resource://gre/modules/AddonManager.jsm");
+XPCOMUtils.defineLazyModuleGetter(this, "LightweightThemeManager",
+ "resource://gre/modules/LightweightThemeManager.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "ProfileAge",
"resource://gre/modules/ProfileAge.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "UpdateUtils",
@@ -528,11 +526,9 @@ EnvironmentAddonBuilder.prototype = {
_updateAddons: Task.async(function* () {
this._environment._log.trace("_updateAddons");
let personaId = null;
- if (AppConstants.platform !== "gonk") {
- let theme = LightweightThemeManager.currentTheme;
- if (theme) {
- personaId = theme.id;
- }
+ let theme = LightweightThemeManager.currentTheme;
+ if (theme) {
+ personaId = theme.id;
}
let addons = {
@@ -745,14 +741,8 @@ function EnvironmentCache() {
// until the initial environment has been built.
let p = [];
- if (AppConstants.platform === "gonk") {
- this._addonBuilder = {
- watchForChanges: function() {}
- };
- } else {
- this._addonBuilder = new EnvironmentAddonBuilder(this);
- p = [ this._addonBuilder.init() ];
- }
+ this._addonBuilder = new EnvironmentAddonBuilder(this);
+ p = [ this._addonBuilder.init() ];
this._currentEnvironment.profile = {};
p.push(this._updateProfile());
@@ -1079,10 +1069,6 @@ EnvironmentCache.prototype = {
* @returns null on error, true if we are the default browser, or false otherwise.
*/
_isDefaultBrowser: function () {
- if (AppConstants.platform === "gonk") {
- return true;
- }
-
if (!("@mozilla.org/browser/shell-service;1" in Cc)) {
this._log.info("_isDefaultBrowser - Could not obtain browser shell service");
return null;
@@ -1139,10 +1125,8 @@ EnvironmentCache.prototype = {
userPrefs: this._getPrefData(),
};
- if (AppConstants.platform !== "gonk") {
- this._currentEnvironment.settings.addonCompatibilityCheckEnabled =
- AddonManager.checkCompatibility;
- }
+ this._currentEnvironment.settings.addonCompatibilityCheckEnabled =
+ AddonManager.checkCompatibility;
if (AppConstants.platform !== "android") {
this._currentEnvironment.settings.isDefaultBrowser =
@@ -1246,7 +1230,7 @@ EnvironmentCache.prototype = {
* not a portable device.
*/
_getDeviceData: function () {
- if (!["gonk", "android"].includes(AppConstants.platform)) {
+ if (!["android"].includes(AppConstants.platform)) {
return null;
}
@@ -1269,7 +1253,7 @@ EnvironmentCache.prototype = {
locale: forceToStringOrNull(getSystemLocale()),
};
- if (["gonk", "android"].includes(AppConstants.platform)) {
+ if (["android"].includes(AppConstants.platform)) {
data.kernelVersion = forceToStringOrNull(getSysinfoProperty("kernel_version", null));
} else if (AppConstants.platform === "win") {
// The path to the "UBR" key, queried to get additional version details on Windows.
@@ -1333,7 +1317,7 @@ EnvironmentCache.prototype = {
features: {},
};
- if (!["gonk", "android", "linux"].includes(AppConstants.platform)) {
+ if (!["android", "linux"].includes(AppConstants.platform)) {
let gfxInfo = Cc["@mozilla.org/gfx/info;1"].getService(Ci.nsIGfxInfo);
try {
gfxData.monitors = gfxInfo.getMonitors();
@@ -1398,7 +1382,7 @@ EnvironmentCache.prototype = {
if (AppConstants.platform === "win") {
data.isWow64 = getSysinfoProperty("isWow64", null);
- } else if (["gonk", "android"].includes(AppConstants.platform)) {
+ } else if (["android"].includes(AppConstants.platform)) {
data.device = this._getDeviceData();
}