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

Unified Diff: chrome/browser/sync/engine/syncer_thread2.cc

Issue 6366019: Part 1 of repairing regressions to my old clang check plugins so Nico can (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove Nico's changes that I patched in for testing. Created 9 years, 11 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/engine/syncer_thread2.cc
diff --git a/chrome/browser/sync/engine/syncer_thread2.cc b/chrome/browser/sync/engine/syncer_thread2.cc
index dfb9b95dd23540443d15e8f8c4d2956979c38a11..c53ea15a220cbb9e1ed64286de4c1c58cba18987 100644
--- a/chrome/browser/sync/engine/syncer_thread2.cc
+++ b/chrome/browser/sync/engine/syncer_thread2.cc
@@ -22,6 +22,26 @@ using sync_pb::GetUpdatesCallerInfo;
namespace s3 {
+struct SyncerThread::WaitInterval {
+ enum Mode {
+ // A wait interval whose duration has been affected by exponential
+ // backoff.
+ // EXPONENTIAL_BACKOFF intervals are nudge-rate limited to 1 per interval.
+ EXPONENTIAL_BACKOFF,
+ // A server-initiated throttled interval. We do not allow any syncing
+ // during such an interval.
+ THROTTLED,
+ };
+ Mode mode;
+
+ // This bool is set to true if we have observed a nudge during this
+ // interval and mode == EXPONENTIAL_BACKOFF.
+ bool had_nudge;
+ base::TimeDelta length;
+ base::OneShotTimer<SyncerThread> timer;
+ WaitInterval(Mode mode, base::TimeDelta length);
+};
+
SyncerThread::DelayProvider::DelayProvider() {}
SyncerThread::DelayProvider::~DelayProvider() {}

Powered by Google App Engine
This is Rietveld 408576698