OLD | NEW |
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 #ifndef SYNC_ENGINE_SYNC_SCHEDULER_IMPL_H_ | 5 #ifndef SYNC_ENGINE_SYNC_SCHEDULER_IMPL_H_ |
6 #define SYNC_ENGINE_SYNC_SCHEDULER_IMPL_H_ | 6 #define SYNC_ENGINE_SYNC_SCHEDULER_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 FRIEND_TEST_ALL_PREFIXES(SyncSchedulerWhiteboxTest, | 104 FRIEND_TEST_ALL_PREFIXES(SyncSchedulerWhiteboxTest, |
105 SaveConfigurationWhileThrottled); | 105 SaveConfigurationWhileThrottled); |
106 FRIEND_TEST_ALL_PREFIXES(SyncSchedulerWhiteboxTest, | 106 FRIEND_TEST_ALL_PREFIXES(SyncSchedulerWhiteboxTest, |
107 SaveNudgeWhileThrottled); | 107 SaveNudgeWhileThrottled); |
108 FRIEND_TEST_ALL_PREFIXES(SyncSchedulerWhiteboxTest, | 108 FRIEND_TEST_ALL_PREFIXES(SyncSchedulerWhiteboxTest, |
109 ContinueCanaryJobConfig); | 109 ContinueCanaryJobConfig); |
110 FRIEND_TEST_ALL_PREFIXES(SyncSchedulerWhiteboxTest, | 110 FRIEND_TEST_ALL_PREFIXES(SyncSchedulerWhiteboxTest, |
111 ContinueNudgeWhileExponentialBackOff); | 111 ContinueNudgeWhileExponentialBackOff); |
112 FRIEND_TEST_ALL_PREFIXES(SyncSchedulerTest, TransientPollFailure); | 112 FRIEND_TEST_ALL_PREFIXES(SyncSchedulerTest, TransientPollFailure); |
113 FRIEND_TEST_ALL_PREFIXES(SyncSchedulerTest, GetInitialBackoffDelay); | 113 FRIEND_TEST_ALL_PREFIXES(SyncSchedulerTest, GetInitialBackoffDelay); |
| 114 FRIEND_TEST_ALL_PREFIXES(SyncSchedulerTest, |
| 115 ServerConnectionChangeDuringBackoff); |
114 | 116 |
115 struct WaitInterval { | 117 struct WaitInterval { |
116 enum Mode { | 118 enum Mode { |
117 // Uninitialized state, should not be set in practice. | 119 // Uninitialized state, should not be set in practice. |
118 UNKNOWN = -1, | 120 UNKNOWN = -1, |
119 // A wait interval whose duration has been affected by exponential | 121 // A wait interval whose duration has been affected by exponential |
120 // backoff. | 122 // backoff. |
121 // EXPONENTIAL_BACKOFF intervals are nudge-rate limited to 1 per interval. | 123 // EXPONENTIAL_BACKOFF intervals are nudge-rate limited to 1 per interval. |
122 EXPONENTIAL_BACKOFF, | 124 EXPONENTIAL_BACKOFF, |
123 // A server-initiated throttled interval. We do not allow any syncing | 125 // A server-initiated throttled interval. We do not allow any syncing |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 // take place during a sync cycle. We call this out because such violations | 326 // take place during a sync cycle. We call this out because such violations |
325 // could result in tight sync loops hitting sync servers. | 327 // could result in tight sync loops hitting sync servers. |
326 bool no_scheduling_allowed_; | 328 bool no_scheduling_allowed_; |
327 | 329 |
328 DISALLOW_COPY_AND_ASSIGN(SyncSchedulerImpl); | 330 DISALLOW_COPY_AND_ASSIGN(SyncSchedulerImpl); |
329 }; | 331 }; |
330 | 332 |
331 } // namespace syncer | 333 } // namespace syncer |
332 | 334 |
333 #endif // SYNC_ENGINE_SYNC_SCHEDULER_IMPL_H_ | 335 #endif // SYNC_ENGINE_SYNC_SCHEDULER_IMPL_H_ |
OLD | NEW |