diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-02-01 23:45:36 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2020-02-01 23:45:36 -0500 |
commit | 7d21d02d532fed5613501de63f8b3d50144a751f (patch) | |
tree | 06ae93efe12de8b25d207b13e81d8f6c2c0f2f7d /toolkit/content/aboutTelemetry.js | |
parent | a18c27ddde9bb269948d5849df4840273237a24b (diff) | |
download | UXP-7d21d02d532fed5613501de63f8b3d50144a751f.tar UXP-7d21d02d532fed5613501de63f8b3d50144a751f.tar.gz UXP-7d21d02d532fed5613501de63f8b3d50144a751f.tar.lz UXP-7d21d02d532fed5613501de63f8b3d50144a751f.tar.xz UXP-7d21d02d532fed5613501de63f8b3d50144a751f.zip |
Issue #65 - Remove AppConstants from toolkit/content
Diffstat (limited to 'toolkit/content/aboutTelemetry.js')
-rw-r--r-- | toolkit/content/aboutTelemetry.js | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/toolkit/content/aboutTelemetry.js b/toolkit/content/aboutTelemetry.js index c73a979c6..0829fe7e2 100644 --- a/toolkit/content/aboutTelemetry.js +++ b/toolkit/content/aboutTelemetry.js @@ -19,9 +19,6 @@ Cu.import("resource://gre/modules/Preferences.jsm"); Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/Task.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "AppConstants", - "resource://gre/modules/AppConstants.jsm"); - const Telemetry = Services.telemetry; const bundle = Services.strings.createBundle( "chrome://global/locale/aboutTelemetry.properties"); @@ -236,17 +233,17 @@ var Settings = { let elements = document.getElementsByClassName("change-data-choices-link"); for (let el of elements) { el.addEventListener("click", function() { - if (AppConstants.platform == "android") { - Cu.import("resource://gre/modules/Messaging.jsm"); - Messaging.sendRequest({ - type: "Settings:Show", - resource: "preferences_privacy", - }); - } else { - // Show the data choices preferences on desktop. - let mainWindow = getMainWindowWithPreferencesPane(); - mainWindow.openAdvancedPreferences("dataChoicesTab"); - } +#ifdef MOZ_WIDGET_ANDROID + Cu.import("resource://gre/modules/Messaging.jsm"); + Messaging.sendRequest({ + type: "Settings:Show", + resource: "preferences_privacy", + }); +#else + // Show the data choices preferences on desktop. + let mainWindow = getMainWindowWithPreferencesPane(); + mainWindow.openAdvancedPreferences("dataChoicesTab"); +#endif }, false); } }, |