• Mohamed Amir Yosef's avatar
    [Sync::USS] Refactor BookmarkModelTypeProcessor · 78025162
    Mohamed Amir Yosef authored
    This CL extracts the logics for handling remote updates and committing
    local updates into BookmarkRemoteUpdatesHandler and
    BookmarkLocalChangesBuilder respectively.
    
    This is to simplfy the BookmarkModelTypeProcessor.
    
    Before this CL: processor scheduled metadata save only if there is a
    change in the metadata without change in the model, because the model
    would trigger the save in such cases.
    
    After this CL: processor schedules metadata save every time  remote
    updates are processed regardless from they entailed a change in the
    model or not. This simplifies the code, and the bookmark storage
    should squash subsequent save requests, so consecutive save requests
    from the model and the processor should result in only one actually
    save on disk.
    
    
    Bug: 516866
    Change-Id: I7918086b31b11f7a72804b152f23af2b059cca3d
    Reviewed-on: https://chromium-review.googlesource.com/1124854
    Commit-Queue: Mohamed Amir Yosef <mamir@chromium.org>
    Reviewed-by: default avatarMikel Astiz <mastiz@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#572514}
    78025162
bookmark_remote_updates_handler.cc 14.5 KB