summaryrefslogtreecommitdiffstats
path: root/sync/internal_api/public/engine/polling_constants.cc
diff options
context:
space:
mode:
authortim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-07 17:50:19 +0000
committertim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-07 17:50:19 +0000
commit3f8556a0cf934ee6e2e4a37b22b05dbf0a9c4a90 (patch)
treedcb6050b16ce934a4102da5ac7f2d501ceb4e988 /sync/internal_api/public/engine/polling_constants.cc
parent03c1007443b4be55364755441c83a66ec12cff81 (diff)
downloadchromium_src-3f8556a0cf934ee6e2e4a37b22b05dbf0a9c4a90.zip
chromium_src-3f8556a0cf934ee6e2e4a37b22b05dbf0a9c4a90.tar.gz
chromium_src-3f8556a0cf934ee6e2e4a37b22b05dbf0a9c4a90.tar.bz2
sync: create internal_api/public to house sync/ files needed by chrome/browser/sync.
Note on sync.gyp changes and .cc file moves: most files in /public have .h and their .cc side by side, as they are simple implementations. In some cases like model_type.cc (and others in a follow up patch, like sync_manager.cc) have only their header exposed in /public while the impl stays behind, because it needs to include things from within sync/, and /public has a strict include DEPS policy. This is in accordance with other /public folders (like content/). Cleans up DEPS files in sync + c/b/sync. Adds sync/{engine, sessions, syncable} to public/. There is more to come (moving things in internal_api/ into public). Not touching /notifier as that is in flux at the moment. BUG=131130 TEST= Review URL: https://chromiumcodereview.appspot.com/10532019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141038 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/internal_api/public/engine/polling_constants.cc')
-rw-r--r--sync/internal_api/public/engine/polling_constants.cc26
1 files changed, 26 insertions, 0 deletions
diff --git a/sync/internal_api/public/engine/polling_constants.cc b/sync/internal_api/public/engine/polling_constants.cc
new file mode 100644
index 0000000..d7fe753
--- /dev/null
+++ b/sync/internal_api/public/engine/polling_constants.cc
@@ -0,0 +1,26 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/basictypes.h"
+#include "sync/internal_api/public/engine/polling_constants.h"
+
+namespace browser_sync {
+
+// Server can overwrite these values via client commands.
+// Standard short poll. This is used when XMPP is off.
+// We use high values here to ensure that failure to receive poll updates from
+// the server doesn't result in rapid-fire polling from the client due to low
+// local limits.
+const int64 kDefaultShortPollIntervalSeconds = 3600 * 8;
+// Long poll is used when XMPP is on.
+const int64 kDefaultLongPollIntervalSeconds = 3600 * 12;
+
+// Maximum interval for exponential backoff.
+const int64 kMaxBackoffSeconds = 60 * 60 * 4; // 4 hours.
+
+// Backoff interval randomization factor.
+const int kBackoffRandomizationFactor = 2;
+
+} // namespace browser_sync
+