refresh clients on a timer when changed via the prefpane, otherwise just wait until next sync
authorDan Mills <thunder@mozilla.com>
Thu, 31 Jul 2008 01:59:03 -0700
changeset 44983 2352e7244c6c85ff9a842047525a42d1c6e109a1
parent 44982 500130b859c755bdfff349f58db0481920b20279
child 44985 956305b06a80a9bc5754312063e9c40ab33aa4b9
child 44990 37dac54975252cdfb0d06d22422ca130a9a5c0a0
push idunknown
push userunknown
push dateunknown
refresh clients on a timer when changed via the prefpane, otherwise just wait until next sync
services/sync/modules/clientData.js
--- a/services/sync/modules/clientData.js
+++ b/services/sync/modules/clientData.js
@@ -92,17 +92,16 @@ ClientDataSvc.prototype = {
     }
     return value;
   },
 
   _init: function ClientData__init() {
     this._log = Log4Moz.Service.getLogger("Service.ClientData");
     this._remote = new Resource("meta/clients");
     this._remote.pushFilter(new JsonFilter());
-    Utils.prefs.addObserver("client", this, false);
   },
 
   _wrap: function ClientData__wrap() {
     return {
       GUID: this.GUID,
       name: this.name,
       type: this.type
     };
@@ -121,21 +120,10 @@ ClientDataSvc.prototype = {
     }
 
     this._remote.data[this.GUID] = this._wrap();
     yield this._remote.put(self.cb);
     this._log.debug("Successfully downloaded clients file from server");
   },
   refresh: function ClientData_refresh(onComplete) {
     this._refresh.async(this, onComplete);
-  },
-
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
-                                         Ci.nsISupportsWeakReference]),
-
-  observe: function WeaveSvc__observe(subject, topic, data) {
-    switch (topic) {
-    case "nsPref:changed":
-      ClientData.refresh(self.cb);
-      break;
-    }
   }
 };