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

Side by Side Diff: sync/engine/sync_scheduler_impl.h

Issue 11341030: sync: reland scheduler ownership refactoring, now with less crash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update Created 8 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | sync/engine/sync_scheduler_impl.cc » ('j') | sync/engine/sync_scheduler_impl.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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
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
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_
OLDNEW
« no previous file with comments | « no previous file | sync/engine/sync_scheduler_impl.cc » ('j') | sync/engine/sync_scheduler_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698