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

Unified Diff: sync/engine/sync_scheduler.cc

Issue 10537032: [Sync] Fix sync scheduler/session logic determining successful commands. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove comment Created 8 years, 6 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_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/sync_scheduler.cc
diff --git a/sync/engine/sync_scheduler.cc b/sync/engine/sync_scheduler.cc
index 1e9da41f81cace5e706faf0b40bddaa70188d474..fa8dc522070806932acbf46311bbb913ffab85ee 100644
--- a/sync/engine/sync_scheduler.cc
+++ b/sync/engine/sync_scheduler.cc
@@ -881,13 +881,9 @@ void SyncScheduler::ScheduleNextSync(const SyncSessionJob& old_job) {
AdjustPolling(&old_job);
if (old_job.session->Succeeded()) {
- // 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
- // jobs like this don't run a full sync cycle. So we don't need
- // special code here.
- wait_interval_.reset();
+ // Only reset backoff if we actually reached the server.
+ if (old_job.session->SuccessfullyReachedServer())
+ wait_interval_.reset();
SDVLOG(2) << "Job succeeded so not scheduling more jobs";
return;
}
« no previous file with comments | « no previous file | sync/engine/sync_scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698