Chromium Code Reviews| 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 14991e637c43101562c12670e64137edbfe420ca..3df802bc471d680278bbad9169a2cf5a0733e632 100644 |
| --- a/chrome/browser/sync/engine/sync_scheduler.cc |
| +++ b/chrome/browser/sync/engine/sync_scheduler.cc |
| @@ -813,30 +813,15 @@ void SyncScheduler::FinishSyncSessionJob(const SyncSessionJob& job) { |
| void SyncScheduler::ScheduleNextSync(const SyncSessionJob& old_job) { |
| DCHECK_EQ(MessageLoop::current(), sync_loop_); |
| DCHECK(!old_job.session->HasMoreToSync()); |
| - // Note: |num_server_changes_remaining| > 0 here implies that we received a |
| - // broken response while trying to download all updates, because the Syncer |
| - // will loop until this value is exhausted. Also, if unsynced_handles exist |
| - // but HasMoreToSync is false, this implies that the Syncer determined no |
| - // forward progress was possible at this time (an error, such as an HTTP |
| - // 500, is likely to have occurred during commit). |
| - int num_server_changes_remaining = |
| - old_job.session->status_controller()->num_server_changes_remaining(); |
| - size_t num_unsynced_handles = |
| - old_job.session->status_controller()->unsynced_handles().size(); |
| - const bool work_to_do = |
| - num_server_changes_remaining > 0 || num_unsynced_handles > 0; |
| - SVLOG(2) << "num server changes remaining: " << num_server_changes_remaining |
| - << ", num unsynced handles: " << num_unsynced_handles |
| - << ", syncer has work to do: " << work_to_do; |
| AdjustPolling(&old_job); |
| // TODO(tim): Old impl had special code if notifications disabled. Needed? |
| - if (!work_to_do) { |
| + if (!old_job.session->ExperiencedTransientError()) { |
|
tim (not reviewing)
2011/09/27 21:20:07
We should add a comment here along the lines of if
rlarocque
2011/09/27 23:42:41
Is this to prevent readers from assuming that this
|
| // Success implies backoff relief. Note that if this was a |
| // "one-off" job (i.e. purpose == |
| // SyncSessionJob::{CLEAR_USER_DATA,CLEANUP_DISABLED_TYPES}), if |
| - // there was work_to_do before it ran this wont have changed, as |
| + // there was work to do before it ran this wont have changed, as |
| // jobs like this don't run a full sync cycle. So we don't need |
| // special code here. |
| wait_interval_.reset(); |