summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/engine/syncer_thread2.cc
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-27 18:51:01 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-27 18:51:01 +0000
commitd2f05d07a90cf5c5bad814b603175acaefa254b5 (patch)
tree8e5e8d7724b8b505d418ea01277bc3f305d16182 /chrome/browser/sync/engine/syncer_thread2.cc
parentc3dd6dad0308d941cad3d9e72787177875d065b6 (diff)
downloadchromium_src-d2f05d07a90cf5c5bad814b603175acaefa254b5.zip
chromium_src-d2f05d07a90cf5c5bad814b603175acaefa254b5.tar.gz
chromium_src-d2f05d07a90cf5c5bad814b603175acaefa254b5.tar.bz2
Part 1 of repairing regressions to my old clang check plugins so Nico can
deploy the clang plugins to the waterfall/trybots. BUG=none TEST=compiles Review URL: http://codereview.chromium.org/6366019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72846 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/engine/syncer_thread2.cc')
-rw-r--r--chrome/browser/sync/engine/syncer_thread2.cc20
1 files changed, 20 insertions, 0 deletions
diff --git a/chrome/browser/sync/engine/syncer_thread2.cc b/chrome/browser/sync/engine/syncer_thread2.cc
index dfb9b95..c53ea15 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() {}