summaryrefslogtreecommitdiffstats
path: root/sync/internal_api/change_reorder_buffer.h
Commit message (Collapse)AuthorAgeFilesLines
* sync: Reduce work done to process bookmark changesrlarocque@chromium.org2013-06-151-58/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ChangeReorderBuffer and BookmarkChangeProcessor collaborate to handle bookmark-specific ordering and hierarchy requirements. With a bit of help from the directory and some changes to these classes, we can achieve the same effect as before with less work. Prior to this CL, the BookmarkChangeProcessor would apply a position-affecting from sync to the bookmark model by updating all siblings of the position change in left to right order. The idea was to have all the predecessors of the modified item in sync before applying the change. The ChangeReorderBuffer helps out by manufacturing fake changes for siblings of position changes, and delivering them all to the BookmarkChangeProcessor in syncable::Directory left-to-right order. This CL works solves the issue by splitting the work up into two separate passes. On the first pass, any modified nodes are moved to the far right within their parent folder. The second pass iterates over these modified items in syncable::Directory left-to-right position order, and moves them to the proper index in the bookmark model. This has the same effect as the earlier algorithm: all predecessors are synced at the time of the final move operation. This should be much cheaper than modifying all the siblings of a position change. This new algorithm also allows us to remove lots of sibling ordering requirements from the ChangeReorderBuffer and related functions, since the BookmarkChangeProcessor no longer requires its changes to be delivered in sibling order. It also no longer needs to manufacture fake changes for siblings of position changes. This CL also includes a few cosmetic changes to the BookmarkChangeProcessor. BUG=123429 Review URL: https://chromiumcodereview.appspot.com/16507010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206572 0039d316-1c4b-4281-b951-d872f2087c98
* Remove #pragma once from syncajwong@chromium.org2012-07-111-1/+0
| | | | | | Review URL: https://chromiumcodereview.appspot.com/10700154 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146074 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Rename csync namespace to syncerakalin@chromium.org2012-06-281-2/+2
| | | | | | | | | | | | | | | Everyone was confused by 'csync'. 'syncer' seems more understandable. (Note that we can't use the 'sync' namespace since sync() is a function from unistd.h.) BUG=10662035 TEST= TBR=jhawkins@chromium.org,pkasting@chromium.org Review URL: https://chromiumcodereview.appspot.com/10698014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144820 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Rename sync_api to csyncakalin@chromium.org2012-06-221-2/+2
| | | | | | | | | | BUG=128060 TEST= Review URL: https://chromiumcodereview.appspot.com/10601002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143557 0039d316-1c4b-4281-b951-d872f2087c98
* sync: move internal_api components used by chrome/browser into ↵tim@chromium.org2012-06-171-2/+2
| | | | | | | | | | | | | | internal_api/public TBR=jhawkins@chromium.org BUG=131130 TEST= Review URL: https://chromiumcodereview.appspot.com/10534080 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142626 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Move 'syncapi_core' and 'sync_unit_tests' targets to sync/akalin@chromium.org2012-04-211-0/+124
Also move related test files. Lock down deps for sync/internal_api. Clean up some deps on chrome/browser/sync. BUG=117585 TEST= Review URL: https://chromiumcodereview.appspot.com/10147003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133349 0039d316-1c4b-4281-b951-d872f2087c98