DescriptionKeep sync tasks alive as long as it's not finished
After this change, sync tasks are erased only when it completes or SyncClient gives up.
This change is preparation for implementing a mechanism to allow CopyOperation to wait for a specific sync task to complete.
In EntryUpdatePerformer:
Add a new error code FILE_ERROR_PARENT_NEEDS_TO_BE_SYNCED.
Return the new error code when the sync task cannot be completed because of the lack of the parent resource ID.
In SyncClient:
Add a new task state SUSPENDED to allow tasks to be in an inactive state.
Add a new member |context| to SyncTask to make it possible to change the context without erasing the task.
OnTaskComplete() takes almost all responsibilities to handle errors. OnFetchFileComplete() and OnUpdateCompleter() are now almost empty or removed.
Handle the new error code FILE_ERROR_PARENT_NEEDS_TO_BE_SYNCED in OnTaskComplete().
BUG=384213
TEST=unit_tests
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=284051
Patch Set 1 : #
Total comments: 3
Patch Set 2 : rebase #Patch Set 3 : Return the parent's ID from EntryUpdatePerformer #Patch Set 4 : Check in SyncClient #
Messages
Total messages: 8 (0 generated)
|