Index: sync/engine/syncer.cc |
diff --git a/sync/engine/syncer.cc b/sync/engine/syncer.cc |
index 62c7af893ff2d6dc91d74c53980c7a50f4eef564..9b5d522edaf3cd5adc67023756c78255e6217f51 100644 |
--- a/sync/engine/syncer.cc |
+++ b/sync/engine/syncer.cc |
@@ -166,13 +166,19 @@ void Syncer::SyncShare(sessions::SyncSession* session, |
case STORE_TIMESTAMPS: { |
StoreTimestampsCommand store_timestamps; |
store_timestamps.Execute(session); |
- // We should download all of the updates before attempting to process |
- // them. |
- if (session->status_controller().ServerSaysNothingMoreToDownload() || |
- !session->status_controller().download_updates_succeeded()) { |
- next_step = APPLY_UPDATES; |
- } else { |
+ // We download all of the updates before attempting to apply them. |
+ if (!session->status_controller().download_updates_succeeded()) { |
+ // We may have downloaded some updates, but if the latest download |
+ // attempt failed then we don't have all the updates. We'll leave |
+ // it to a retry job to pick up where we left off. |
+ last_step = SYNCER_END; // Necessary for CONFIGURATION mode. |
tim (not reviewing)
2012/04/06 20:38:57
If we're going straight to END, why not call Reque
tim (not reviewing)
2012/04/06 20:48:21
Oh, I guess you *want* to run END.
I think the c
|
+ next_step = SYNCER_END; |
+ DVLOG(1) << "Aborting sync cycle due to download updates failure"; |
+ } else if (!session->status_controller() |
+ .ServerSaysNothingMoreToDownload()) { |
Nicolas Zea
2012/04/09 19:09:14
nit: indent by four more spaces
|
next_step = DOWNLOAD_UPDATES; |
+ } else { |
+ next_step = APPLY_UPDATES; |
} |
break; |
} |