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

Unified Diff: sync/engine/apply_updates_command.cc

Issue 10103017: Abort sync cycles when download step fails (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit test and remove ServerSaysNothingMoreToDownload() Created 8 years, 8 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.h » ('j') | sync/engine/syncer.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/apply_updates_command.cc
diff --git a/sync/engine/apply_updates_command.cc b/sync/engine/apply_updates_command.cc
index 79fd039ba2312e35e647fb65368b519692482aad..83dfb51696c7f283a5a04fcb9be7bc0ab5b84e8d 100644
--- a/sync/engine/apply_updates_command.cc
+++ b/sync/engine/apply_updates_command.cc
@@ -72,7 +72,8 @@ SyncerError ApplyUpdatesCommand::ModelChangingExecuteImpl(
// This might be the first time we've fully completed a sync cycle, for
// some subset of the currently synced datatypes.
const sessions::StatusController& status(session->status_controller());
- if (status.ServerSaysNothingMoreToDownload()) {
+ if (status.error().last_download_updates_result == SYNCER_OK
+ && status.updates_response().get_updates().changes_remaining() == 0) {
for (syncable::ModelTypeSet::Iterator it =
status.updates_request_types().First(); it.Good(); it.Inc()) {
// This gets persisted to the directory's backing store.
« no previous file with comments | « no previous file | sync/engine/sync_scheduler.h » ('j') | sync/engine/syncer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698