summaryrefslogtreecommitdiffstats
path: root/dom/push/PushService.jsm
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-02-01 21:45:08 -0500
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-04-14 12:25:32 +0200
commitc8bbebe59de7883b2b7b609c7ebb19533eb99c7d (patch)
tree8894851dd0b86f80ad2a83882a2c51d54ce4cc15 /dom/push/PushService.jsm
parentfddc35e4384c20b1ad5d0c9818f490be29b1ece5 (diff)
downloadUXP-c8bbebe59de7883b2b7b609c7ebb19533eb99c7d.tar
UXP-c8bbebe59de7883b2b7b609c7ebb19533eb99c7d.tar.gz
UXP-c8bbebe59de7883b2b7b609c7ebb19533eb99c7d.tar.lz
UXP-c8bbebe59de7883b2b7b609c7ebb19533eb99c7d.tar.xz
UXP-c8bbebe59de7883b2b7b609c7ebb19533eb99c7d.zip
Issue #65 - Remove AppConstants from dom/
Diffstat (limited to 'dom/push/PushService.jsm')
-rw-r--r--dom/push/PushService.jsm11
1 files changed, 5 insertions, 6 deletions
diff --git a/dom/push/PushService.jsm b/dom/push/PushService.jsm
index 373807024..07cf70d21 100644
--- a/dom/push/PushService.jsm
+++ b/dom/push/PushService.jsm
@@ -10,7 +10,6 @@ const Ci = Components.interfaces;
const Cu = Components.utils;
const Cr = Components.results;
-Cu.import("resource://gre/modules/AppConstants.jsm");
Cu.import("resource://gre/modules/Preferences.jsm");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/Timer.jsm");
@@ -24,14 +23,14 @@ const {
const {PushDB} = Cu.import("resource://gre/modules/PushDB.jsm");
const CONNECTION_PROTOCOLS = (function() {
- if ('android' != AppConstants.MOZ_WIDGET_TOOLKIT) {
+#ifdef MOZ_WIDGET_ANDROID
+ const {PushServiceAndroidGCM} = Cu.import("resource://gre/modules/PushServiceAndroidGCM.jsm");
+ return [PushServiceAndroidGCM];
+#else
const {PushServiceWebSocket} = Cu.import("resource://gre/modules/PushServiceWebSocket.jsm");
const {PushServiceHttp2} = Cu.import("resource://gre/modules/PushServiceHttp2.jsm");
return [PushServiceWebSocket, PushServiceHttp2];
- } else {
- const {PushServiceAndroidGCM} = Cu.import("resource://gre/modules/PushServiceAndroidGCM.jsm");
- return [PushServiceAndroidGCM];
- }
+#endif
})();
XPCOMUtils.defineLazyServiceGetter(this, "gPushNotifier",