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 per-type scheduling data. | 5 // A class to track the per-type scheduling data. |
6 #ifndef SYNC_SESSIONS_DATA_TYPE_TRACKER_H_ | 6 #ifndef SYNC_SESSIONS_DATA_TYPE_TRACKER_H_ |
7 #define SYNC_SESSIONS_DATA_TYPE_TRACKER_H_ | 7 #define SYNC_SESSIONS_DATA_TYPE_TRACKER_H_ |
8 | 8 |
9 #include <deque> | 9 #include <deque> |
10 #include <string> | 10 #include <string> |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 // part of the next sync cycle. | 60 // part of the next sync cycle. |
61 bool IsGetUpdatesRequired() const; | 61 bool IsGetUpdatesRequired() const; |
62 | 62 |
63 // Returns true if there is an uncommitted local change. | 63 // Returns true if there is an uncommitted local change. |
64 bool HasLocalChangePending() const; | 64 bool HasLocalChangePending() const; |
65 | 65 |
66 // Returns true if we've received an invalidation since we last fetched | 66 // Returns true if we've received an invalidation since we last fetched |
67 // updates. | 67 // updates. |
68 bool HasPendingInvalidation() const; | 68 bool HasPendingInvalidation() const; |
69 | 69 |
| 70 // Returns true if an explicit refresh request is still outstanding. |
| 71 bool HasRefreshRequestPending() const; |
| 72 |
70 // Fills in the legacy invalidaiton payload information fields. | 73 // Fills in the legacy invalidaiton payload information fields. |
71 void SetLegacyNotificationHint( | 74 void SetLegacyNotificationHint( |
72 sync_pb::DataTypeProgressMarker* progress) const; | 75 sync_pb::DataTypeProgressMarker* progress) const; |
73 | 76 |
74 // Fills some type-specific contents of a GetUpdates request protobuf. These | 77 // Fills some type-specific contents of a GetUpdates request protobuf. These |
75 // messages provide the server with the information it needs to decide how to | 78 // messages provide the server with the information it needs to decide how to |
76 // handle a request. | 79 // handle a request. |
77 void FillGetUpdatesTriggersMessage(sync_pb::GetUpdateTriggers* msg) const; | 80 void FillGetUpdatesTriggersMessage(sync_pb::GetUpdateTriggers* msg) const; |
78 | 81 |
79 // Returns true if the type is currently throttled. | 82 // Returns true if the type is currently throttled. |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 base::TimeTicks unthrottle_time_; | 114 base::TimeTicks unthrottle_time_; |
112 | 115 |
113 // A helper to keep track invalidations we dropped due to overflow. | 116 // A helper to keep track invalidations we dropped due to overflow. |
114 DroppedInvalidationTracker drop_tracker_; | 117 DroppedInvalidationTracker drop_tracker_; |
115 }; | 118 }; |
116 | 119 |
117 } // namespace syncer | 120 } // namespace syncer |
118 } // namespace sessions | 121 } // namespace sessions |
119 | 122 |
120 #endif // SYNC_SESSIONS_DATA_TYPE_TRACKER_H_ | 123 #endif // SYNC_SESSIONS_DATA_TYPE_TRACKER_H_ |
OLD | NEW |