Index: sync/sessions/nudge_tracker.h |
diff --git a/sync/sessions/nudge_tracker.h b/sync/sessions/nudge_tracker.h |
index fcd015034101312d6e71822ee7a772bbbb0af278..1663f0ccad82b4d60af4626bb18a289a90c64bc7 100644 |
--- a/sync/sessions/nudge_tracker.h |
+++ b/sync/sessions/nudge_tracker.h |
@@ -36,11 +36,14 @@ class SYNC_EXPORT_PRIVATE NudgeTracker { |
// Returns true if there is a good reason for performing a get updates |
// request as part of the next sync cycle. |
- bool IsGetUpdatesRequired() const; |
+ bool IsGetUpdatesRequired(base::TimeTicks now) const; |
- // Tells this class that all required update fetching and committing has |
+ // Return true if should perform a sync cycle for GU retry. |
+ bool IsRetryRequired(base::TimeTicks now) const; |
+ |
+ // Tells this class that all required update fetching or committing has |
// completed successfully. |
- void RecordSuccessfulSyncCycle(); |
+ void RecordSuccessfulSyncCycle(base::TimeTicks now); |
// Takes note of a local change. |
void RecordLocalChange(ModelTypeSet types); |
@@ -105,6 +108,10 @@ class SYNC_EXPORT_PRIVATE NudgeTracker { |
// Adjusts the number of hints that can be stored locally. |
void SetHintBufferSize(size_t size); |
+ void set_next_retry_time(base::TimeTicks next_retry_time) { |
+ next_retry_time_ = next_retry_time; |
+ } |
+ |
private: |
typedef std::map<ModelType, DataTypeTracker> TypeTrackerMap; |
@@ -130,6 +137,11 @@ class SYNC_EXPORT_PRIVATE NudgeTracker { |
size_t num_payloads_per_type_; |
+ base::TimeTicks last_successful_sync_time_; |
+ |
+ // A retry GU should be issued after this time. |
+ base::TimeTicks next_retry_time_; |
+ |
DISALLOW_COPY_AND_ASSIGN(NudgeTracker); |
}; |