Index: chrome/browser/sync/engine/sync_scheduler.cc |
diff --git a/chrome/browser/sync/engine/sync_scheduler.cc b/chrome/browser/sync/engine/sync_scheduler.cc |
index ce05fb1be4b065c094dd89677bd3a7d8502f548c..71db3daf7eeaec303e40cddccf58ac7131b5afb1 100644 |
--- a/chrome/browser/sync/engine/sync_scheduler.cc |
+++ b/chrome/browser/sync/engine/sync_scheduler.cc |
@@ -542,17 +542,15 @@ void SyncScheduler::ScheduleNudgeImpl( |
SDVLOG(2) << "Coalescing pending nudge"; |
pending_nudge_->session->Coalesce(*(job.session.get())); |
- if (!IsBackingOff()) { |
- SDVLOG(2) << "Dropping a nudge because" |
- << " we are not in backoff and the job was coalesced"; |
- return; |
- } else { |
- SDVLOG(2) << "Rescheduling pending nudge"; |
- SyncSession* s = pending_nudge_->session.get(); |
- job.session.reset(new SyncSession(s->context(), s->delegate(), |
- s->source(), s->routing_info(), s->workers())); |
- pending_nudge_.reset(); |
- } |
+ SDVLOG(2) << "Rescheduling pending nudge"; |
+ SyncSession* s = pending_nudge_->session.get(); |
+ job.session.reset(new SyncSession(s->context(), s->delegate(), |
+ s->source(), s->routing_info(), s->workers())); |
+ |
+ // Choose the start time as the earliest of the 2. |
+ job.scheduled_start = std::min(job.scheduled_start, |
+ pending_nudge_->scheduled_start); |
tim (not reviewing)
2011/12/06 20:15:57
This was explicitly not the goal of the implementa
lipalani1
2011/12/06 20:44:06
This is a needed change and is deliberate.
Need:
|
+ pending_nudge_.reset(); |
} |
// TODO(lipalani) - pass the job itself to ScheduleSyncSessionJob. |