| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 42   void RecordSuccessfulSyncCycle(); | 42   void RecordSuccessfulSyncCycle(); | 
| 43 | 43 | 
| 44   // Updates the size of the invalidations payload buffer. | 44   // Updates the size of the invalidations payload buffer. | 
| 45   void UpdatePayloadBufferSize(size_t new_size); | 45   void UpdatePayloadBufferSize(size_t new_size); | 
| 46 | 46 | 
| 47   // Returns true if there is a good reason to perform a sync cycle.  This does | 47   // Returns true if there is a good reason to perform a sync cycle.  This does | 
| 48   // not take into account whether or not now is a good time to perform a sync | 48   // not take into account whether or not now is a good time to perform a sync | 
| 49   // cycle.  That's for the scheduler to decide. | 49   // cycle.  That's for the scheduler to decide. | 
| 50   bool IsSyncRequired() const; | 50   bool IsSyncRequired() const; | 
| 51 | 51 | 
|  | 52   // Returns true if there is a good reason to fetch updates for this type as | 
|  | 53   // part of the next sync cycle. | 
|  | 54   bool IsGetUpdatesRequired() const; | 
|  | 55 | 
| 52   // Returns true if there is an uncommitted local change. | 56   // Returns true if there is an uncommitted local change. | 
| 53   bool HasLocalChangePending() const; | 57   bool HasLocalChangePending() const; | 
| 54 | 58 | 
| 55   // Returns true if we've received an invalidation since we last fetched | 59   // Returns true if we've received an invalidation since we last fetched | 
| 56   // updates. | 60   // updates. | 
| 57   bool HasPendingInvalidation() const; | 61   bool HasPendingInvalidation() const; | 
| 58 | 62 | 
| 59   // Returns the most recent invalidation payload. | 63   // Returns the most recent invalidation payload. | 
| 60   std::string GetMostRecentInvalidationPayload() const; | 64   std::string GetMostRecentInvalidationPayload() const; | 
| 61 | 65 | 
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 108 | 112 | 
| 109   // If !unthrottle_time_.is_null(), this type is throttled and may not download | 113   // If !unthrottle_time_.is_null(), this type is throttled and may not download | 
| 110   // or commit data until the specified time. | 114   // or commit data until the specified time. | 
| 111   base::TimeTicks unthrottle_time_; | 115   base::TimeTicks unthrottle_time_; | 
| 112 }; | 116 }; | 
| 113 | 117 | 
| 114 }  // namespace syncer | 118 }  // namespace syncer | 
| 115 }  // namespace sessions | 119 }  // namespace sessions | 
| 116 | 120 | 
| 117 #endif  // SYNC_SESSIONS_DATA_TYPE_TRACKER_H_ | 121 #endif  // SYNC_SESSIONS_DATA_TYPE_TRACKER_H_ | 
| OLD | NEW | 
|---|