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

Unified Diff: sync/engine/sync_scheduler_impl.cc

Issue 387983004: sync: Support non-blocking initial sync in proto (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + fix comment Created 6 years, 5 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
Index: sync/engine/sync_scheduler_impl.cc
diff --git a/sync/engine/sync_scheduler_impl.cc b/sync/engine/sync_scheduler_impl.cc
index 4d38c21f87a8f68ba5cb34112ae4bf6521a4b461..974ed27e4ee9a9e45f7228e6b31afb6ce4b374da 100644
--- a/sync/engine/sync_scheduler_impl.cc
+++ b/sync/engine/sync_scheduler_impl.cc
@@ -398,6 +398,15 @@ void SyncSchedulerImpl::ScheduleInvalidationNudge(
ScheduleNudgeImpl(desired_delay, nudge_location);
}
+void SyncSchedulerImpl::ScheduleInitialSyncNudge(syncer::ModelType model_type) {
stanisc 2014/07/17 18:46:10 This is called ScheduleInitialSyncNudge. Does the
rlarocque 2014/07/17 18:58:06 It should be very uncommon that it gets called mor
+ DCHECK(CalledOnValidThread());
+
+ SDVLOG(2) << "Scheduling non-blocking initial sync for "
+ << ModelTypeToString(model_type);
+ nudge_tracker_.RecordInitialSyncRequired(model_type);
+ ScheduleNudgeImpl(TimeDelta::FromSeconds(0), FROM_HERE);
+}
+
// TODO(zea): Consider adding separate throttling/backoff for datatype
// refresh requests.
void SyncSchedulerImpl::ScheduleNudgeImpl(

Powered by Google App Engine
This is Rietveld 408576698