• maniscalco's avatar
    Update AttachmentServiceImpl to retry attachment uploads. · c51cb78e
    maniscalco authored
    Add TaskQueue, a class that provides retry and backoff semantics for
    tasks.  Used by AttachmentServiceImpl.
    
    AttachmentUploaderImpl and AttachmentDownloaderImpl now differentiate
    between transient and non-transient errors.  Almost all errors are
    assumed to be transient.  "403 Forbidden" is the exception and is
    returned by the sync server if attachment are disabled for the user.
    
    Transient errors encountered during attachment upload will be retried
    with exponential backoff (using TaskQueue and BackoffEntry).  The idea
    is to consolidate retry logic at the AttachmentServiceImpl level.
    
    In a future CL, changes in network connectivity will affect retry and
    backoff.
    
    BUG=372622, 380437
    
    Review URL: https://codereview.chromium.org/554743004
    
    Cr-Commit-Position: refs/heads/master@{#294195}
    c51cb78e
attachment_downloader_impl_unittest.cc 12.9 KB