OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 // A class to track the outstanding work required to bring the client back into | 5 // A class to track the outstanding work required to bring the client back into |
6 // sync with the server. | 6 // sync with the server. |
7 #ifndef SYNC_SESSIONS_NUDGE_TRACKER_H_ | 7 #ifndef SYNC_SESSIONS_NUDGE_TRACKER_H_ |
8 #define SYNC_SESSIONS_NUDGE_TRACKER_H_ | 8 #define SYNC_SESSIONS_NUDGE_TRACKER_H_ |
9 | 9 |
10 #include <list> | 10 #include <list> |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 | 63 |
64 // Takes note of the receipt of an invalidation notice from the server. | 64 // Takes note of the receipt of an invalidation notice from the server. |
65 // Returns the current nudge delay for a remote invalidation. | 65 // Returns the current nudge delay for a remote invalidation. |
66 base::TimeDelta RecordRemoteInvalidation( | 66 base::TimeDelta RecordRemoteInvalidation( |
67 syncer::ModelType type, | 67 syncer::ModelType type, |
68 scoped_ptr<InvalidationInterface> invalidation); | 68 scoped_ptr<InvalidationInterface> invalidation); |
69 | 69 |
70 // Take note that an initial sync is pending for this type. | 70 // Take note that an initial sync is pending for this type. |
71 void RecordInitialSyncRequired(syncer::ModelType type); | 71 void RecordInitialSyncRequired(syncer::ModelType type); |
72 | 72 |
| 73 // Takes note that the conflict happended for this type, need to sync to |
| 74 // resolve conflict locally. |
| 75 void RecordCommitConflict(syncer::ModelType type); |
| 76 |
73 // These functions should be called to keep this class informed of the status | 77 // These functions should be called to keep this class informed of the status |
74 // of the connection to the invalidations server. | 78 // of the connection to the invalidations server. |
75 void OnInvalidationsEnabled(); | 79 void OnInvalidationsEnabled(); |
76 void OnInvalidationsDisabled(); | 80 void OnInvalidationsDisabled(); |
77 | 81 |
78 // Marks |types| as being throttled from |now| until |now| + |length|. | 82 // Marks |types| as being throttled from |now| until |now| + |length|. |
79 void SetTypesThrottledUntil(ModelTypeSet types, | 83 void SetTypesThrottledUntil(ModelTypeSet types, |
80 base::TimeDelta length, | 84 base::TimeDelta length, |
81 base::TimeTicks now); | 85 base::TimeTicks now); |
82 | 86 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 base::TimeDelta local_refresh_nudge_delay_; | 201 base::TimeDelta local_refresh_nudge_delay_; |
198 base::TimeDelta remote_invalidation_nudge_delay_; | 202 base::TimeDelta remote_invalidation_nudge_delay_; |
199 | 203 |
200 DISALLOW_COPY_AND_ASSIGN(NudgeTracker); | 204 DISALLOW_COPY_AND_ASSIGN(NudgeTracker); |
201 }; | 205 }; |
202 | 206 |
203 } // namespace sessions | 207 } // namespace sessions |
204 } // namespace syncer | 208 } // namespace syncer |
205 | 209 |
206 #endif // SYNC_SESSIONS_NUDGE_TRACKER_H_ | 210 #endif // SYNC_SESSIONS_NUDGE_TRACKER_H_ |
OLD | NEW |