Chromium Code Reviews| Index: sync/engine/sync_scheduler_impl.cc |
| diff --git a/sync/engine/sync_scheduler_impl.cc b/sync/engine/sync_scheduler_impl.cc |
| index 4d1f9a8fe99c0fb1f1f07e51ce2c897a187bccf5..c270fc525f31819f193813d70cb87614756a3345 100644 |
| --- a/sync/engine/sync_scheduler_impl.cc |
| +++ b/sync/engine/sync_scheduler_impl.cc |
| @@ -1021,6 +1021,7 @@ void SyncSchedulerImpl::DoCanaryJob(scoped_ptr<SyncSessionJob> to_be_canary) { |
| to_be_canary->GrantCanaryPrivilege(); |
| if (to_be_canary->purpose() == SyncSessionJob::NUDGE) { |
| + DCHECK_EQ(pending_nudge_->session(), to_be_canary->session()); |
| // TODO(tim): We should be able to remove this... |
| scoped_ptr<SyncSession> temp = CreateSyncSession( |
| to_be_canary->session()->source()).Pass(); |
| @@ -1048,6 +1049,9 @@ scoped_ptr<SyncSessionJob> SyncSchedulerImpl::TakePendingJobForCurrentMode() { |
| pending_nudge_ = candidate.get(); |
| unscheduled_nudge_storage_.reset(); |
| } |
| + // If we took a job and there's a wait interval, we took the pending canary. |
| + if (candidate && wait_interval_) |
| + wait_interval_->timer.Stop(); |
|
rlarocque
2012/10/30 17:50:20
What if the timer fires somewhere between this lin
tim (not reviewing)
2012/10/30 17:58:29
Everything happens on the same message loop, so if
|
| return candidate.Pass(); |
| } |