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

Issue 13743003: sync: Finish the SyncScheduler refactor (Closed)

Created:
7 years, 8 months ago by rlarocque
Modified:
7 years, 8 months ago
CC:
chromium-reviews, Raghu Simha, haitaol1, akalin, tim (not reviewing)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

sync: Finish the SyncScheduler refactor This change removes SyncSessionJob entirely. The first step towards this goal was to refactor all functions that depended on SyncSessionJob. All these functions have either been inlined or modified to take different parameters instead. DoSyncSessionJob was split into two separate functions, one for configure jobs and one for nudge jobs, which removes the need for SyncSessionJob's "purpose" member. The SyncScheduler's pending_configure_job_ has been replaced with a ConfigParams member, since that was the only part of the job still being referenced. The pending_nudge_job_ has been replaced with scheduled_nudge_time_ (which is similar to the old scheduled_start_ member of SyncSessionJob) and a new object called a NudgeTracker. The NudgeTracker inherits the SyncSessionJob's responsibilities with respect to coalescing nudge sources. The plan is to extend this class to support more sophisticated nudge coalescing in the future. For now it tries to emulate the old SyncSessionJob behaviour as closely as possible. Some of the refactoring does change behaviour. In particular, the decision-making logic has been updated to fix issues 179515 and 155296. BUG=175024, 179515, 155296 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=194766

Patch Set 1 #

Patch Set 2 : Fix ModelNeutralState forward decl #

Total comments: 29

Patch Set 3 : Some updates #

Patch Set 4 : Refactor some common code #

Total comments: 6

Patch Set 5 : Some review fixes #

Patch Set 6 : Refactor code sharing #

Total comments: 2

Patch Set 7 : Readjust AdjustPolling #

Patch Set 8 : Fix AuthErrorTest #

Unified diffs Side-by-side diffs Delta from patch set Stats (+422 lines, -1053 lines) Patch
M chrome/browser/sync/profile_sync_service_harness.h View 1 2 3 4 5 6 7 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/sync/test/integration/sync_errors_test.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -11 lines 0 comments Download
M sync/engine/sync_scheduler_impl.h View 1 2 3 4 5 6 7 chunks +38 lines, -53 lines 0 comments Download
M sync/engine/sync_scheduler_impl.cc View 1 2 3 4 5 6 13 chunks +153 lines, -326 lines 0 comments Download
M sync/engine/sync_scheduler_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
D sync/engine/sync_scheduler_whitebox_unittest.cc View 1 chunk +0 lines, -258 lines 0 comments Download
D sync/engine/sync_session_job.h View 1 chunk +0 lines, -88 lines 0 comments Download
D sync/engine/sync_session_job.cc View 1 chunk +0 lines, -130 lines 0 comments Download
D sync/engine/sync_session_job_unittest.cc View 1 chunk +0 lines, -166 lines 0 comments Download
M sync/engine/syncer_unittest.cc View 1 2 1 chunk +3 lines, -12 lines 0 comments Download
A sync/sessions/nudge_tracker.h View 1 2 3 1 chunk +54 lines, -0 lines 0 comments Download
A sync/sessions/nudge_tracker.cc View 1 2 3 1 chunk +50 lines, -0 lines 0 comments Download
A sync/sessions/nudge_tracker_unittest.cc View 1 2 3 1 chunk +112 lines, -0 lines 0 comments Download
M sync/sync_core.gypi View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M sync/sync_tests.gypi View 1 2 3 2 chunks +1 line, -2 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
rlarocque
Please review. I think the first set of try jobs failed because they failed to ...
7 years, 8 months ago (2013-04-08 20:19:52 UTC) #1
tim (not reviewing)
https://codereview.chromium.org/13743003/diff/6001/sync/engine/nudge_tracker.cc File sync/engine/nudge_tracker.cc (right): https://codereview.chromium.org/13743003/diff/6001/sync/engine/nudge_tracker.cc#newcode27 sync/engine/nudge_tracker.cc:27: // TODO(rlarocque): This function often reports incorrect results. However, ...
7 years, 8 months ago (2013-04-15 22:37:49 UTC) #2
rlarocque
https://codereview.chromium.org/13743003/diff/6001/sync/engine/nudge_tracker.cc File sync/engine/nudge_tracker.cc (right): https://codereview.chromium.org/13743003/diff/6001/sync/engine/nudge_tracker.cc#newcode27 sync/engine/nudge_tracker.cc:27: // TODO(rlarocque): This function often reports incorrect results. However, ...
7 years, 8 months ago (2013-04-16 01:30:26 UTC) #3
tim (not reviewing)
https://codereview.chromium.org/13743003/diff/6001/sync/engine/nudge_tracker.h File sync/engine/nudge_tracker.h (right): https://codereview.chromium.org/13743003/diff/6001/sync/engine/nudge_tracker.h#newcode17 sync/engine/nudge_tracker.h:17: } // namespace sessions On 2013/04/16 01:30:26, rlarocque wrote: ...
7 years, 8 months ago (2013-04-16 20:16:24 UTC) #4
rlarocque
https://codereview.chromium.org/13743003/diff/6001/sync/engine/nudge_tracker.h File sync/engine/nudge_tracker.h (right): https://codereview.chromium.org/13743003/diff/6001/sync/engine/nudge_tracker.h#newcode17 sync/engine/nudge_tracker.h:17: } // namespace sessions On 2013/04/16 20:16:24, timsteele wrote: ...
7 years, 8 months ago (2013-04-16 22:20:05 UTC) #5
tim (not reviewing)
https://codereview.chromium.org/13743003/diff/22001/sync/engine/sync_scheduler_impl.cc File sync/engine/sync_scheduler_impl.cc (right): https://codereview.chromium.org/13743003/diff/22001/sync/engine/sync_scheduler_impl.cc#newcode521 sync/engine/sync_scheduler_impl.cc:521: } Hmm. I was thinking void SyncSchedulerImpl::Do<JobType>SyncSessionJob (...) ...
7 years, 8 months ago (2013-04-16 23:02:12 UTC) #6
rlarocque
PTAL. https://codereview.chromium.org/13743003/diff/22001/sync/engine/sync_scheduler_impl.cc File sync/engine/sync_scheduler_impl.cc (right): https://codereview.chromium.org/13743003/diff/22001/sync/engine/sync_scheduler_impl.cc#newcode521 sync/engine/sync_scheduler_impl.cc:521: } On 2013/04/16 23:02:13, timsteele wrote: > Hmm. ...
7 years, 8 months ago (2013-04-17 00:50:41 UTC) #7
tim (not reviewing)
Please see my comment and consider it, but otherwise I think this CL LGTM. And ...
7 years, 8 months ago (2013-04-17 17:49:00 UTC) #8
rlarocque
https://codereview.chromium.org/13743003/diff/19002/sync/engine/sync_scheduler_impl.cc File sync/engine/sync_scheduler_impl.cc (right): https://codereview.chromium.org/13743003/diff/19002/sync/engine/sync_scheduler_impl.cc#newcode620 sync/engine/sync_scheduler_impl.cc:620: void SyncSchedulerImpl::RestartPollTimer() { On 2013/04/17 17:49:00, timsteele wrote: > ...
7 years, 8 months ago (2013-04-17 20:45:37 UTC) #9
rlarocque
I think I've fixed the AuthErrorTest by making it more like XmppAuthErrorTest. It no longer ...
7 years, 8 months ago (2013-04-17 21:44:17 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/13743003/37001
7 years, 8 months ago (2013-04-18 01:07:32 UTC) #11
commit-bot: I haz the power
7 years, 8 months ago (2013-04-18 04:52:11 UTC) #12
Message was sent while issue was closed.
Change committed as 194766

Powered by Google App Engine
This is Rietveld 408576698