Index: sync/engine/sync_scheduler_impl.h |
diff --git a/sync/engine/sync_scheduler_impl.h b/sync/engine/sync_scheduler_impl.h |
index 60d1c3873af77d4273790ade9ff52494836eda0b..4ffbf6f71e5abd04f12b42755601dd200d7cbaf3 100644 |
--- a/sync/engine/sync_scheduler_impl.h |
+++ b/sync/engine/sync_scheduler_impl.h |
@@ -167,6 +167,9 @@ class SYNC_EXPORT_PRIVATE SyncSchedulerImpl |
// Invoke the Syncer to perform a poll job. |
void DoPollSyncSessionJob(); |
+ // Helper function to calculate poll interval. |
+ base::TimeDelta GetPollInterval(); |
+ |
// Adjusts the poll timer to account for new poll interval, and possibly |
// resets the poll interval, depedning on the flag's value. |
void AdjustPolling(PollAdjustType type); |
@@ -204,6 +207,8 @@ class SYNC_EXPORT_PRIVATE SyncSchedulerImpl |
// priority. |
void TryCanaryJob(); |
+ void TrySyncSessionJob(JobPriority priority); |
+ |
// Transitions out of the THROTTLED WaitInterval then calls TryCanaryJob(). |
void Unthrottle(); |
@@ -309,6 +314,11 @@ class SYNC_EXPORT_PRIVATE SyncSchedulerImpl |
// after credentials are updated. |
bool do_poll_after_credentials_updated_; |
+ // TryJob might get called for multiple reasons. It should only call |
+ // DoPollSyncSessionJob after some time since the last attempt. |
+ // last_poll_reset_ keeps track of when was last attempt. |
+ base::TimeTicks last_poll_reset_; |
+ |
base::WeakPtrFactory<SyncSchedulerImpl> weak_ptr_factory_; |
// A second factory specially for weak_handle_this_, to allow the handle |