From 7cdfbeed20ef17372feb12f2345bbeaf112187ff Mon Sep 17 00:00:00 2001 From: Dan Mills Date: Thu, 26 Feb 2009 15:06:57 -0800 Subject: [PATCH] track local client data changes so we can upload it as necessary --- services/sync/modules/engines/clients.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/services/sync/modules/engines/clients.js b/services/sync/modules/engines/clients.js index 5e58a475832..86a19ba9dfb 100644 --- a/services/sync/modules/engines/clients.js +++ b/services/sync/modules/engines/clients.js @@ -69,6 +69,7 @@ ClientEngine.prototype = { _ClientEngine_init: function ClientEngine__init() { this._init(); + Utils.prefs.addObserver("", this, false); }, // get and set info for clients @@ -113,7 +114,20 @@ ClientEngine.prototype = { set clientName(value) { Svc.Prefs.set("client.name", value); }, get clientType() { return Svc.Prefs.get("client.type", "desktop"); }, - set clientType(value) { Svc.Prefs.set("client.type", value); } + set clientType(value) { Svc.Prefs.set("client.type", value); }, + + observe: function ClientEngine_observe() { + switch (topic) { + case "nsPref:changed": + switch (data) { + case "client.name": + case "client.type": + this._tracker.addChangedID(this.clientID); + break; + } + break; + } + } }; function ClientStore() {