| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // Takes note of a local change. | 55 // Takes note of a local change. |
| 56 void RecordLocalChange(ModelTypeSet types); | 56 void RecordLocalChange(ModelTypeSet types); |
| 57 | 57 |
| 58 // Takes note of a locally issued request to refresh a data type. | 58 // Takes note of a locally issued request to refresh a data type. |
| 59 void RecordLocalRefreshRequest(ModelTypeSet types); | 59 void RecordLocalRefreshRequest(ModelTypeSet types); |
| 60 | 60 |
| 61 // Takes note of the receipt of an invalidation notice from the server. | 61 // Takes note of the receipt of an invalidation notice from the server. |
| 62 void RecordRemoteInvalidation(syncer::ModelType type, | 62 void RecordRemoteInvalidation(syncer::ModelType type, |
| 63 scoped_ptr<InvalidationInterface> invalidation); | 63 scoped_ptr<InvalidationInterface> invalidation); |
| 64 | 64 |
| 65 // Take note that an initial sync is pending for this type. |
| 66 void RecordInitialSyncRequired(syncer::ModelType type); |
| 67 |
| 65 // These functions should be called to keep this class informed of the status | 68 // These functions should be called to keep this class informed of the status |
| 66 // of the connection to the invalidations server. | 69 // of the connection to the invalidations server. |
| 67 void OnInvalidationsEnabled(); | 70 void OnInvalidationsEnabled(); |
| 68 void OnInvalidationsDisabled(); | 71 void OnInvalidationsDisabled(); |
| 69 | 72 |
| 70 // Marks |types| as being throttled from |now| until |now| + |length|. | 73 // Marks |types| as being throttled from |now| until |now| + |length|. |
| 71 void SetTypesThrottledUntil(ModelTypeSet types, | 74 void SetTypesThrottledUntil(ModelTypeSet types, |
| 72 base::TimeDelta length, | 75 base::TimeDelta length, |
| 73 base::TimeTicks now); | 76 base::TimeTicks now); |
| 74 | 77 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 // currently in a sync cycle. | 186 // currently in a sync cycle. |
| 184 base::TimeTicks sync_cycle_start_time_; | 187 base::TimeTicks sync_cycle_start_time_; |
| 185 | 188 |
| 186 DISALLOW_COPY_AND_ASSIGN(NudgeTracker); | 189 DISALLOW_COPY_AND_ASSIGN(NudgeTracker); |
| 187 }; | 190 }; |
| 188 | 191 |
| 189 } // namespace sessions | 192 } // namespace sessions |
| 190 } // namespace syncer | 193 } // namespace syncer |
| 191 | 194 |
| 192 #endif // SYNC_SESSIONS_NUDGE_TRACKER_H_ | 195 #endif // SYNC_SESSIONS_NUDGE_TRACKER_H_ |
| OLD | NEW |