DescriptionUnplumb AllStatus from SyncerThread.
The AllStatus is now strictly used for status reporting in UI.
Motivation is that the ST can get what it needs from other sources it already depends on, and less dependencies is a good thing (easier to get to MLs, and but also AllStatus is pretty complicated and makes it hard to follow what's going on when looking at the SyncerThread code). And GetRecommendedDelay just didn't belong in there in the first place IMO.
AllStatus is complicated as it tries to keep an instantaneously up-to-date status, which is a) error prone and buggy and b) not needed by the syncer thread, which only needs to check things after a session has completed. The one subtle fact is on exit, calling Syncer::RequestEarlyExit means we may not hit SyncerEndCommand so previous_session_snapshot() will be out of date. In this case though we don't care, since we don't need SyncerThread::CalculatePollingWaitTime to do anything.
BUG=26339
TEST=SyncerThreadTest
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=55010
Patch Set 1 #
Total comments: 9
Patch Set 2 : review comments + explicit ctor #
Total comments: 2
Patch Set 3 : parens #Messages
Total messages: 7 (0 generated)
|