put prefs branch into Svc.Prefs
authorDan Mills <thunder@mozilla.com>
Tue, 10 Feb 2009 00:52:05 -0800
changeset 45228 98effaa4dc0f767d13875bce1f3eed4302a5ba31
parent 45227 81b80edd7bfda8b7ba4aaa4f0c430c70f113ca9c
child 45229 2a09c602347a383288bed810e201eda18a032b40
push idunknown
push userunknown
push dateunknown
put prefs branch into Svc.Prefs
services/sync/modules/util.js
--- a/services/sync/modules/util.js
+++ b/services/sync/modules/util.js
@@ -37,16 +37,18 @@
 const EXPORTED_SYMBOLS = ['Utils', 'Svc'];
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cr = Components.results;
 const Cu = Components.utils;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
+Cu.import("resource://weave/ext/Preferences.js");
+Cu.import("resource://weave/ext/Observers.js");
 Cu.import("resource://weave/constants.js");
 Cu.import("resource://weave/log4moz.js");
 
 /*
  * Utility functions
  */
 
 let Utils = {
@@ -502,11 +504,12 @@ Utils.EventListener.prototype = {
   }
 };
 
 /*
  * Commonly-used services
  */
 
 let Svc = {};
+Svc.Prefs = new Preferences(PREFS_BRANCH);
 Utils.lazyInstance(Svc, 'Json', "@mozilla.org/dom/json;1", Ci.nsIJSON);
 Utils.lazySvc(Svc, 'IO', "@mozilla.org/network/io-service;1", Ci.nsIIOService);
 Utils.lazySvc(Svc, 'Crypto', "@labs.mozilla.com/Weave/Crypto;1", Ci.IWeaveCrypto);