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

Unified Diff: sync/engine/sync_scheduler_impl.h

Issue 12317104: Remove canary member from SyncSessionJob (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 10 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') | no next file with comments »
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 66fd8d581c3854d4f64b437e1dcc73b56e207c8c..7eba048192f627d74c849e43fcd00b98c9de2c08 100644
--- a/sync/engine/sync_scheduler_impl.h
+++ b/sync/engine/sync_scheduler_impl.h
@@ -94,6 +94,13 @@ class SYNC_EXPORT_PRIVATE SyncSchedulerImpl :
DROP,
};
+ enum JobPriority {
+ // Non-canary jobs respect exponential backoff.
+ NORMAL_PRIORITY,
+ // Canary jobs bypass exponential backoff, so use with extreme caution.
+ CANARY_PRIORITY
+ };
+
friend class SyncSchedulerTest;
friend class SyncSchedulerWhiteboxTest;
friend class SyncerTest;
@@ -172,7 +179,8 @@ class SYNC_EXPORT_PRIVATE SyncSchedulerImpl :
scoped_ptr<SyncSessionJob> job);
// Invoke the Syncer to perform a sync.
- bool DoSyncSessionJob(scoped_ptr<SyncSessionJob> job);
+ bool DoSyncSessionJob(scoped_ptr<SyncSessionJob> job,
+ JobPriority priority);
// Called after the Syncer has performed the sync represented by |job|, to
// reset our state. |exited_prematurely| is true if the Syncer did not
@@ -196,7 +204,8 @@ class SYNC_EXPORT_PRIVATE SyncSchedulerImpl :
void HandleContinuationError(scoped_ptr<SyncSessionJob> old_job);
// Decide whether we should CONTINUE, SAVE or DROP the job.
- JobProcessDecision DecideOnJob(const SyncSessionJob& job);
+ JobProcessDecision DecideOnJob(const SyncSessionJob& job,
+ JobPriority priority);
// If DecideOnJob decides that |job| should be SAVEd, this function will
// carry out the task of actually "saving" (or coalescing) the job.
@@ -204,7 +213,8 @@ class SYNC_EXPORT_PRIVATE SyncSchedulerImpl :
// Decide on whether to CONTINUE, SAVE or DROP the job when we are in
// backoff mode.
- JobProcessDecision DecideWhileInWaitInterval(const SyncSessionJob& job);
+ JobProcessDecision DecideWhileInWaitInterval(const SyncSessionJob& job,
+ JobPriority priority);
// 'Impl' here refers to real implementation of public functions, running on
// |thread_|.
« no previous file with comments | « no previous file | sync/engine/sync_scheduler_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698