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

Issue 3078022: Unplumb AllStatus from SyncerThread. (Closed)

Created:
10 years, 4 months ago by tim (not reviewing)
Modified:
9 years, 6 months ago
CC:
chromium-reviews, ncarter (slow), ben+cc_chromium.org, Raghu Simha, idana, Paweł Hajdan Jr., tim (not reviewing)
Visibility:
Public.

Description

Unplumb 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+108 lines, -137 lines) Patch
M chrome/browser/sync/engine/all_status.h View 2 chunks +0 lines, -9 lines 0 comments Download
M chrome/browser/sync/engine/all_status.cc View 3 chunks +0 lines, -31 lines 0 comments Download
D chrome/browser/sync/engine/all_status_unittest.cc View 1 chunk +0 lines, -24 lines 0 comments Download
M chrome/browser/sync/engine/auth_watcher_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/engine/syncapi.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/engine/syncer_end_command.cc View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/sync/engine/syncer_thread.h View 1 5 chunks +6 lines, -4 lines 0 comments Download
M chrome/browser/sync/engine/syncer_thread.cc View 1 2 10 chunks +41 lines, -16 lines 0 comments Download
M chrome/browser/sync/engine/syncer_thread_unittest.cc View 30 chunks +45 lines, -48 lines 0 comments Download
M chrome/browser/sync/sessions/sync_session_context.h View 2 chunks +11 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 7 (0 generated)
tim (not reviewing)
10 years, 4 months ago (2010-08-04 06:03:01 UTC) #1
akalin
http://codereview.chromium.org/3078022/diff/1/8 File chrome/browser/sync/engine/syncer_thread.cc (right): http://codereview.chromium.org/3078022/diff/1/8#newcode443 chrome/browser/sync/engine/syncer_thread.cc:443: SyncSessionSnapshot* snapshot = session_context_->previous_session_snapshot(); I think you should move ...
10 years, 4 months ago (2010-08-04 21:50:14 UTC) #2
chron_chromium.org
This makes a lot more sense. Thanks. LGTM with fred's comments addressed.
10 years, 4 months ago (2010-08-04 22:02:24 UTC) #3
tim (not reviewing)
http://codereview.chromium.org/3078022/diff/1/8 File chrome/browser/sync/engine/syncer_thread.cc (right): http://codereview.chromium.org/3078022/diff/1/8#newcode443 chrome/browser/sync/engine/syncer_thread.cc:443: SyncSessionSnapshot* snapshot = session_context_->previous_session_snapshot(); On 2010/08/04 21:50:14, akalin wrote: ...
10 years, 4 months ago (2010-08-04 22:30:49 UTC) #4
akalin
http://codereview.chromium.org/3078022/diff/7001/8007 File chrome/browser/sync/engine/syncer_thread.cc (right): http://codereview.chromium.org/3078022/diff/7001/8007#newcode445 chrome/browser/sync/engine/syncer_thread.cc:445: snapshot->num_server_changes_remaining > snapshot->max_local_timestamp put parantheses: && binds tighter than ...
10 years, 4 months ago (2010-08-04 22:37:39 UTC) #5
tim (not reviewing)
http://codereview.chromium.org/3078022/diff/7001/8007 File chrome/browser/sync/engine/syncer_thread.cc (right): http://codereview.chromium.org/3078022/diff/7001/8007#newcode445 chrome/browser/sync/engine/syncer_thread.cc:445: snapshot->num_server_changes_remaining > snapshot->max_local_timestamp On 2010/08/04 22:37:39, akalin wrote: > ...
10 years, 4 months ago (2010-08-04 23:10:58 UTC) #6
akalin
10 years, 4 months ago (2010-08-05 00:31:00 UTC) #7
LGTM

On 2010/08/04 23:10:58, timsteele wrote:
> http://codereview.chromium.org/3078022/diff/7001/8007
> File chrome/browser/sync/engine/syncer_thread.cc (right):
> 
> http://codereview.chromium.org/3078022/diff/7001/8007#newcode445
> chrome/browser/sync/engine/syncer_thread.cc:445:
> snapshot->num_server_changes_remaining > snapshot->max_local_timestamp
> On 2010/08/04 22:37:39, akalin wrote:
> > put parantheses: && binds tighter than ||
> 
> Done.

Powered by Google App Engine
This is Rietveld 408576698