Index: sync/engine/sync_scheduler_impl.h |
diff --git a/sync/engine/sync_scheduler_impl.h b/sync/engine/sync_scheduler_impl.h |
index 81a4fcf68d1534d0c2bd703102294d0e71ab7a52..68d2a802ed9680b5aea9ed07313e87dca0b431d1 100644 |
--- a/sync/engine/sync_scheduler_impl.h |
+++ b/sync/engine/sync_scheduler_impl.h |
@@ -89,6 +89,10 @@ class SYNC_EXPORT_PRIVATE SyncSchedulerImpl |
virtual void OnReceivedClientInvalidationHintBufferSize(int size) OVERRIDE; |
virtual void OnSyncProtocolError( |
const sessions::SyncSessionSnapshot& snapshot) OVERRIDE; |
+ virtual void OnReceivedGuRetryDelay(const base::TimeDelta& delay) OVERRIDE; |
+ |
+ // Returns true if the client is currently in exponential backoff. |
+ bool IsBackingOff() const; |
private: |
enum JobPriority { |
@@ -167,6 +171,9 @@ class SYNC_EXPORT_PRIVATE SyncSchedulerImpl |
// Invoke the Syncer to perform a poll job. |
void DoPollSyncSessionJob(); |
+ // Invoke the Syncer to perform a retry job. |
+ void DoRetrySyncSessionJob(); |
+ |
// Helper function to calculate poll interval. |
base::TimeDelta GetPollInterval(); |
@@ -191,9 +198,6 @@ class SYNC_EXPORT_PRIVATE SyncSchedulerImpl |
const base::TimeDelta& delay, |
const tracked_objects::Location& nudge_location); |
- // Returns true if the client is currently in exponential backoff. |
- bool IsBackingOff() const; |
- |
// Helper to signal all listeners registered with |session_context_|. |
void Notify(SyncEngineEvent::EventCause cause); |
@@ -230,6 +234,9 @@ class SYNC_EXPORT_PRIVATE SyncSchedulerImpl |
// Creates a session for a poll and performs the sync. |
void PollTimerCallback(); |
+ // Creates a session for a retry and performs the sync. |
+ void RetryTimerCallback(); |
+ |
// Returns the set of types that are enabled and not currently throttled. |
ModelTypeSet GetEnabledAndUnthrottledTypes(); |
@@ -336,6 +343,9 @@ class SYNC_EXPORT_PRIVATE SyncSchedulerImpl |
// to be const and alleviate threading concerns. |
base::WeakPtrFactory<SyncSchedulerImpl> weak_ptr_factory_for_weak_handle_; |
+ // One-shot timer for scheduling GU retry according to delay set by server. |
+ base::OneShotTimer<SyncSchedulerImpl> retry_timer_; |
+ |
DISALLOW_COPY_AND_ASSIGN(SyncSchedulerImpl); |
}; |