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

Side by Side Diff: sync/internal_api/public/engine/polling_constants.cc

Issue 1545553003: Switch to standard integer types in sync/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/basictypes.h" 5 #include <stdint.h>
6
6 #include "sync/internal_api/public/engine/polling_constants.h" 7 #include "sync/internal_api/public/engine/polling_constants.h"
7 8
8 namespace syncer { 9 namespace syncer {
9 10
10 // Server can overwrite these values via client commands. 11 // Server can overwrite these values via client commands.
11 // Standard short poll. This is used when XMPP is off. 12 // Standard short poll. This is used when XMPP is off.
12 // We use high values here to ensure that failure to receive poll updates from 13 // We use high values here to ensure that failure to receive poll updates from
13 // the server doesn't result in rapid-fire polling from the client due to low 14 // the server doesn't result in rapid-fire polling from the client due to low
14 // local limits. 15 // local limits.
15 const int64 kDefaultShortPollIntervalSeconds = 3600 * 8; 16 const int64_t kDefaultShortPollIntervalSeconds = 3600 * 8;
16 // Long poll is used when XMPP is on. 17 // Long poll is used when XMPP is on.
17 const int64 kDefaultLongPollIntervalSeconds = 3600 * 12; 18 const int64_t kDefaultLongPollIntervalSeconds = 3600 * 12;
18 19
19 // Maximum interval for exponential backoff. 20 // Maximum interval for exponential backoff.
20 const int64 kMaxBackoffSeconds = 60 * 10; // 10 minutes. 21 const int64_t kMaxBackoffSeconds = 60 * 10; // 10 minutes.
21 22
22 // Backoff interval randomization factor. 23 // Backoff interval randomization factor.
23 const int kBackoffRandomizationFactor = 2; 24 const int kBackoffRandomizationFactor = 2;
24 25
25 // After a failure contacting sync servers, specifies how long to wait before 26 // After a failure contacting sync servers, specifies how long to wait before
26 // reattempting and entering exponential backoff if consecutive failures 27 // reattempting and entering exponential backoff if consecutive failures
27 // occur. 28 // occur.
28 const int kInitialBackoffRetrySeconds = 30; // 30 seconds. 29 const int kInitialBackoffRetrySeconds = 30; // 30 seconds.
29 30
30 // A dangerously short retry value that would not actually protect servers from 31 // A dangerously short retry value that would not actually protect servers from
31 // DDoS if it were used as a seed for exponential backoff, although the client 32 // DDoS if it were used as a seed for exponential backoff, although the client
32 // would still follow exponential backoff. Useful for debugging and tests (when 33 // would still follow exponential backoff. Useful for debugging and tests (when
33 // you don't want to wait 5 minutes). 34 // you don't want to wait 5 minutes).
34 const int kInitialBackoffShortRetrySeconds = 1; 35 const int kInitialBackoffShortRetrySeconds = 1;
35 36
36 // Similar to kInitialBackoffRetrySeconds above, but only to be used in 37 // Similar to kInitialBackoffRetrySeconds above, but only to be used in
37 // certain exceptional error cases, such as MIGRATION_DONE. 38 // certain exceptional error cases, such as MIGRATION_DONE.
38 const int kInitialBackoffImmediateRetrySeconds = 0; 39 const int kInitialBackoffImmediateRetrySeconds = 0;
39 40
40 } // namespace syncer 41 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/internal_api/public/engine/polling_constants.h ('k') | sync/internal_api/public/events/clear_server_data_request_event.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698