Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(260)

Unified Diff: sync/engine/sync_scheduler_impl.h

Issue 12538015: sync: Handle POLL jobs in separate a code path (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sync/engine/sync_scheduler_impl.cc » ('j') | sync/engine/sync_scheduler_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/sync_scheduler_impl.h
diff --git a/sync/engine/sync_scheduler_impl.h b/sync/engine/sync_scheduler_impl.h
index 7190bdf62113c991fd2ea1632d67c135479d4e71..1d621ecf93b4d0e5637a3cfb5095becd0f3f7a58 100644
--- a/sync/engine/sync_scheduler_impl.h
+++ b/sync/engine/sync_scheduler_impl.h
@@ -173,21 +173,22 @@ class SYNC_EXPORT_PRIVATE SyncSchedulerImpl : public SyncScheduler {
void ScheduleSyncSessionJob(const tracked_objects::Location& loc,
scoped_ptr<SyncSessionJob> job);
- // Invoke the Syncer to perform a sync.
+ // Invoke the Syncer to perform a non-poll job.
bool DoSyncSessionJob(scoped_ptr<SyncSessionJob> job,
JobPriority priority);
+ // Invoke the Syncer to perform a poll job.
+ void DoPollSyncSessionJob(scoped_ptr<SyncSessionJob> job);
+
// Called after the Syncer has performed the sync represented by |job|, to
// reset our state. |exited_prematurely| is true if the Syncer did not
// cycle from job.start_step() to job.end_step(), likely because the
// scheduler was forced to quit the job mid-way through.
- bool FinishSyncSessionJob(scoped_ptr<SyncSessionJob> job,
+ bool FinishSyncSessionJob(SyncSessionJob* job,
bool exited_prematurely);
- // Helper to FinishSyncSessionJob to schedule the next sync operation.
- // |succeeded| carries the return value of |old_job|->Finish.
- void ScheduleNextSync(scoped_ptr<SyncSessionJob> finished_job,
- bool succeeded);
+ // Helper to schedule retries of a failed configure or nudge job.
+ void ScheduleNextSync(scoped_ptr<SyncSessionJob> finished_job);
// Helper to configure polling intervals. Used by Start and ScheduleNextSync.
void AdjustPolling(const SyncSessionJob* old_job);
« no previous file with comments | « no previous file | sync/engine/sync_scheduler_impl.cc » ('j') | sync/engine/sync_scheduler_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698