From 9e7ec7f20a109cc08b78cd92b980af2970e8a479 Mon Sep 17 00:00:00 2001 From: Philipp von Weitershausen Date: Thu, 17 Feb 2011 14:06:00 -0800 Subject: [PATCH] Bug 633681 - Clean up and remove no longer used code. r+a=mconnor --- browser/base/content/browser-syncui.js | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/browser/base/content/browser-syncui.js b/browser/base/content/browser-syncui.js index 9db9e6536c8..3ccb6d1eb70 100644 --- a/browser/base/content/browser-syncui.js +++ b/browser/base/content/browser-syncui.js @@ -76,19 +76,16 @@ let gSyncUI = { obs.push("weave:notification:added"); } - let self = this; obs.forEach(function(topic) { - Services.obs.addObserver(self, topic, true); - }); + Services.obs.addObserver(this, topic, true); + }, this); // Find the alltabs-popup, only if there is a gBrowser if (gBrowser) { let popup = document.getElementById("alltabs-popup"); if (popup) { - let self = this; - popup.addEventListener("popupshowing", function() { - self.alltabsPopupShowing(); - }, true); + popup.addEventListener( + "popupshowing", this.alltabsPopupShowing.bind(this), true); } if (Weave.Notifications.notifications.length) @@ -124,12 +121,6 @@ let gSyncUI = { firstSync == "notReady"; }, - _isLoggedIn: function() { - if (this._needsSetup()) - return false; - return Weave.Service.isLoggedIn; - }, - updateUI: function SUI_updateUI() { let needsSetup = this._needsSetup(); document.getElementById("sync-setup-state").hidden = !needsSetup; @@ -150,6 +141,8 @@ let gSyncUI = { alltabsPopupShowing: function(event) { // Should we show the menu item? + //XXXphilikon We should remove the check for isLoggedIn here and have + // about:sync-tabs auto-login (bug 583344) if (!Weave.Service.isLoggedIn || !Weave.Engines.get("tabs").enabled) return;