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

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: Merge with master. 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
« no previous file with comments | « no previous file | components/sync_driver/generic_change_processor_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 09b2d08de440bac17bcec3051c4c1143ec90d194..d68f582c38fc67b39096ef5ad1340147ed3232c2 100644
--- a/chrome/browser/sync/profile_sync_components_factory_impl.cc
+++ b/chrome/browser/sync/profile_sync_components_factory_impl.cc
@@ -630,12 +630,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,
attachment_uploader.Pass(),
attachment_downloader.Pass(),
- delegate));
-
+ delegate,
+ initial_backoff_delay,
+ max_backoff_delay));
return attachment_service.Pass();
}
« no previous file with comments | « no previous file | components/sync_driver/generic_change_processor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698