allow multi-cluster support to be turned off
authorDan Mills <thunder@mozilla.com>
Tue, 10 Feb 2009 13:29:04 -0800
changeset 45234 8b2a8d5d37cbb3957485878cfff591e14682e029
parent 45233 50cb25ce097885dfe8e1e47f9ad7b3df7dd9d5a1
child 45235 eeb85b7edcab0dfbc5325a3f1403fed24ee7d871
push idunknown
push userunknown
push dateunknown
allow multi-cluster support to be turned off
services/sync/modules/service.js
services/sync/services-sync.js
--- a/services/sync/modules/service.js
+++ b/services/sync/modules/service.js
@@ -426,16 +426,22 @@ WeaveSvc.prototype = {
   },
 
   // These are global (for all engines)
 
   // gets cluster from central LDAP server and sets this.clusterURL
   findCluster: function WeaveSvc_findCluster(onComplete, username) {
     let fn = function WeaveSvc__findCluster() {
       let self = yield;
+      if (Svc.Prefs.get("independentNode")) {
+	this._log.debug("Using serverURL as data cluster (multi-cluster support disabled)");
+	this.clusterURL = Svc.Prefs.get("serverURL");
+	self.done(true);
+	return;
+      }
       this._log.debug("Finding cluster for user " + username);
       let res = new Resource(this.baseURL + "api/register/chknode/" + username);
       yield res.get(self.cb);
       if (res.lastChannel.responseStatus != 200) {
 	self.done(false);
 	return;
       }
       this.clusterURL = 'https://' + res.data + '/';
--- a/services/sync/services-sync.js
+++ b/services/sync/services-sync.js
@@ -1,9 +1,10 @@
 pref("extensions.weave.serverURL", "https://services.mozilla.com/");
+pref("extensions.weave.independentNode", false);
 
 pref("extensions.weave.encryption", "aes-256-cbc");
 
 pref("extensions.weave.lastversion", "firstrun");
 pref("extensions.weave.lastsync", "0");
 
 pref("extensions.weave.ui.syncnow", true);
 pref("extensions.weave.ui.sharebookmarks", false);
@@ -11,17 +12,17 @@ pref("extensions.weave.rememberpassword"
 pref("extensions.weave.autoconnect", true);
 pref("extensions.weave.enabled", true);
 pref("extensions.weave.schedule", 1);
 
 pref("extensions.weave.syncOnQuit.enabled", true);
 
 pref("extensions.weave.engine.bookmarks", true);
 pref("extensions.weave.engine.history", true);
-pref("extensions.weave.engine.cookies", true );
+pref("extensions.weave.engine.cookies", false);
 pref("extensions.weave.engine.passwords", false);
 pref("extensions.weave.engine.forms", false);
 pref("extensions.weave.engine.tabs", true);
 pref("extensions.weave.engine.input", false);
 
 pref("extensions.weave.log.appender.console", "Warn");
 pref("extensions.weave.log.appender.dump", "Error");
 pref("extensions.weave.log.appender.briefLog", "Info");