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

Unified Diff: sync/engine/sync_scheduler_impl.cc

Issue 11314008: sync: Follow-up to conflict resolution refactor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests Created 8 years, 2 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 | « sync/engine/process_updates_command_unittest.cc ('k') | sync/engine/sync_session_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/sync_scheduler_impl.cc
diff --git a/sync/engine/sync_scheduler_impl.cc b/sync/engine/sync_scheduler_impl.cc
index c270fc525f31819f193813d70cb87614756a3345..aeb95c4a81663cc00ca871efb75efab04ce287d6 100644
--- a/sync/engine/sync_scheduler_impl.cc
+++ b/sync/engine/sync_scheduler_impl.cc
@@ -112,8 +112,6 @@ GetUpdatesCallerInfo::GetUpdatesSource GetUpdatesFromNudgeSource(
return GetUpdatesCallerInfo::NOTIFICATION;
case NUDGE_SOURCE_LOCAL:
return GetUpdatesCallerInfo::LOCAL;
- case NUDGE_SOURCE_CONTINUATION:
- return GetUpdatesCallerInfo::SYNC_CYCLE_CONTINUATION;
case NUDGE_SOURCE_LOCAL_REFRESH:
return GetUpdatesCallerInfo::DATATYPE_REFRESH;
case NUDGE_SOURCE_UNKNOWN:
@@ -763,23 +761,12 @@ bool SyncSchedulerImpl::DoSyncSessionJob(scoped_ptr<SyncSessionJob> job) {
return false;
}
- SDVLOG(2) << "DoSyncSessionJob with "
+ SDVLOG(2) << "Calling SyncShare with "
<< SyncSessionJob::GetPurposeString(job->purpose()) << " job";
-
- bool has_more_to_sync = true;
- bool premature_exit = false;
- while (DecideOnJob(*job) == CONTINUE && has_more_to_sync) {
- SDVLOG(2) << "Calling SyncShare.";
- // Synchronously perform the sync session from this thread.
- premature_exit = !syncer_->SyncShare(job->mutable_session(),
- job->start_step(),
- job->end_step());
-
- has_more_to_sync = job->session()->HasMoreToSync();
- if (has_more_to_sync)
- job->mutable_session()->PrepareForAnotherSyncCycle();
- }
- SDVLOG(2) << "Done SyncShare looping.";
+ bool premature_exit = !syncer_->SyncShare(job->mutable_session(),
+ job->start_step(),
+ job->end_step());
+ SDVLOG(2) << "Done SyncShare, returned: " << premature_exit;
return FinishSyncSessionJob(job.Pass(), premature_exit);
}
@@ -838,7 +825,6 @@ bool SyncSchedulerImpl::FinishSyncSessionJob(scoped_ptr<SyncSessionJob> job,
void SyncSchedulerImpl::ScheduleNextSync(
scoped_ptr<SyncSessionJob> finished_job, bool succeeded) {
DCHECK_EQ(MessageLoop::current(), sync_loop_);
- DCHECK(!finished_job->session()->HasMoreToSync());
AdjustPolling(finished_job.get());
« no previous file with comments | « sync/engine/process_updates_command_unittest.cc ('k') | sync/engine/sync_session_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698