From 0f952f34dd2dcd90532c392da784651044cecbc9 Mon Sep 17 00:00:00 2001 From: Sebastian Hengst Date: Thu, 29 Sep 2016 19:53:44 +0200 Subject: [PATCH] Bug 1306397 - Remove B2G event 'network-active-changed' and consumers from non-B2G/Gonk files: dom/presentation. r=schien MozReview-Commit-ID: 1tTdMntEo54 --HG-- extra : rebase_source : 6337b60928644891cd7f4e6fe3018c7eda5fa978 --- .../provider/PresentationControlService.js | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/dom/presentation/provider/PresentationControlService.js b/dom/presentation/provider/PresentationControlService.js index 3e451fb278cf..fe61d26d65a2 100644 --- a/dom/presentation/provider/PresentationControlService.js +++ b/dom/presentation/provider/PresentationControlService.js @@ -118,8 +118,6 @@ PresentationControlService.prototype = { DEBUG && log("PresentationControlService - service start on port: " + this._port); // jshint ignore:line // Monitor network interface change to restart server socket. - // Only B2G has nsINetworkManager - Services.obs.addObserver(this, "network-active-changed", false); Services.obs.addObserver(this, "network:offline-status-changed", false); this._notifyServerReady(); @@ -324,7 +322,6 @@ PresentationControlService.prototype = { this._serverSocket.close(); this._serverSocket = null; - Services.obs.removeObserver(this, "network-active-changed"); Services.obs.removeObserver(this, "network:offline-status-changed"); this._notifyServerStopped(Cr.NS_OK); @@ -336,21 +333,6 @@ PresentationControlService.prototype = { observe: function(aSubject, aTopic, aData) { DEBUG && log("PresentationControlService - observe: " + aTopic); // jshint ignore:line switch (aTopic) { - case "network-active-changed": { - if (!aSubject) { - DEBUG && log("No active network"); // jshint ignore:line - return; - } - - /** - * Restart service only when original status is online because other - * cases will be handled by "network:offline-status-changed". - */ - if (!Services.io.offline) { - this._restartServer(); - } - break; - } case "network:offline-status-changed": { if (aData == "offline") { DEBUG && log("network offline"); // jshint ignore:line