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

Unified Diff: sync/engine/sync_scheduler_impl.cc

Issue 19309002: sync: Add pre-commit update avoidance mode + flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 4a209e0c06012b5e2b0616298d503538fad96ede..e4517788b9010111cd85ce974f45816eecf1f3f0 100644
--- a/sync/engine/sync_scheduler_impl.cc
+++ b/sync/engine/sync_scheduler_impl.cc
@@ -611,7 +611,8 @@ void SyncSchedulerImpl::UpdateNudgeTimeRecords(ModelTypeSet types) {
void SyncSchedulerImpl::AdjustPolling(PollAdjustType type) {
DCHECK(CalledOnValidThread());
- TimeDelta poll = (!session_context_->notifications_enabled()) ?
+ TimeDelta poll = (!session_context_->notifications_enabled() ||
+ !sesion_context_->should_fetch_updates_before_commit()) ?
syncer_short_poll_interval_seconds_ :
syncer_long_poll_interval_seconds_;
bool rate_changed = !poll_timer_.IsRunning() ||

Powered by Google App Engine
This is Rietveld 408576698