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

Issue 12538015: sync: Handle POLL jobs in separate a code path (Closed)

Created:
7 years, 9 months ago by rlarocque
Modified:
7 years, 9 months ago
CC:
chromium-reviews, Raghu Simha, haitaol1, akalin, tim (not reviewing)
Visibility:
Public.

Description

sync: Handle POLL jobs in separate a code path This is part of the effort to remove the amount of state we track in SyncSessionJob. We eventually want to remove SyncSessionJob's 'purpose' member. Splitting the handling of poll, configure, and nudge jobs into separate functions is a necessary step towards that goal. We're not ready to remove 'purpose' yet, but we can start by separating all the logic that deals with POLL jobs. It will be easier to refactor job decision-making, scheduling, saving, etc. if those functions don't need to support poll jobs. This change is almost, but not quite, a no-op. The only notable change is that the poll timer timeout no longer posts a task. Instead, it will run the poll job directly. A side-effect of this change was that ScheduleNextSync() was only called from one location (ScheduleNudgeImpl()), so its was merged into its only call site. BUG=175024 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=189398

Patch Set 1 #

Total comments: 19

Patch Set 2 : Review responses #

Patch Set 3 : Rebase #

Total comments: 7

Patch Set 4 : Second round of review fixes #

Total comments: 4

Patch Set 5 : Amend comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+159 lines, -109 lines) Patch
M sync/engine/sync_scheduler_impl.h View 1 2 3 4 2 chunks +15 lines, -10 lines 0 comments Download
M sync/engine/sync_scheduler_impl.cc View 1 2 3 14 chunks +125 lines, -88 lines 0 comments Download
M sync/engine/sync_scheduler_whitebox_unittest.cc View 1 2 3 2 chunks +19 lines, -11 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
rlarocque
Please review. As noted in the commit message, this should be mostly a no-op. I ...
7 years, 9 months ago (2013-03-18 22:02:17 UTC) #1
tim (not reviewing)
I haven't fully thought this through yet, but I thought I'd send along some quick ...
7 years, 9 months ago (2013-03-18 22:57:40 UTC) #2
rlarocque
Added some responses. I will update the patch and upload it soon. https://codereview.chromium.org/12538015/diff/1/sync/engine/sync_scheduler_impl.cc File sync/engine/sync_scheduler_impl.cc ...
7 years, 9 months ago (2013-03-19 00:15:02 UTC) #3
rlarocque
On 2013/03/19 00:15:02, rlarocque wrote: > Added some responses. I will update the patch and ...
7 years, 9 months ago (2013-03-19 17:07:00 UTC) #4
rlarocque
> I've uploaded a new patch. > > I've also discovered a bug in this ...
7 years, 9 months ago (2013-03-19 20:03:39 UTC) #5
tim (not reviewing)
LGTM with nits below and also fix the comment on line 417. https://codereview.chromium.org/12538015/diff/1/sync/engine/sync_scheduler_impl.cc File sync/engine/sync_scheduler_impl.cc ...
7 years, 9 months ago (2013-03-19 21:50:02 UTC) #6
tim (not reviewing)
https://codereview.chromium.org/12538015/diff/7001/sync/engine/sync_scheduler_whitebox_unittest.cc File sync/engine/sync_scheduler_whitebox_unittest.cc (left): https://codereview.chromium.org/12538015/diff/7001/sync/engine/sync_scheduler_whitebox_unittest.cc#oldcode179 sync/engine/sync_scheduler_whitebox_unittest.cc:179: SetMode(SyncScheduler::CONFIGURATION_MODE); This still seems like a good basic test ...
7 years, 9 months ago (2013-03-19 21:51:22 UTC) #7
rlarocque
Patch updated, though I won't try to commit until tomorrow. This patch has changed a ...
7 years, 9 months ago (2013-03-19 22:46:42 UTC) #8
tim (not reviewing)
https://codereview.chromium.org/12538015/diff/13001/sync/engine/sync_scheduler_impl.h File sync/engine/sync_scheduler_impl.h (right): https://codereview.chromium.org/12538015/diff/13001/sync/engine/sync_scheduler_impl.h#newcode218 sync/engine/sync_scheduler_impl.h:218: // If the scheduler's current state suports it, this ...
7 years, 9 months ago (2013-03-20 17:08:47 UTC) #9
rlarocque
https://codereview.chromium.org/12538015/diff/13001/sync/engine/sync_scheduler_impl.h File sync/engine/sync_scheduler_impl.h (right): https://codereview.chromium.org/12538015/diff/13001/sync/engine/sync_scheduler_impl.h#newcode218 sync/engine/sync_scheduler_impl.h:218: // If the scheduler's current state suports it, this ...
7 years, 9 months ago (2013-03-20 17:15:16 UTC) #10
tim (not reviewing)
lgtm
7 years, 9 months ago (2013-03-20 17:21:09 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/12538015/18001
7 years, 9 months ago (2013-03-20 17:24:08 UTC) #12
commit-bot: I haz the power
7 years, 9 months ago (2013-03-20 21:01:29 UTC) #13
Message was sent while issue was closed.
Change committed as 189398

Powered by Google App Engine
This is Rietveld 408576698