summaryrefslogtreecommitdiffstats
path: root/sync/engine/syncer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sync/engine/syncer.cc')
-rw-r--r--sync/engine/syncer.cc16
1 files changed, 15 insertions, 1 deletions
diff --git a/sync/engine/syncer.cc b/sync/engine/syncer.cc
index 13e1f79..e75c1c6 100644
--- a/sync/engine/syncer.cc
+++ b/sync/engine/syncer.cc
@@ -57,7 +57,7 @@ bool Syncer::NormalSyncShare(ModelTypeSet request_types,
SyncSession* session) {
HandleCycleBegin(session);
VLOG(1) << "Downloading types " << ModelTypeSetToString(request_types);
- if (nudge_tracker.IsGetUpdatesRequired() ||
+ if (nudge_tracker.IsGetUpdatesRequired(base::TimeTicks::Now()) ||
session->context()->ShouldFetchUpdatesBeforeCommit()) {
if (!DownloadAndApplyUpdates(
request_types,
@@ -109,6 +109,20 @@ bool Syncer::PollSyncShare(ModelTypeSet request_types,
return HandleCycleEnd(session, sync_pb::GetUpdatesCallerInfo::PERIODIC);
}
+bool Syncer::RetrySyncShare(ModelTypeSet request_types,
+ SyncSession* session) {
+ HandleCycleBegin(session);
+ VLOG(1) << "Retrying types " << ModelTypeSetToString(request_types);
+ DownloadAndApplyUpdates(
+ request_types,
+ session,
+ base::Bind(&download::BuildDownloadUpdatesForRetry,
+ session,
+ kCreateMobileBookmarksFolder,
+ request_types));
+ return HandleCycleEnd(session, sync_pb::GetUpdatesCallerInfo::RETRY);
+}
+
void Syncer::ApplyUpdates(SyncSession* session) {
TRACE_EVENT0("sync", "ApplyUpdates");