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

Unified Diff: sync/engine/syncer.cc

Issue 10917234: sync: make scheduling logic and job ownership more obvious. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test + comment + rebase Created 8 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: sync/engine/syncer.cc
diff --git a/sync/engine/syncer.cc b/sync/engine/syncer.cc
index d2b4fef69a69a2166e3d52fb9c3afd708a2ebf2c..68453959e93fd0ba29f5c71ca681400583052ae4 100644
--- a/sync/engine/syncer.cc
+++ b/sync/engine/syncer.cc
@@ -84,7 +84,7 @@ void Syncer::RequestEarlyExit() {
early_exit_requested_ = true;
}
-void Syncer::SyncShare(sessions::SyncSession* session,
+bool Syncer::SyncShare(sessions::SyncSession* session,
SyncerStep first_step,
SyncerStep last_step) {
ScopedSessionContextConflictResolver scoped(session->context(),
@@ -219,17 +219,16 @@ void Syncer::SyncShare(sessions::SyncSession* session,
}
default:
LOG(ERROR) << "Unknown command: " << current_step;
- }
+ } // switch
DVLOG(2) << "last step: " << SyncerStepToString(last_step) << ", "
<< "current step: " << SyncerStepToString(current_step) << ", "
<< "next step: " << SyncerStepToString(next_step) << ", "
<< "snapshot: " << session->TakeSnapshot().ToString();
- if (last_step == current_step) {
- session->SetFinished();
- break;
- }
+ if (last_step == current_step)
+ return true;
current_step = next_step;
- }
+ } // while
+ return false;
}
void CopyServerFields(syncable::Entry* src, syncable::MutableEntry* dest) {

Powered by Google App Engine
This is Rietveld 408576698