| Index: sync/engine/syncer.cc
|
| diff --git a/sync/engine/syncer.cc b/sync/engine/syncer.cc
|
| index 62c7af893ff2d6dc91d74c53980c7a50f4eef564..8cf93e0d0764637e4bfe1d645818fa3f5829c1dd 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.
|
| + next_step = SYNCER_END;
|
| + DVLOG(1) << "Aborting sync cycle due to download updates failure";
|
| + } else if (!session->status_controller()
|
| + .ServerSaysNothingMoreToDownload()) {
|
| next_step = DOWNLOAD_UPDATES;
|
| + } else {
|
| + next_step = APPLY_UPDATES;
|
| }
|
| break;
|
| }
|
|
|