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

Unified Diff: sync/engine/sync_scheduler.h

Issue 10917234: sync: make scheduling logic and job ownership more obvious. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: eof Created 8 years, 2 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.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/sync_scheduler.h
diff --git a/sync/engine/sync_scheduler.h b/sync/engine/sync_scheduler.h
index b9c1ed32c6dd0fd6057d3164326a0f84e4014030..46731929d37d88071a4b4a0e6284454a2291451c 100644
--- a/sync/engine/sync_scheduler.h
+++ b/sync/engine/sync_scheduler.h
@@ -85,13 +85,18 @@ class SyncScheduler : public sessions::SyncSession::Delegate {
// The meat and potatoes. Both of these methods will post a delayed task
// to attempt the actual nudge (see ScheduleNudgeImpl).
+ // NOTE: |desired_delay| is best-effort. If a nudge is already scheduled to
+ // depart earlier than Now() + delay, the scheduler can and will prefer to
+ // batch the two so that only one nudge is sent (at the earlier time). Also,
+ // as always with delayed tasks and timers, it's possible the task gets run
+ // any time after |desired_delay|.
virtual void ScheduleNudgeAsync(
- const base::TimeDelta& delay,
+ const base::TimeDelta& desired_delay,
NudgeSource source,
ModelTypeSet types,
const tracked_objects::Location& nudge_location) = 0;
virtual void ScheduleNudgeWithStatesAsync(
- const base::TimeDelta& delay, NudgeSource source,
+ const base::TimeDelta& desired_delay, NudgeSource source,
const ModelTypeInvalidationMap& invalidation_map,
const tracked_objects::Location& nudge_location) = 0;
« no previous file with comments | « no previous file | sync/engine/sync_scheduler_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698