diff options
author | maniscalco <maniscalco@chromium.org> | 2014-09-10 11:30:23 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-10 18:36:37 +0000 |
commit | c51cb78e34848822057a669f3ed1b69b7b2bd266 (patch) | |
tree | 8e26b3ff1d8909214f08e49c016b1c66f9dcba92 /components | |
parent | 6b339cc6b4c812c198db0311f70ac3fa133b5dcf (diff) | |
download | chromium_src-c51cb78e34848822057a669f3ed1b69b7b2bd266.zip chromium_src-c51cb78e34848822057a669f3ed1b69b7b2bd266.tar.gz chromium_src-c51cb78e34848822057a669f3ed1b69b7b2bd266.tar.bz2 |
Update AttachmentServiceImpl to retry attachment uploads.
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}
Diffstat (limited to 'components')
-rw-r--r-- | components/sync_driver/generic_change_processor_unittest.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/components/sync_driver/generic_change_processor_unittest.cc b/components/sync_driver/generic_change_processor_unittest.cc index 73bd92d..9ea4e43 100644 --- a/components/sync_driver/generic_change_processor_unittest.cc +++ b/components/sync_driver/generic_change_processor_unittest.cc @@ -56,7 +56,9 @@ MockAttachmentService::MockAttachmentService( new syncer::FakeAttachmentUploader), scoped_ptr<syncer::AttachmentDownloader>( new syncer::FakeAttachmentDownloader), - NULL) { + NULL, + base::TimeDelta(), + base::TimeDelta()) { } MockAttachmentService::~MockAttachmentService() { |