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
committerMatt A. Tobin <email@mattatobin.com>2020-02-01 21:45:08 -0500
commit406fc463e051d69a2c8647a2bbcc6dfebebddad7 (patch)
treebc232e70ad001bedd99aaa4a12c4a0fb528c3d6f /dom/push/PushService.jsm
parent28208f1d3efe0b0cf8e00f06fcbd8c3c5981f2f8 (diff)
downloadUXP-406fc463e051d69a2c8647a2bbcc6dfebebddad7.tar
UXP-406fc463e051d69a2c8647a2bbcc6dfebebddad7.tar.gz
UXP-406fc463e051d69a2c8647a2bbcc6dfebebddad7.tar.lz
UXP-406fc463e051d69a2c8647a2bbcc6dfebebddad7.tar.xz
UXP-406fc463e051d69a2c8647a2bbcc6dfebebddad7.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",