Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(305)

Unified Diff: chrome/browser/sync/profile_sync_components_factory_impl.cc

Issue 554743004: Update AttachmentServiceImpl to retry attachment uploads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Check ShouldDispatch in Dispatch. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/profile_sync_components_factory_impl.cc
diff --git a/chrome/browser/sync/profile_sync_components_factory_impl.cc b/chrome/browser/sync/profile_sync_components_factory_impl.cc
index b0881df0948a05013780f4b8d5554af81cedb48f..628fdd58e27d09b30c34519a05b37b83b58653be 100644
--- a/chrome/browser/sync/profile_sync_components_factory_impl.cc
+++ b/chrome/browser/sync/profile_sync_components_factory_impl.cc
@@ -636,12 +636,20 @@ ProfileSyncComponentsFactoryImpl::CreateAttachmentService(
token_service_provider);
}
+ // It is important that the initial backoff delay is relatively large. For
+ // whatever reason, the server may fail all requests for a short period of
+ // time. When this happens we don't want to overwhelm the server with
+ // requests so we use a large initial backoff.
+ const base::TimeDelta initial_backoff_delay =
+ base::TimeDelta::FromMinutes(30);
+ const base::TimeDelta max_backoff_delay = base::TimeDelta::FromHours(4);
scoped_ptr<syncer::AttachmentService> attachment_service(
new syncer::AttachmentServiceImpl(attachment_store.Pass(),
attachment_uploader.Pass(),
attachment_downloader.Pass(),
- delegate));
-
+ delegate,
+ initial_backoff_delay,
+ max_backoff_delay));
return attachment_service.Pass();
}

Powered by Google App Engine
This is Rietveld 408576698