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

Issue 2563423005: [Sync] Move ConfigureDataTypes logic into DataTypeManagerImpl. (Closed)

Created:
4 years ago by maxbogue
Modified:
3 years, 11 months ago
Reviewers:
skym, pavely
CC:
chromium-reviews, sync-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Sync] Move ConfigureDataTypes logic into DataTypeManagerImpl. This is good because it sets the stage for refactoring this logic and testing it better, but it's bad because it reveals the full extent of our sins with respect to the current state of the code. The primary functional change is that DTMI tracks the set of types it thinks the engine knows are... downloaded? Configured? Whatever the types in SyncBackendRegistrar's routing info represented before. Now it has a copy on the UI thread that it works with, and SBR's ConfigureDataTypes is no longer called from the UI thread. BUG=669967, 663125 Review-Url: https://codereview.chromium.org/2563423005 Cr-Commit-Position: refs/heads/master@{#442370} Committed: https://chromium.googlesource.com/chromium/src/+/82712717bb8f87ad7cc66e831d61d5fcb5352053

Patch Set 1 #

Patch Set 2 : Passing tests. #

Patch Set 3 : Self-review. #

Total comments: 2

Patch Set 4 : Rebase on Pavel's change. #

Total comments: 10

Patch Set 5 : Address comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+771 lines, -720 lines) Patch
M components/browser_sync/abstract_profile_sync_service_test.cc View 1 2 3 3 chunks +4 lines, -20 lines 0 comments Download
M components/sync/BUILD.gn View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M components/sync/driver/data_type_controller.h View 1 2 3 4 1 chunk +4 lines, -3 lines 0 comments Download
M components/sync/driver/data_type_manager_impl.h View 1 2 3 4 4 chunks +41 lines, -6 lines 0 comments Download
M components/sync/driver/data_type_manager_impl.cc View 1 2 3 4 7 chunks +175 lines, -28 lines 0 comments Download
M components/sync/driver/data_type_manager_impl_unittest.cc View 1 2 3 4 65 chunks +223 lines, -265 lines 0 comments Download
M components/sync/driver/directory_data_type_controller.h View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M components/sync/driver/directory_data_type_controller.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M components/sync/driver/fake_data_type_controller.h View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M components/sync/driver/fake_data_type_controller.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M components/sync/driver/glue/sync_backend_host_core.h View 1 2 3 2 chunks +2 lines, -6 lines 0 comments Download
M components/sync/driver/glue/sync_backend_host_core.cc View 1 2 3 1 chunk +17 lines, -13 lines 0 comments Download
M components/sync/driver/glue/sync_backend_host_impl.h View 1 2 3 2 chunks +1 line, -14 lines 0 comments Download
M components/sync/driver/glue/sync_backend_host_impl.cc View 1 2 3 2 chunks +7 lines, -129 lines 0 comments Download
M components/sync/driver/glue/sync_backend_host_impl_unittest.cc View 1 2 3 21 chunks +86 lines, -126 lines 0 comments Download
M components/sync/driver/model_type_controller.h View 1 2 3 4 1 chunk +2 lines, -5 lines 0 comments Download
M components/sync/driver/model_type_controller.cc View 1 2 3 4 1 chunk +7 lines, -1 line 0 comments Download
M components/sync/driver/model_type_controller_unittest.cc View 1 2 3 4 7 chunks +40 lines, -12 lines 0 comments Download
M components/sync/driver/proxy_data_type_controller.h View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M components/sync/driver/proxy_data_type_controller.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M components/sync/engine/fake_sync_engine.h View 1 2 3 1 chunk +1 line, -5 lines 0 comments Download
M components/sync/engine/fake_sync_engine.cc View 1 2 3 1 chunk +1 line, -7 lines 0 comments Download
M components/sync/engine/model_type_configurer.h View 1 2 3 2 chunks +31 lines, -44 lines 0 comments Download
M components/sync/engine/model_type_configurer.cc View 1 2 3 1 chunk +8 lines, -20 lines 0 comments Download
M components/sync/engine/sync_engine.h View 1 2 3 1 chunk +0 lines, -13 lines 0 comments Download
A components/sync/engine/sync_engine_host_stub.h View 1 1 chunk +53 lines, -0 lines 0 comments Download
A components/sync/engine/sync_engine_host_stub.cc View 1 1 chunk +57 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 32 (22 generated)
maxbogue
Sky, Pavel, PTAL! I'm not super happy with the unittest changes but I want to ...
4 years ago (2016-12-16 18:33:12 UTC) #9
skym
lgtm https://codereview.chromium.org/2563423005/diff/40001/components/sync/driver/data_type_manager_impl.cc File components/sync/driver/data_type_manager_impl.cc (right): https://codereview.chromium.org/2563423005/diff/40001/components/sync/driver/data_type_manager_impl.cc#newcode171 components/sync/driver/data_type_manager_impl.cc:171: ModelTypeSet DataTypeManagerImpl::GetDataTypesInState( Should DataTypeConfigStateMap be a class that ...
4 years ago (2016-12-19 18:54:17 UTC) #12
maxbogue
Pavel, PTAL! This should be ready now (updated for your patch regarding clean types).
3 years, 11 months ago (2017-01-04 21:41:30 UTC) #17
maxbogue
https://codereview.chromium.org/2563423005/diff/40001/components/sync/driver/data_type_manager_impl.cc File components/sync/driver/data_type_manager_impl.cc (right): https://codereview.chromium.org/2563423005/diff/40001/components/sync/driver/data_type_manager_impl.cc#newcode171 components/sync/driver/data_type_manager_impl.cc:171: ModelTypeSet DataTypeManagerImpl::GetDataTypesInState( I don't think that's worth it for ...
3 years, 11 months ago (2017-01-04 21:46:26 UTC) #18
skym
Still looks good. https://codereview.chromium.org/2563423005/diff/60001/components/sync/driver/data_type_manager_impl_unittest.cc File components/sync/driver/data_type_manager_impl_unittest.cc (right): https://codereview.chromium.org/2563423005/diff/60001/components/sync/driver/data_type_manager_impl_unittest.cc#newcode29 components/sync/driver/data_type_manager_impl_unittest.cc:29: return result; Could this just return ...
3 years, 11 months ago (2017-01-05 00:42:11 UTC) #19
pavely
I left couple of comments in the code. In addition we discussed two things that ...
3 years, 11 months ago (2017-01-05 21:32:19 UTC) #20
maxbogue
PTAL! I've made another CL this one depends on for filtering out passwords and history, ...
3 years, 11 months ago (2017-01-06 18:55:58 UTC) #23
pavely
lgtm
3 years, 11 months ago (2017-01-09 19:35:06 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2563423005/80001
3 years, 11 months ago (2017-01-09 19:50:58 UTC) #29
commit-bot: I haz the power
3 years, 11 months ago (2017-01-09 22:22:40 UTC) #32
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/82712717bb8f87ad7cc66e831d61...

Powered by Google App Engine
This is Rietveld 408576698