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

Issue 299843007: sync: Refactor StatusChangeChecker hierarchy (Closed)

Created:
6 years, 7 months ago by rlarocque
Modified:
6 years, 7 months ago
CC:
chromium-reviews, tim+watch_chromium.org, haitaol+watch_chromium.org, maniscalco+watch_chromium.org
Visibility:
Public.

Description

sync: Refactor StatusChangeChecker hierarchy Refactors the StatusChangeChecker class hierarchy to allow for more code sharing. Allows children of StatusChangeChecker to share logic around performing a blocking wait, checking exit conditions, and timing out. As before, the sharing is acheived through inheritance. We should move to a delegation pattern if this becomes too complicated, but I think the use of inheritance still makes sense for now. This is a pre-requisite for a future patch that adds a new kind of StatusChangeChecker that does not listen to ProfileSyncService changes. I expect that there will be many more kinds of StatusChangeCheckers defined in the future. This refactoring will help us share code between them. This is attached to issue 97780 and 95742 because it will enable us to write more StatusChangeCheckers that we can use to refactor tests that currently listen for snapshots and self-notifications. BUG=97780, 95742 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=272711

Patch Set 1 #

Patch Set 2 : Rebase #

Patch Set 3 : Undo unrelated changes #

Total comments: 6

Patch Set 4 : Review fixes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+95 lines, -87 lines) Patch
M chrome/browser/sync/test/integration/multi_client_status_change_checker.h View 3 chunks +0 lines, -7 lines 0 comments Download
M chrome/browser/sync/test/integration/multi_client_status_change_checker.cc View 2 chunks +3 lines, -30 lines 0 comments Download
M chrome/browser/sync/test/integration/quiesce_status_change_checker.h View 1 chunk +1 line, -9 lines 0 comments Download
M chrome/browser/sync/test/integration/quiesce_status_change_checker.cc View 4 chunks +3 lines, -30 lines 0 comments Download
M chrome/browser/sync/test/integration/status_change_checker.h View 1 2 3 1 chunk +38 lines, -10 lines 0 comments Download
M chrome/browser/sync/test/integration/status_change_checker.cc View 1 2 3 1 chunk +50 lines, -1 line 0 comments Download

Messages

Total messages: 15 (0 generated)
rlarocque
This was originally part of a CL to refactor the autofill integration tests. This chunk ...
6 years, 7 months ago (2014-05-22 20:20:19 UTC) #1
pval...(no longer on Chromium)
https://codereview.chromium.org/299843007/diff/40001/chrome/browser/sync/test/integration/status_change_checker.cc File chrome/browser/sync/test/integration/status_change_checker.cc (right): https://codereview.chromium.org/299843007/diff/40001/chrome/browser/sync/test/integration/status_change_checker.cc#newcode26 chrome/browser/sync/test/integration/status_change_checker.cc:26: DCHECK(!wait_started_) << "This class is intended for one use ...
6 years, 7 months ago (2014-05-22 21:07:12 UTC) #2
rlarocque
Patch updated. PTAL. https://codereview.chromium.org/299843007/diff/40001/chrome/browser/sync/test/integration/status_change_checker.cc File chrome/browser/sync/test/integration/status_change_checker.cc (right): https://codereview.chromium.org/299843007/diff/40001/chrome/browser/sync/test/integration/status_change_checker.cc#newcode26 chrome/browser/sync/test/integration/status_change_checker.cc:26: DCHECK(!wait_started_) << "This class is intended ...
6 years, 7 months ago (2014-05-22 21:29:30 UTC) #3
pval...(no longer on Chromium)
lgtm
6 years, 7 months ago (2014-05-22 21:33:37 UTC) #4
rlarocque
The CQ bit was checked by rlarocque@chromium.org
6 years, 7 months ago (2014-05-22 21:34:12 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/299843007/60001
6 years, 7 months ago (2014-05-22 21:35:34 UTC) #6
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-22 21:35:36 UTC) #7
commit-bot: I haz the power
No LGTM from a valid reviewer yet. Only full committers are accepted. Even if an ...
6 years, 7 months ago (2014-05-22 21:35:36 UTC) #8
rlarocque
On 2014/05/22 21:35:36, I haz the power (commit-bot) wrote: > No LGTM from a valid ...
6 years, 7 months ago (2014-05-22 22:09:27 UTC) #9
Nicolas Zea
On 2014/05/22 22:09:27, rlarocque wrote: > On 2014/05/22 21:35:36, I haz the power (commit-bot) wrote: ...
6 years, 7 months ago (2014-05-23 20:22:43 UTC) #10
Nicolas Zea
On 2014/05/23 20:22:43, Nicolas Zea wrote: > On 2014/05/22 22:09:27, rlarocque wrote: > > On ...
6 years, 7 months ago (2014-05-23 20:52:17 UTC) #11
rlarocque
The CQ bit was checked by rlarocque@chromium.org
6 years, 7 months ago (2014-05-23 22:43:10 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/299843007/60001
6 years, 7 months ago (2014-05-23 22:47:05 UTC) #13
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-24 06:09:40 UTC) #14
commit-bot: I haz the power
6 years, 7 months ago (2014-05-24 12:19:10 UTC) #15
Message was sent while issue was closed.
Change committed as 272711

Powered by Google App Engine
This is Rietveld 408576698