Chromium Code Reviews| 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 16 matching lines...) Expand all Loading... | |
| 27 static size_t kDefaultMaxPayloadsPerType; | 27 static size_t kDefaultMaxPayloadsPerType; |
| 28 | 28 |
| 29 NudgeTracker(); | 29 NudgeTracker(); |
| 30 ~NudgeTracker(); | 30 ~NudgeTracker(); |
| 31 | 31 |
| 32 // Returns true if there is a good reason for performing a sync cycle. | 32 // Returns true if there is a good reason for performing a sync cycle. |
| 33 // This does not take into account whether or not this is a good *time* to | 33 // This does not take into account whether or not this is a good *time* to |
| 34 // perform a sync cycle; that's the scheduler's job. | 34 // perform a sync cycle; that's the scheduler's job. |
| 35 bool IsSyncRequired() const; | 35 bool IsSyncRequired() const; |
| 36 | 36 |
| 37 // Returns true if there is a good reason for performan a get updates | |
|
Nicolas Zea
2013/07/16 00:24:32
performan -> performing
rlarocque
2013/07/16 01:08:27
Done.
| |
| 38 // request as part of the next sync cycle. | |
| 39 bool IsGetUpdatesRequired() const; | |
| 40 | |
| 37 // Tells this class that all required update fetching and committing has | 41 // Tells this class that all required update fetching and committing has |
| 38 // completed successfully. | 42 // completed successfully. |
| 39 void RecordSuccessfulSyncCycle(); | 43 void RecordSuccessfulSyncCycle(); |
| 40 | 44 |
| 41 // Takes note of a local change. | 45 // Takes note of a local change. |
| 42 void RecordLocalChange(ModelTypeSet types); | 46 void RecordLocalChange(ModelTypeSet types); |
| 43 | 47 |
| 44 // Takes note of a locally issued request to refresh a data type. | 48 // Takes note of a locally issued request to refresh a data type. |
| 45 void RecordLocalRefreshRequest(ModelTypeSet types); | 49 void RecordLocalRefreshRequest(ModelTypeSet types); |
| 46 | 50 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 130 | 134 |
| 131 size_t num_payloads_per_type_; | 135 size_t num_payloads_per_type_; |
| 132 | 136 |
| 133 DISALLOW_COPY_AND_ASSIGN(NudgeTracker); | 137 DISALLOW_COPY_AND_ASSIGN(NudgeTracker); |
| 134 }; | 138 }; |
| 135 | 139 |
| 136 } // namespace sessions | 140 } // namespace sessions |
| 137 } // namespace syncer | 141 } // namespace syncer |
| 138 | 142 |
| 139 #endif // SYNC_SESSIONS_NUDGE_TRACKER_H_ | 143 #endif // SYNC_SESSIONS_NUDGE_TRACKER_H_ |
| OLD | NEW |