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

Unified Diff: chrome/browser/sync/engine/sync_scheduler.cc

Issue 8787006: Delay autofill commits to reduce client to server traffic. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For review. Created 9 years 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: chrome/browser/sync/engine/sync_scheduler.cc
diff --git a/chrome/browser/sync/engine/sync_scheduler.cc b/chrome/browser/sync/engine/sync_scheduler.cc
index ce05fb1be4b065c094dd89677bd3a7d8502f548c..71db3daf7eeaec303e40cddccf58ac7131b5afb1 100644
--- a/chrome/browser/sync/engine/sync_scheduler.cc
+++ b/chrome/browser/sync/engine/sync_scheduler.cc
@@ -542,17 +542,15 @@ void SyncScheduler::ScheduleNudgeImpl(
SDVLOG(2) << "Coalescing pending nudge";
pending_nudge_->session->Coalesce(*(job.session.get()));
- if (!IsBackingOff()) {
- SDVLOG(2) << "Dropping a nudge because"
- << " we are not in backoff and the job was coalesced";
- return;
- } else {
- SDVLOG(2) << "Rescheduling pending nudge";
- SyncSession* s = pending_nudge_->session.get();
- job.session.reset(new SyncSession(s->context(), s->delegate(),
- s->source(), s->routing_info(), s->workers()));
- pending_nudge_.reset();
- }
+ SDVLOG(2) << "Rescheduling pending nudge";
+ SyncSession* s = pending_nudge_->session.get();
+ job.session.reset(new SyncSession(s->context(), s->delegate(),
+ s->source(), s->routing_info(), s->workers()));
+
+ // Choose the start time as the earliest of the 2.
+ job.scheduled_start = std::min(job.scheduled_start,
+ pending_nudge_->scheduled_start);
tim (not reviewing) 2011/12/06 20:15:57 This was explicitly not the goal of the implementa
lipalani1 2011/12/06 20:44:06 This is a needed change and is deliberate. Need:
+ pending_nudge_.reset();
}
// TODO(lipalani) - pass the job itself to ScheduleSyncSessionJob.
« no previous file with comments | « no previous file | chrome/browser/sync/engine/sync_scheduler_unittest.cc » ('j') | chrome/browser/sync/internal_api/sync_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698