summaryrefslogtreecommitdiffstats
path: root/toolkit/content/aboutTelemetry.js
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-02-01 23:45:36 -0500
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-04-14 12:26:11 +0200
commit4acc0d58cb0fa989d609972493be363c105f2594 (patch)
treeb0c4dfd608561041b83da74a1eba5739ab3931ec /toolkit/content/aboutTelemetry.js
parenta1c9dd468daa6d729c9d11416fb8a5c2dceb2c88 (diff)
downloadUXP-4acc0d58cb0fa989d609972493be363c105f2594.tar
UXP-4acc0d58cb0fa989d609972493be363c105f2594.tar.gz
UXP-4acc0d58cb0fa989d609972493be363c105f2594.tar.lz
UXP-4acc0d58cb0fa989d609972493be363c105f2594.tar.xz
UXP-4acc0d58cb0fa989d609972493be363c105f2594.zip
Issue #65 - Remove AppConstants from toolkit/content
Diffstat (limited to 'toolkit/content/aboutTelemetry.js')
-rw-r--r--toolkit/content/aboutTelemetry.js25
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);
}
},