Commit Graph

219 Commits

Author SHA1 Message Date
Edward Lee
4e55362a90 Bug 570636 - Decide how to co-exist as a sync add-on and built-in sync [r=mconnor]
Map the modules directory to services-sync instead of weave and update imports.
2010-06-16 14:30:08 -07:00
Edward Lee
f65cfa40d2 Bug 561839 - import PlacesUtils.jsm instead of utils.js [r=mconnor]
Try the new PlacesUtils file before the old utils.js.
2010-05-04 12:14:48 -07:00
Edward Lee
ff3ec7ac67 Bug 559163 - Don't select from slow indexless views for just one item [r=mconnor]
Just select from moz_places instead of _view where data might be slightly stale but good enough.
2010-04-29 14:36:15 -07:00
Edward Lee
ffe2ddb849 Bug 558077 - Bookmark folder and its contents lost under certain conditions of syncing same named folder [r=mconnor]
Mark entries as dupe if they're known to be dupes locally so that receiving ends won't bother looking for dupes for these items.

--HG--
extra : rebase_source : 2623f7ed20160ba445b58f538c3397caa0ef78e3
2010-04-29 14:36:09 -07:00
Edward Lee
be8613110f Bug 437277 - update daily backup before first bookmark sync [r=mconnor]
Share an archiveBookmarks function that wraps the PlacesUtils call to be used from storage.wipe and first sync.
2010-04-21 11:10:32 -07:00
Edward Lee
9dea7f5571 Bug 557503 - bookmark restore from backup and server-wins interact badly [r=mconnor]
Don't resetLastSync as that will make local changes look old and instead mark each as changed now that addChangedID doesn't jsonSave on each call.
2010-04-06 11:59:50 -07:00
Edward Lee
37ec3dd78c Replace tabs in files under source/ with appropriate number of spaces. 2010-04-02 16:37:53 -07:00
Edward Lee
3b4aa0220d Bug 550627 - Default reconciliation to server wins for older changed items [r=mconnor]
Save the time the tracker adds a new changed id and use that to compare the age of the record on the server vs the age of the local change to decide if it's server wins or client wins. Fix up various direct uses of changedIDs to use the API and make the save-to-disk lazy to avoid excessive writes. Add a test to make sure addChangedID only increases in time.
2010-04-01 15:54:53 -07:00
Edward Lee
ab278f01cd Bug 556509 - folders description not synchronised [r=mconnor]
Allow descriptions to be set on folder records and set description on creation.

--HG--
extra : rebase_source : d380f5d28130bd53532e5b4d293468aa053c19b2
2010-04-01 15:11:42 -07:00
Paul O’Shannessy
9aefb399d5 Bug 555015 - JavaScript strict warning: bookmarks.js: undeclared variable record [r=Mardak]
Just make sure the record variable is declared before using it.
2010-03-25 13:58:27 -07:00
Edward Lee
1ce05d4603 Bug 549633 - Standardize record creation so all SyncEngines encrypt data [r=mconnor]
Always add the id and encryption value so client and delete records can be encrypted.
2010-03-05 14:46:48 -08:00
Edward Lee
a9c2e6c4c2 Bug 549632 - Remove storage cache, which is mostly un/incorrectly used [r=mconnor]
Remove incorrectly used cache from some engines and clean up references from SyncEngine.
2010-03-05 14:43:11 -08:00
Edward Lee
1ad29052b7 Bug 545767 - Clean up various names/strings needed for each set of engines/stores/trackers
Pass the engine name when constructing a subclass engine and construct the store/tracker with the same name.
2010-02-11 15:29:15 -08:00
Edward Lee
b8de893593 Bug 545764 - Convert constructor -> _init pattern to just use constructor
Inline various _init calls and do super's init with <Super>.call(this, args..). Add various get/set sugar to those missing e.g., meta.keyring. Also simplify crypto record creation by setting cleartext in the parent.

--HG--
extra : rebase_source : 6c9a9f210f8f46ac338adb84188538e7353c9673
2010-02-11 15:25:31 -08:00
Edward Lee
ed5e098629 Bug 544068 - Assume moved bookmarks should be where they're moved
Don't keep the annotation around in-case the predecessor/parent finally syncs because the user positioned it otherwise.
2010-02-03 15:34:42 -08:00
Edward Lee
39e968e8de Bug 531489 - weave lost bookmarks with same url
Do dupe detection for bookmarks like how we do folders/separators but check against the url/title. Add parentName to bookmark records, so bump version.
2010-01-25 09:33:49 -08:00
Edward Lee
8dfdbe920a Bug 526937 - Bookmarks are re-uploaded when they get visited
Don't mark item as changed on a favicon notification to avoid churn that can result in merge messing up bookmark ordering.
2010-01-19 11:24:00 -08:00
Edward Lee
1213f59b7e Bug 534923 - Only show Mobile Bookmarks if there are mobile bookmarks
Fix up existing users as well as only creating the place query under AllBookmarks if there are mobile bookmarks.
2009-12-15 14:21:13 -08:00
Edward Lee
a48b0da141 Bug 532936 - Add root level node for bookmarks synced from Fennec
Create a mobile root in Firefox and link it to the Library UI as a query that fixes its own title if changed. Mark the mobile root on Firefox/Fennec as special so Weave uses "mobile" for the guid in the record, and items will appear in the appropriate folder.

--HG--
extra : rebase_source : fbd3afa2647204a370f7dacdf9d824e462ebb9b9
2009-12-10 16:12:14 -08:00
Edward Lee
4676b9cb18 Bug 488922 - Treat bookmarks restore specially
Add observers for bookmarks-restore-* and ignore changes during import and trigger a fresh start on success.
2009-12-02 19:20:44 -08:00
Edward Lee
d4295ef8e9 Remove unused prefs and imports. (Bug 524916)
--HG--
extra : rebase_source : 074e542f63ee840b61db7fe63a6c3540c13a31a5
2009-11-25 17:49:15 -08:00
Mike Connor
7e923534c2 archive local bookmarks before wiping
--HG--
extra : rebase_source : dd54af2118cf60c9e4f4b3bf08b7a5c61e9e78b8
2009-11-25 17:09:32 -08:00
Edward Lee
c05e0c5f94 Remove trailing whitespace from the codebase. 2009-11-20 14:34:20 -08:00
Edward Lee
c9efc4abfe Bug 514545 - weave mangles bookmarks
For both folders and separators, use the parent name (not guid) in addition to the item's title/position to determine if it's a dupe. This modifies the bookmark format for folders and separators, so a storage version bump is needed.
2009-11-19 21:34:17 -08:00
Edward Lee
ac2b6c824d Bug 529103 - Removing folders must use removeItem not removeFolder
Switch to Svc.Bookmark.removeItem from this._bms.removeFolder.
2009-11-18 10:24:09 -08:00
Edward Lee
2c1baed50d Remove unwanted info logging for bookmark indices. 2009-11-11 15:20:19 -08:00
Mike Connor
14acb12656 bug 518075 - tweak original patch and item values 2009-11-09 12:57:58 -05:00
Edward Lee
06bb9dbc7d Bug 519139 - Weave freezes the browser for 5-10 secs when starting sync
Correctly remove the separator getter just like for folders to prevent triggering the lazy loader on every sync.
2009-11-04 16:07:05 -08:00
Mike Connor
bcb7b750cb bug 485108 - drop status dialog, show status including engines on statusbar, remove dead status bits 2009-10-28 03:42:35 -04:00
Edward Lee
e5604f6745 Bug 517598 - Put useful interestingness/index values for bookmark
Use places to figure out the frecency of a bookmark and give items (not just bookmarks) a bonus if it's sitting in the toolbar.
2009-10-16 16:19:28 -07:00
Edward Lee
a9a420b1bb Keep the unsorted bookmark folder unsorted and not worry about the ordering. 2009-10-13 16:27:10 -07:00
Dan Mills
5094a04f3d initial patch
--HG--
extra : rebase_source : 250c8f0d85483300147a6f0d691e0214db6d837b
2009-09-15 21:54:05 -04:00
Edward Lee
7556f0c2cd Address review comments nits. r=thunder 2009-09-11 16:44:26 -07:00
Edward Lee
e856402be7 Add some comments to partial download code and remove other comments. 2009-09-11 08:24:42 -07:00
Edward Lee
87de5afcd8 Detect dupe separators by identifying them by their position and generate the lookup lazily with the folder/title mapping for now. 2009-09-08 23:33:58 -07:00
Edward Lee
258a985cee Expose a _handleDupe on engines and provide a custom one for bookmarks that tracks GUID changes so that it can keep an alias mapping to fix incoming item properties (id, parent, predecessor). Move out _reparentOrphans so that it is triggered on update and not just create because folders can change ids to the right parent. 2009-09-08 23:33:15 -07:00
Edward Lee
0e889ae8fb Resolve bookmarks.js merge conflicts switching to batchSync (with trailing comma). 2009-08-31 18:04:40 -07:00
Edward Lee
5a3c53fd6a Merge weave to weave-partial-view w/ conflicts. 2009-08-31 18:03:35 -07:00
Edward Lee
678f177443 Detect dupe folders by title for now. Might need to update the hash during sync if titles are added. 2009-08-31 17:54:21 -07:00
Edward Lee
5e9d07e643 Use places utils to find an existing bookmark dupe for an incoming record. 2009-08-31 17:29:47 -07:00
Edward Lee
5468320159 Convert uses of recordLike/findLikeId to findDupe except Bookmarks is unimplemented. 2009-08-31 17:27:30 -07:00
Edward Lee
c70241b5ce Bug 512457 - Report errors before they get eaten up by runInBatchMode
Save the exception from inside runBatched and not have runInBatchMode return failure, so we can then expose the exception.
2009-08-31 16:28:00 -07:00
Edward Lee
4d055dc574 Bug 506297 - Livemarks with null site/feed uris cause sync to fail
It's possible for livemarks to not have a siteURI, so don't assume it to be there.

--HG--
extra : rebase_source : 870bb41c980834ef3e5f302739d20adfed6f7f8d
2009-08-26 14:22:11 -07:00
Edward Lee
dfe8e7e513 Don't include changes to special places Library "exclude from backup" items. 2009-08-25 16:15:05 -07:00
Edward Lee
ca002d3239 Create records with the correct parent/pred if it's still waiting for them to sync. 2009-08-24 16:17:59 -07:00
Edward Lee
c4393b5e3b Handle holes in bookmark folders and fix up bookmarks to be at an earlier position if a hole was detected. 2009-08-19 19:32:05 -07:00
Edward Lee
87f47c35a6 Attach followers for both created items and updated items (call from applyIncoming) when it's under the right parent. Share logic for attaching followers when creating a folder then fixing the reparented children and when creating/updating an item in the right parent. 2009-08-18 18:42:15 -07:00
Edward Lee
fae8b93210 Add the successor ids when adding/removing items as well as both old and new successors when moving. 2009-08-18 18:39:10 -07:00
Edward Lee
b264174b42 When updating the position of an item, move all of its followers with it. Share chain moving logic used for fixing followers on create and updating positions. 2009-08-18 18:36:31 -07:00
Edward Lee
0435aca087 For items that have the correct parent, see if there's an item following it and reposition the chain of items to after the correct parented item. A chain of followers starts at the item with the predecessor annotation and goes until the end of the folder, an item that is looking for a predecessor, or ends up at where we started (the predecessor). 2009-08-17 02:34:03 -07:00