pjs/extensions/sroaming
bzbarsky%mit.edu 06df868b16 Fix misspellings of "transferring" in the tree. Bug 258874, patch by Chris
Thomas (CTho) <cst@andrew.cmu.edu>, r=bsmedberg, spelling fix rs=brendan
2004-09-16 18:33:39 +00:00
..
resources Fix misspellings of "transferring" in the tree. Bug 258874, patch by Chris 2004-09-16 18:33:39 +00:00
src Bug 124029 - Roaming 2004-05-24 16:55:07 +00:00
Makefile.in Bug 124029 - Roaming 2004-05-24 16:55:07 +00:00
README.txt Bug 124029 - Roaming 2004-05-24 16:55:07 +00:00
jar.mn 246710, should also fix 244589, 244720, 246201 2004-06-17 16:21:18 +00:00
plan.txt 246710, should also fix 244589, 244720, 246201 2004-06-17 16:21:18 +00:00

README.txt

This implements 4.x-like roaming.

To make the implementation vastly more simple, it has been decided that no 
syncing during the session happens. The design will not allow that either 
(at most sync in certain intervalls). A full-blown dynamic implementation 
that immediately update the server when a data change occured requires the 
cooperation of the data providers (bookmarks, prefs etc.) and is thus a huge 
change that I will leave to somebody else to implement independant of this 
roaming support here. alecf made such proposals a longer time ago on 
n.p.m.prefs, they sounded very interesting, but unfortunately, nobody 
implemented them so far.

When the users selected a profile, we will check, if it's a roaming profile 
and where the data lies. If necessary, we will contact the server and 
download the data as files. We will overwrite local profile files with 
the downloaded ones. Then, the profile works as if it were fully local. 
When the user then logs out (shuts down Mozilla or switches to another 
profile), we upload the local files, overwriting those on the server.

Following Conrad Carlen's advise, I do not hook up using nsIProfileChangeStatus, 
but in nsProfile directly. That just calls |nsISessionRoaming|. 
Its implementation uses various protocol handlers like |mozSRoamingCopy| to 
do the upload/download. These in turn may use generic protocol handlers like 
the netwerk HTTP protocol to do that.

Also following Conrad's advise, I do not store the roaming prefs in the prefs 
system (prefs.js etc.), because that it not yet initialized when I need the 
data (of course - prefs.js, user.js etc. might get changed by us), but in 
the Mozilla application registry. For the structure, see the comment at 
the top of prefs/top.js.


Overview of implementation:
- transfer.js (the Transfer class and support classes) contains the
  non-GUI logic to transfer files and track the progress and success.
- progressDialog.* shows the progress to the user (and also works as interface
  to the C++ code)
- conflictCheck.js is the "controller", controls the overall execution flow.
  It determines what has to be done (which files to transfer when etc.),
  including the conflict resolution logic, and kicks off the transfers.
  There is a long comment at the top describing the implementation.
- conflictResolution.* is a dialog to ask the user when we don't know which
  version of a file to use.