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

Unified Diff: chrome/browser/sync/engine/sync_scheduler.cc

Issue 7861013: Fix the false-positive detection of commit errors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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
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 d7d68abd73e6c7a41f0efdd76c473e8f44d69de3..1a922a658391981e42e0a3033686e2d795d63daf 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->WasUnableToMakeProgress()) {
tim (not reviewing) 2011/09/20 16:21:57 With the old "SyncerThread" this would have been b
rlarocque 2011/09/20 20:10:03 I don't follow. How does this change affect the w
tim (not reviewing) 2011/09/20 20:32:12 I don't think it does. This was to encourage you t
lipalani1 2011/09/20 23:15:56 When this job is running no new job(nudge) can com
lipalani1 2011/09/20 23:18:09 One more thing, an aside(for Richard): Nudge colla
// 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();
« no previous file with comments | « no previous file | chrome/browser/sync/sessions/sync_session.h » ('j') | chrome/browser/sync/sessions/sync_session.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698