• Mohamed Amir Yosef's avatar
    [Sync::USS] Reorder bookmark remote updates before processing them · a0aa7ae8
    Mohamed Amir Yosef authored
    There are no order guarantees in the remote updates received from
    the server.
    However, for hierarchical types such as bookmarks, it's important
    to process updates in the correct order.
    For example parent node creation should happen before child node
    creation.
    
    This CL implements the following reordering rules for bookmark
    remote updates in USS.
    1. Creations and updates come before deletions.
    2. Parent creation/update should come before child creation/update.
    3. No need to further order deletions. Parent deletions can
       happen before child deletions. This is safe because all updates
       (e.g. moves) should have been processed already.
    
    Bug: 516866
    Change-Id: I059224b897ea51a4a0321124b082e76be824d28f
    Reviewed-on: https://chromium-review.googlesource.com/1141870
    Commit-Queue: Mohamed Amir Yosef <mamir@chromium.org>
    Reviewed-by: default avatarMikel Astiz <mastiz@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#577232}
    a0aa7ae8
synced_bookmark_tracker_unittest.cc 14.3 KB