Chromium Code Reviews
Descriptionsync: Expose sync functionality as functions
This change is a refactor to clean up ugliness introduced in previous
commits and prepare for future features.
The most notable change is the removal of "state machine" logic from
syncer.cc. This allows us to remove the SyncerSteps enum and related
code. The SyncShare function + enum parameters have been replaced with
the functions NormalSyncShare(), ConfigureSyncShare() and
PollSyncShare(). These changes should make it possible to address
crbug.com/109422, and to re-enable commits during poll-triggered sync
cycles (if desrired, see r206475).
The logic for fetching and applying updates has been modified, too.
Since the behaviour of GetUpdates varies depending on the type of cycle
(Configure, GetUpdates, or Poll) the logic to build and execute these
GetUpdate requests has been split up. This enables us to remove the
NudgeTracker from the SyncSession (an ugly hack introduced in
r199136). It should make it easier to implement crbug.com/147685.
In the interest of keeping this change as small and simple as possible
some obvious refactorings have not been intentionally excluded from this
CL. For example, the logic around when to send SYNC_CYCLE_ENDED events
or when to return true or false frome the SyncShare functions remains
very complicated. Untangling that mess would require some non-trivial
changes to the SyncScheduler, so they've been deferred until later.
BUG=147685, 109422
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=209867
Patch Set 1 #
Total comments: 1
Patch Set 2 : Minor cleanups #
Total comments: 9
Patch Set 3 : Review fixes (not tested nor rebased) #
Total comments: 2
Patch Set 4 : Const-ify member #Patch Set 5 : Rebase #
Total comments: 2
Patch Set 6 : Add another ExitRequested() check #Patch Set 7 : Fix migrations #Patch Set 8 : Fix more integration tests #
Total comments: 4
Patch Set 9 : Refactor SyncShare function signatures #
Total comments: 6
Patch Set 10 : Some refactorings #
Total comments: 5
Patch Set 11 : Closures and other refactorings #Patch Set 12 : Rebase #Patch Set 13 : Minor changes to #includes #
Total comments: 6
Patch Set 14 : More refactorings #Patch Set 15 : Even more refactoring #Patch Set 16 : Finish addressing latest review comments #
Messages
Total messages: 28 (0 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||