summaryrefslogtreecommitdiffstats
path: root/dom/push/PushService.jsm
diff options
context:
space:
mode:
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",