Commit Graph

122 Commits

Author SHA1 Message Date
Dan Mills
a94f85b7c3 wrap microsummary creation code in try/catch; catch unknown items during onItemMoved (should not happen, but...) 2009-01-21 19:04:13 -08:00
Dan Mills
fedd698bbb fix typo 2009-01-15 15:53:34 -08:00
Dan Mills
3dd2a14339 Bug 468671: Don't synchronize livemarks. Based on patch by Jorge Alves <jag.alves@gmail.com> 2009-01-15 13:58:59 -08:00
Dan Mills
23aaa6fcb7 disable unused engines; fix trackers trying to call enable which is gone now; improve bookmarks tracker logging 2009-01-13 16:55:51 -08:00
Dan Mills
d34aba46fd make tracker return true/false when adding a changed ID to indicate if it was a valid add or not; change bookmarks & history trackers to match; fix some problems in bookmarks tracker 2009-01-13 15:55:35 -08:00
Dan Mills
445916b2e6 ignore/unignore specific weave IDs instead of a blanket enable/disable of the tracker during sync. 2009-01-13 14:43:21 -08:00
Dan Mills
51d51a26ed small getchildren/getsiblings cleanup 2009-01-13 13:40:40 -08:00
Dan Mills
ee4044e7e1 when an orphan bookmark is found, reparent it to the unfiled bookmarks folder 2009-01-08 21:33:59 -08:00
Dan Mills
ff240dd3ce add clients sync (list of clients with names and types); make it simpler to create Engine subclasses; remove the 2nd 'authenticator' parameter for Resources; resetServer is now wipeServer; consider 0 an invalid place ID (fixes bug when calculating item depths); add a Svc global exported from utils.js where commonly used services can live 2009-01-06 13:54:18 -08:00
Dan Mills
34a114606d fix depth/index record generation 2009-01-02 21:13:32 -08:00
Dan Mills
df54949485 extra debugging to catch getFolderIdForItem errors 2009-01-02 19:35:23 -08:00
Dan Mills
fd1579088c fix tracker's onItemRemoved 2009-01-02 16:16:38 -08:00
Dan Mills
5e7867a4de add a _getWeaveParentIdForItem method; fix getAllIDs; add a createMetadataRecord method 2009-01-02 13:49:19 -08:00
Dan Mills
5e3ac9586e add a generic cache class for storing records during reconciliation. cache has 100 item limit, and is cleared before and after reconciliation so the OS can reclaim memory after GC 2008-12-30 23:52:20 -08:00
Dan Mills
380b614133 make engine keep less records in memory by limiting the outgoing queue to a maximum of 100 records, and fetch the rest from the store each time 2008-12-29 23:28:17 -08:00
Dan Mills
6b260498e0 switch to generating individual bookmark records directly from the places store, without using a cache (to improve memory performance); create objects for bookmark types; temporarily disable history sync 2008-12-28 19:59:44 -08:00
Dan Mills
62a45ad0ab Various engine/bookmark changes:
* Rely on the server to sort incoming records, remove all sorting code client-side.
* Streamline sync to be able to process incoming records one at a time, as soon as they are downloaded.  This changes reconciliation to be able to process a single incoming record.
* Engine base class will automatically convert parentid, depth, and sortindex into toplevel WBO objects.  This is good for now but kinda broken, engine subclasses should really be generating WBO records themselves.
* Since index is now a toplevel WBO property, there is no need for the bookmarks sync code to subclass recordLike.
* Refactor bookmarks store to be a little cleaner and work directly with records instead of "commands".
2008-12-23 11:30:31 -08:00
Dan Mills
08512b99a5 change engine to process (download, reconcile, apply changes) incoming records one by one 2008-12-19 11:48:09 -08:00
Dan Mills
e21bb9c514 typo fix 2008-12-18 01:09:17 -08:00
Dan Mills
32773c0f83 override _itemExists, itemExists (no _) checks for cached items, then calls that 2008-12-17 02:29:28 -08:00
Dan Mills
c02d11a89e api change for stores, deal with records not 'commands' 2008-12-16 17:06:45 -08:00
Dan Mills
f1a5b78d89 merge upstream changes 2008-12-12 13:57:05 -08:00
Dan Mills
3c88a35efd remove slightly misleading comment 2008-12-12 13:54:19 -08:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
db031ee612 On Fennec there is no microsummaries service, so I made the BookmarksEngine catch the exception if the service is undefined, and skip commands that would require it to create a microsummary, logging warnings instead. 2008-12-11 14:26:20 -08:00
Dan Mills
3ef1c0d9b1 enable history sync (not working yet) 2008-12-09 12:26:14 -08:00
Dan Mills
f2e4594263 make changeItemID exclusively a store method 2008-12-08 13:21:25 -08:00
Dan Mills
9070a62677 remove sync cores, they are no longer used; remove sharing code from bookmarks (we can bring it back when we need it again, needs work); have the engine give hints to the store about when to wrap all items and cache them (to make subsequent calls to wrap one item fast); move serializeItem/getAllIDs into the store 2008-12-08 09:53:32 -08:00
Dan Mills
b8a8a42755 tracker now caches places id -> guid mappings, since otherwise it can't retrieve the correct guid on item removal (because the callback happens after the item is removed) 2008-12-06 00:12:40 -08:00
Dan Mills
95b8e357b2 disable tracker for entire sync run. make sure tracker is re-enabled at the end 2008-12-05 00:55:19 -08:00
Dan Mills
c1a443df70 use callbacks instead of snapshot diffs to figure out what changes to send to the server 2008-12-05 00:39:54 -08:00
Dan Mills
dd8e0e678b fix bookmarks tracker by removing yield calls (which of course don't work as callbacks for nsIBookmarksObserver) 2008-12-02 16:46:24 -08:00
Dan Mills
a67aabffa4 add logic to detect when the same item is in both incoming & outgoing queues, but with different IDs - change the local ID in that case 2008-11-27 00:25:28 +09:00
Dan Mills
c221d2ea8e decrypt incoming items all in one go so as to sort them by index (which is inside the payload); don't attempt to change the index of an item if we're also changing its folder; only change index/parent if it's different from current value 2008-11-26 14:07:18 +09:00
Dan Mills
36a866416f query the bookmarks service to find out if we have an item (instead of our snapshot cache) 2008-11-25 14:49:18 +09:00
Dan Mills
fb99c9f85e fix bookmark deletion sync 2008-11-25 01:49:02 +09:00
Dan Mills
35bbc1b8c0 work with NewEngine 2008-11-20 09:21:12 +09:00
Dan Mills
6f6665b8e1 remove some sharing code, derive from NewEngine 2008-11-06 19:18:46 -08:00
Dan Mills
d3af90034a hg merge 2008-11-03 15:02:00 -08:00
Dan Mills
6151afb26d fix log4moz calls (new api), fix module imports for renamed modules 2008-11-03 15:00:38 -08:00
Dan Mills
6a2010fc4c disable bookmark sharing hooks 2008-10-16 12:30:30 -07:00
Dan Mills
e53290c477 catch exceptions from microsummaries that don't have a static title set 2008-08-13 15:23:15 -07:00
Anant Narayanan
94b9dfcd2e Automated merge with ssh://anarayanan@mozilla.com@hg.mozilla.org/labs/weave 2008-08-04 17:23:36 -07:00
Anant Narayanan
8d3528d073 Asynchronous bookmark sharing (bug 449113, r=thunder) 2008-08-04 17:23:23 -07:00
Dan Mills
c5a94ec81c filter out invalid tags when applying edit commands 2008-07-31 00:21:22 -07:00
Dan Mills
c678010dcf split Engine into SyncEngine and FileEngine 2008-07-25 01:06:23 -07:00
Chris Beard
e9ac166a41 * major revision to the login dialog to be more robust, adding error handling, styling and a help link
* some minor hacking of the login progress to improve performance
* expanded the application exit sync dialog to be a general modal sync dialog that will display whenever appropriate (e.g. during initial setup, on manual "sync now" requests, and on application exit)
* added a progress meter and status messages to the modal sync dialog to provide users with a better understanding of what's going on, and to assist in debugging
* added ability to cancel a modal sync request, including on application exit. when cancel is clicked on by the user, it will attempt to cancel the sync at the next opportunity (i.e. before the next sync engine is processed)
2008-07-09 17:17:24 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
98215f2fc8 Made bookmarkSharingManager._updateOutgoingShare tolerant of outgoing shares that are lacking a server path annotation: it will warn that they're invalid and return, rather than dying. 2008-07-09 16:57:55 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
436fb329bb Made wrapping of outgoing shares not crash if an outgoing share is missing an exptected annotation. 2008-07-09 13:45:10 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
3cc4b5541f Restored a line in bookmarkSharingManager.js which I took out by accident when removing debugging dumps and stuff, changeset 969. It should not have been taken out; without it you get 'mounts undefined' error. 2008-07-09 13:24:49 -07:00
jonathandicarlo@jonathan-dicarlos-macbook-pro.local
a0611ee8e1 I think I have fixed updateIncomingShare now. So everything should work, if I share with a user not myself. 2008-07-08 22:39:05 -07:00