| 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..34f7161bb54d5f9466d9dbb96a5da3a88cc0c543 100644
|
| --- a/sync/engine/sync_scheduler_impl.h
|
| +++ b/sync/engine/sync_scheduler_impl.h
|
| @@ -89,6 +89,7 @@ class SYNC_EXPORT_PRIVATE SyncSchedulerImpl
|
| virtual void OnReceivedClientInvalidationHintBufferSize(int size) OVERRIDE;
|
| virtual void OnSyncProtocolError(
|
| const sessions::SyncSessionSnapshot& snapshot) OVERRIDE;
|
| + virtual void OnReceivedGuRetryDelaySeconds(int delay_seconds) OVERRIDE;
|
|
|
| private:
|
| enum JobPriority {
|
| @@ -154,9 +155,6 @@ class SYNC_EXPORT_PRIVATE SyncSchedulerImpl
|
|
|
| static const char* GetModeString(Mode mode);
|
|
|
| - // Invoke the syncer to perform a nudge job.
|
| - void DoNudgeSyncSessionJob(JobPriority priority);
|
| -
|
| // Invoke the syncer to perform a configuration job.
|
| void DoConfigurationSyncSessionJob(JobPriority priority);
|
|
|
| @@ -164,8 +162,17 @@ class SYNC_EXPORT_PRIVATE SyncSchedulerImpl
|
| void HandleFailure(
|
| const sessions::ModelNeutralState& model_neutral_state);
|
|
|
| - // Invoke the Syncer to perform a poll job.
|
| - void DoPollSyncSessionJob();
|
| + // Invoke the syncer to perform a nudge job. Return true if session didn't
|
| + // abort pre-maturely.
|
| + bool DoNudgeSyncSessionJob(sessions::SyncSession* session);
|
| +
|
| + // Invoke the Syncer to perform a poll job. Return true if session didn't
|
| + // abort pre-maturely.
|
| + bool DoPollSyncSessionJob(sessions::SyncSession* session);
|
| +
|
| + // Invoke the Syncer to perform a retry job. Return true if session didn't
|
| + // abort pre-maturely.
|
| + bool DoRetrySyncSessionJob(sessions::SyncSession* session);
|
|
|
| // Helper function to calculate poll interval.
|
| base::TimeDelta GetPollInterval();
|
| @@ -212,6 +219,9 @@ class SYNC_EXPORT_PRIVATE SyncSchedulerImpl
|
| void TrySyncSessionJob();
|
| void TrySyncSessionJobImpl();
|
|
|
| + // Post-processing according to session result.
|
| + void SyncSessionPostProcessing(sessions::SyncSession* session);
|
| +
|
| // Transitions out of the THROTTLED WaitInterval then calls TryCanaryJob().
|
| void Unthrottle();
|
|
|
| @@ -230,6 +240,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 +349,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);
|
| };
|
|
|
|
|