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

Issue 9348036: Trim code from sync's ServerConnectionManager (Closed)

Created:
8 years, 10 months ago by rlarocque
Modified:
8 years, 9 months ago
Reviewers:
lipalani1
CC:
chromium-reviews, ncarter (slow), akalin, Raghu Simha, kkania, cbentzel+watch_chromium.org, robertshield, darin-cc_chromium.org, tim (not reviewing)
Visibility:
Public.

Description

Trim code form sync's ServerConnectionManager - Remove 'authenticated' from SyncManager::Status. This variable was set to true iff the last attempt to contact the sync server resulted in a 200 OK response. There are lots of problems with this approach. See also: crbug.com/117611. The about:sync page also displays auth errors with MakeSyncAuthErrorText(), which is much more likely to be accurate - Remove server_up from SyncManager::Status. It used to be set to true iff the last server response was SERVER_CONNECTION_OK. That doesn't make a lot of sense and isn't very useful. - Remove server_reachable from SyncManager::Status. This was toggled only when ServerConnectionManager::CheckServerReachable() failed, which didn't happen very often. CheckServerReachable() has since been removed, so I think it now gets set only at startup and on the first successful contact with the server. - Remove server_reachable from ServerConnectionEvent and ServerConnectionManager, for similar reasons. - Remove the methods CheckTime(), IsServerReachable(), IsUserAuthenticated(), and CheckServerReachable(), SetServerParameters(), server_reachable() from ServerConnectionManager. These methods were not used anywhere. Also removed IsGoodReplyFromServer(), whose last remaining callsite has been removed in this commit. - Remove the server_connection_ok_ flag from SyncScheduler. - Hard-code AllStatus' online status to true. See TODO comment. - Remove OnCredentialsUpdated() and OnConnectionStatusChange() from SyncScheduler. Their functionality has been moved to the SyncManager. - Rearrange some code in MockConnectionManager. Apparently there used to be such a thing as an "AUTHENTICATE" request, which we had unit tests for. That no longer exists, so I've rewritten some parts of this mock class to better relfect ServerConnectionManager's current authentication mechanisms. - Update various unit tests in response to these changes. - Update some integration tests to verify backoff behaviour when the sync server is unreachable. This replaces the old behaviour of verifying that certain flags were set in the sync snapshot. - Reduce the number of retries required to verify backoff. This is to help ensure that our integration tests fall within the 45s time limit. - Disable notifications when disabling network connectivity in integration tests. This improves the reliability of exponential backoff verification because the notifications would sometimes interfere with backoff logic. BUG=110954, 105739, 98346, 106262 TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=127310

Patch Set 1 #

Patch Set 2 : small updates #

Total comments: 3

Patch Set 3 : Back off some changes #

Total comments: 10

Patch Set 4 : Delete some more code #

Total comments: 1

Patch Set 5 : Rebase, add TODO, remove useless log msgs #

Patch Set 6 : Fix integration tests #

Patch Set 7 : Improve integration test reliability #

Patch Set 8 : Rebase after Fred's patch #

Unified diffs Side-by-side diffs Delta from patch set Stats (+98 lines, -357 lines) Patch
M chrome/browser/automation/testing_automation_provider.cc View 1 2 3 4 5 6 7 2 chunks +1 line, -3 lines 0 comments Download
M chrome/browser/resources/sync_internals/about.html View 1 2 3 4 1 chunk +0 lines, -7 lines 0 comments Download
M chrome/browser/sync/internal_api/all_status.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/sync/internal_api/all_status.cc View 1 2 3 4 5 6 7 2 chunks +5 lines, -15 lines 0 comments Download
M chrome/browser/sync/internal_api/sync_manager.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/sync/internal_api/sync_manager.cc View 1 2 3 4 5 6 7 3 chunks +0 lines, -7 lines 0 comments Download
M chrome/browser/sync/internal_api/syncapi_server_connection_manager_unittest.cc View 1 2 3 4 2 chunks +0 lines, -27 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_harness.cc View 1 2 3 4 5 6 7 5 chunks +0 lines, -33 lines 0 comments Download
M chrome/browser/sync/retry_verifier.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/sync_ui_util.cc View 1 2 3 4 5 6 7 3 chunks +0 lines, -13 lines 0 comments Download
M chrome/browser/sync/test/integration/single_client_bookmarks_sync_test.cc View 1 2 3 4 5 1 chunk +3 lines, -10 lines 0 comments Download
M chrome/browser/sync/test/integration/sync_errors_test.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -3 lines 0 comments Download
M chrome/browser/sync/test/integration/sync_test.h View 1 2 3 4 5 6 7 2 chunks +9 lines, -0 lines 0 comments Download
M chrome/browser/sync/test/integration/sync_test.cc View 1 2 3 4 5 6 7 5 chunks +17 lines, -2 lines 0 comments Download
M sync/engine/net/server_connection_manager.h View 1 2 3 4 5 6 7 8 chunks +7 lines, -39 lines 0 comments Download
M sync/engine/net/server_connection_manager.cc View 1 2 3 4 5 6 7 5 chunks +2 lines, -82 lines 0 comments Download
M sync/engine/sync_scheduler.h View 1 2 3 4 5 6 7 2 chunks +1 line, -4 lines 0 comments Download
M sync/engine/sync_scheduler.cc View 1 2 3 4 5 6 7 5 chunks +9 lines, -37 lines 0 comments Download
M sync/engine/sync_scheduler_unittest.cc View 1 2 3 4 5 6 7 2 chunks +3 lines, -1 line 0 comments Download
M sync/engine/sync_scheduler_whitebox_unittest.cc View 1 2 3 4 5 6 7 3 chunks +0 lines, -6 lines 0 comments Download
M sync/sessions/test_util.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M sync/sessions/test_util.cc View 1 2 3 4 5 6 7 1 chunk +6 lines, -0 lines 0 comments Download
M sync/test/engine/mock_connection_manager.h View 1 2 3 4 5 6 7 5 chunks +9 lines, -12 lines 0 comments Download
M sync/test/engine/mock_connection_manager.cc View 1 2 3 4 5 6 7 7 chunks +22 lines, -49 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
rlarocque
Here are the ServerConnectionManager changes I've been talking about. This replaces the 'preview' release at ...
8 years, 10 months ago (2012-02-08 01:57:29 UTC) #1
rlarocque
As discussed, I've undone some of the SyncScheduler changes. PTAL. http://codereview.chromium.org/9348036/diff/3001/chrome/browser/sync/engine/sync_scheduler.cc File chrome/browser/sync/engine/sync_scheduler.cc (right): http://codereview.chromium.org/9348036/diff/3001/chrome/browser/sync/engine/sync_scheduler.cc#newcode376 ...
8 years, 10 months ago (2012-02-10 23:16:06 UTC) #2
lipalani1
Hey I think we should fix up some of the values in all_status.cc rather than ...
8 years, 10 months ago (2012-02-11 00:12:10 UTC) #3
rlarocque
On 2012/02/11 00:12:10, lipalani1 wrote: > Hey I think we should fix up some of ...
8 years, 10 months ago (2012-02-11 01:30:29 UTC) #4
rlarocque
More comments. http://codereview.chromium.org/9348036/diff/3001/chrome/browser/sync/engine/net/server_connection_manager.cc File chrome/browser/sync/engine/net/server_connection_manager.cc (left): http://codereview.chromium.org/9348036/diff/3001/chrome/browser/sync/engine/net/server_connection_manager.cc#oldcode162 chrome/browser/sync/engine/net/server_connection_manager.cc:162: if (conn_mgr_->server_status_ != response_->server_status) { On 2012/02/11 ...
8 years, 10 months ago (2012-02-11 01:31:36 UTC) #5
lipalani1
May be what we can do is, as a first step send the CL to ...
8 years, 10 months ago (2012-02-22 18:28:50 UTC) #6
rlarocque
On 2012/02/22 18:28:50, lipalani1 wrote: > May be what we can do is, as a ...
8 years, 10 months ago (2012-02-22 21:21:28 UTC) #7
rlarocque
On 2012/02/22 21:21:28, rlarocque wrote: > On 2012/02/22 18:28:50, lipalani1 wrote: > > May be ...
8 years, 9 months ago (2012-02-29 18:51:22 UTC) #8
lipalani1
LGTM 2 changes: Please refer the bug on Drew's plate in the CL description(and may ...
8 years, 9 months ago (2012-03-09 19:57:53 UTC) #9
rlarocque
On 2012/03/09 19:57:53, lipalani1 wrote: > LGTM > 2 changes: > Please refer the bug ...
8 years, 9 months ago (2012-03-12 21:39:44 UTC) #10
rlarocque
> The changes are in patch sets 5-8. Correction: patch sets 5-7.
8 years, 9 months ago (2012-03-12 21:46:59 UTC) #11
lipalani1
LGTM
8 years, 9 months ago (2012-03-14 23:23:21 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/9348036/29001
8 years, 9 months ago (2012-03-15 17:51:33 UTC) #13
commit-bot: I haz the power
The commit queue went berserk retrying too often for a seemingly flaky test. Builder is ...
8 years, 9 months ago (2012-03-15 19:41:43 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/9348036/29001
8 years, 9 months ago (2012-03-15 20:50:53 UTC) #15
commit-bot: I haz the power
Try job failure for 9348036-29001 (retry) (previous was lost) on win_rel for step "browser_tests". It's ...
8 years, 9 months ago (2012-03-16 01:22:37 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/9348036/29001
8 years, 9 months ago (2012-03-16 22:09:41 UTC) #17
commit-bot: I haz the power
8 years, 9 months ago (2012-03-17 00:19:07 UTC) #18
Change committed as 127310

Powered by Google App Engine
This is Rietveld 408576698