diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-02-01 23:45:36 -0500 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-04-14 12:26:11 +0200 |
commit | 4acc0d58cb0fa989d609972493be363c105f2594 (patch) | |
tree | b0c4dfd608561041b83da74a1eba5739ab3931ec /toolkit/content/aboutTelemetry.js | |
parent | a1c9dd468daa6d729c9d11416fb8a5c2dceb2c88 (diff) | |
download | UXP-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.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); } }, |