added wizard to setup service and get login information for new users

updated server pointers to point to the new services.mozilla.com backend
This commit is contained in:
cbeard@h-135.office.mozilla.org 2007-09-26 17:34:36 -07:00
Родитель d4c815234e
Коммит 55474654a1
2 изменённых файлов: 27 добавлений и 13 удалений

Просмотреть файл

@ -1154,13 +1154,29 @@ DAVCollection.prototype = {
}
// fixme: hacktastic
let hello = /Hello (.+)@mozilla.com/.exec(event.target.responseText)
if (hello) {
this._currentUserPath = hello[1];
this._currentUser = this._currentUserPath + "@mozilla.com";
this._baseURL = "http://dotmoz.mozilla.org/~" +
this._currentUserPath + "/";
}
// let hello = /Hello (.+)@mozilla.com/.exec(event.target.responseText)
// let hello = /Index of/.exec(event.target.responseText)
// if (hello) {
// this._currentUserPath = hello[1];
// this._currentUser = this._currentUserPath + "@mozilla.com";
// this._baseURL = "http://dotmoz.mozilla.org/~" +
// this._currentUserPath + "/";
// }
// XXX we need to refine some server response codes
let branch = Cc["@mozilla.org/preferences-service;1"].
getService(Ci.nsIPrefBranch);
this._currentUser = branch.getCharPref("browser.places.sync.username");
// XXX
let path = this._currentUser.split("@");
this._currentUserPath = path[0];
LOG("currentUser: "+this._currentUser);
LOG("currentUSerPath: "+this._currentUserPath);
let serverURL = branch.getCharPref("browser.places.sync.serverURL");
this._baseURL = serverURL + this._currentUserPath + "/";
this._loggedIn = true;

Просмотреть файл

@ -1,6 +1,4 @@
pref("browser.places.sync.serverURL", "http://dotmoz.mozilla.org/");
pref("browser.places.sync.serverURL", "https://services.mozilla.com/user/");
pref("browser.places.sync.username", "nobody@mozilla.com");
pref("extensions.sync.lastversion", "firstrun");
pref("extensions.sync.lastsync", "");
pref("extensions.sync.remember", false);
pref("extensions.sync.autoconnect", false);
pref("extensions.sync.lastsync", "0");