| Index: sync/engine/download.cc
|
| diff --git a/sync/engine/download.cc b/sync/engine/download.cc
|
| index 2bc7f7a0a9d35be4e85e68ce60420826057f5458..448481f4ebd6c9e038c77c672502b9c942697eae 100644
|
| --- a/sync/engine/download.cc
|
| +++ b/sync/engine/download.cc
|
| @@ -234,6 +234,8 @@ void BuildNormalDownloadUpdatesImpl(
|
|
|
| // Set the new and improved version of source, too.
|
| get_updates->set_get_updates_origin(sync_pb::SyncEnums::GU_TRIGGER);
|
| + get_updates->set_is_retry(
|
| + nudge_tracker.IsRetryRequired(base::TimeTicks::Now()));
|
|
|
| // Fill in the notification hints.
|
| for (int i = 0; i < get_updates->from_progress_marker_size(); ++i) {
|
| @@ -331,6 +333,44 @@ void BuildDownloadUpdatesForPollImpl(
|
| get_updates->set_get_updates_origin(sync_pb::SyncEnums::PERIODIC);
|
| }
|
|
|
| +void BuildDownloadUpdatesForRetry(
|
| + SyncSession* session,
|
| + bool create_mobile_bookmarks_folder,
|
| + ModelTypeSet request_types,
|
| + sync_pb::ClientToServerMessage* client_to_server_message) {
|
| + DVLOG(1) << "Retrying for types "
|
| + << ModelTypeSetToString(request_types);
|
| +
|
| + InitDownloadUpdatesContext(
|
| + session,
|
| + create_mobile_bookmarks_folder,
|
| + client_to_server_message);
|
| + BuildDownloadUpdatesForRetryImpl(
|
| + Intersection(request_types, ProtocolTypes()),
|
| + session->context()->update_handler_map(),
|
| + client_to_server_message->mutable_get_updates());
|
| +}
|
| +
|
| +void BuildDownloadUpdatesForRetryImpl(
|
| + ModelTypeSet proto_request_types,
|
| + UpdateHandlerMap* update_handler_map,
|
| + sync_pb::GetUpdatesMessage* get_updates) {
|
| + DCHECK(!proto_request_types.Empty());
|
| +
|
| + InitDownloadUpdatesProgress(
|
| + proto_request_types,
|
| + update_handler_map,
|
| + get_updates);
|
| +
|
| + // Set legacy GetUpdatesMessage.GetUpdatesCallerInfo information.
|
| + get_updates->mutable_caller_info()->set_source(
|
| + sync_pb::GetUpdatesCallerInfo::RETRY);
|
| +
|
| + // Set the new and improved version of source, too.
|
| + get_updates->set_get_updates_origin(sync_pb::SyncEnums::RETRY);
|
| + get_updates->set_is_retry(true);
|
| +}
|
| +
|
| SyncerError ExecuteDownloadUpdates(
|
| ModelTypeSet request_types,
|
| SyncSession* session,
|
|
|