New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 663125 link

Starred by 1 user

Issue metadata

Status: Archived
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocked on:
issue 663008

Blocking:
issue 658002



Sign in to add a comment

[Sync] Refactor SyncBackendRegistrar into ModelTypeRegistry.

Project Member Reported by maxbogue@chromium.org, Nov 7 2016

Issue description

SyncBackendRegistrar is complicated and performs some confusing roles. Simplify it and merge its functionality into ModelTypeRegistry (either directly or as a sub-object). This will clear the path for migration to intercept the initial download signal. It should also probably be renamed something directory-specific, such as DirectoryTypeRegistry.
 
Blockedon: 663008
Project Member

Comment 2 by bugdroid1@chromium.org, Nov 8 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/509cc91f68ef68aebfc761bf6bd282c113a1632e

commit 509cc91f68ef68aebfc761bf6bd282c113a1632e
Author: maxbogue <maxbogue@chromium.org>
Date: Tue Nov 08 19:30:22 2016

[Sync] Move thread checking into the ModelSafeWorker interface.

Previously, several task runners (UI, DB, FILE) were piped through
several layers of sync code simply to CHECK that the correct thread was
being used. This CL adds ModelSafeWorker::IsOnModelThread() instead.

Note that HISTORY and PASSWORDS still don't have an easy way to perform
this check, but the situation is no worse than before and sets the stage
for future improvement if necessary.

BUG= 663125 

Review-Url: https://codereview.chromium.org/2489433002
Cr-Commit-Position: refs/heads/master@{#430684}

[modify] https://crrev.com/509cc91f68ef68aebfc761bf6bd282c113a1632e/chrome/browser/sync/profile_sync_service_factory.cc
[modify] https://crrev.com/509cc91f68ef68aebfc761bf6bd282c113a1632e/chrome/browser/sync/profile_sync_test_util.cc
[modify] https://crrev.com/509cc91f68ef68aebfc761bf6bd282c113a1632e/components/browser_sync/profile_sync_service.cc
[modify] https://crrev.com/509cc91f68ef68aebfc761bf6bd282c113a1632e/components/browser_sync/profile_sync_service.h
[modify] https://crrev.com/509cc91f68ef68aebfc761bf6bd282c113a1632e/components/browser_sync/profile_sync_service_unittest.cc
[modify] https://crrev.com/509cc91f68ef68aebfc761bf6bd282c113a1632e/components/browser_sync/profile_sync_test_util.cc
[modify] https://crrev.com/509cc91f68ef68aebfc761bf6bd282c113a1632e/components/history/core/browser/history_model_worker.cc
[modify] https://crrev.com/509cc91f68ef68aebfc761bf6bd282c113a1632e/components/history/core/browser/history_model_worker.h
[modify] https://crrev.com/509cc91f68ef68aebfc761bf6bd282c113a1632e/components/password_manager/sync/browser/password_model_worker.cc
[modify] https://crrev.com/509cc91f68ef68aebfc761bf6bd282c113a1632e/components/password_manager/sync/browser/password_model_worker.h
[modify] https://crrev.com/509cc91f68ef68aebfc761bf6bd282c113a1632e/components/sync/driver/glue/browser_thread_model_worker.cc
[modify] https://crrev.com/509cc91f68ef68aebfc761bf6bd282c113a1632e/components/sync/driver/glue/browser_thread_model_worker.h
[modify] https://crrev.com/509cc91f68ef68aebfc761bf6bd282c113a1632e/components/sync/driver/glue/sync_backend_host.h
[modify] https://crrev.com/509cc91f68ef68aebfc761bf6bd282c113a1632e/components/sync/driver/glue/sync_backend_host_impl.cc
[modify] https://crrev.com/509cc91f68ef68aebfc761bf6bd282c113a1632e/components/sync/driver/glue/sync_backend_host_impl.h
[modify] https://crrev.com/509cc91f68ef68aebfc761bf6bd282c113a1632e/components/sync/driver/glue/sync_backend_host_impl_unittest.cc
[modify] https://crrev.com/509cc91f68ef68aebfc761bf6bd282c113a1632e/components/sync/driver/glue/sync_backend_host_mock.cc
[modify] https://crrev.com/509cc91f68ef68aebfc761bf6bd282c113a1632e/components/sync/driver/glue/sync_backend_host_mock.h
[modify] https://crrev.com/509cc91f68ef68aebfc761bf6bd282c113a1632e/components/sync/driver/glue/sync_backend_registrar.cc
[modify] https://crrev.com/509cc91f68ef68aebfc761bf6bd282c113a1632e/components/sync/driver/glue/sync_backend_registrar.h
[modify] https://crrev.com/509cc91f68ef68aebfc761bf6bd282c113a1632e/components/sync/driver/glue/sync_backend_registrar_unittest.cc
[modify] https://crrev.com/509cc91f68ef68aebfc761bf6bd282c113a1632e/components/sync/driver/glue/ui_model_worker.cc
[modify] https://crrev.com/509cc91f68ef68aebfc761bf6bd282c113a1632e/components/sync/driver/glue/ui_model_worker.h
[modify] https://crrev.com/509cc91f68ef68aebfc761bf6bd282c113a1632e/components/sync/engine/model_safe_worker.h
[modify] https://crrev.com/509cc91f68ef68aebfc761bf6bd282c113a1632e/components/sync/engine/passive_model_worker.cc
[modify] https://crrev.com/509cc91f68ef68aebfc761bf6bd282c113a1632e/components/sync/engine/passive_model_worker.h
[modify] https://crrev.com/509cc91f68ef68aebfc761bf6bd282c113a1632e/components/sync/test/engine/fake_model_worker.cc
[modify] https://crrev.com/509cc91f68ef68aebfc761bf6bd282c113a1632e/components/sync/test/engine/fake_model_worker.h
[modify] https://crrev.com/509cc91f68ef68aebfc761bf6bd282c113a1632e/ios/chrome/browser/sync/ios_chrome_profile_sync_service_factory.cc

Status: Fixed (was: Started)
Status: Started (was: Fixed)
Whoops, didn't mean to close this.
Project Member

Comment 5 by bugdroid1@chromium.org, Nov 16 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e238f9653ed383542f2121f38428928c6c619e38

commit e238f9653ed383542f2121f38428928c6c619e38
Author: maxbogue <maxbogue@chromium.org>
Date: Wed Nov 16 06:36:24 2016

[Sync] Remove SyncClient dep from SyncBackendRegistrar.

Instead, just pass in a factory function to create ModelSafeWorkers.

This change also includes various cleanups of the test file:

- No more need for FakeSyncClient.
- Don't take SBR as a param to functions that don't need it.
- Actually have a private section so it's clear what the tests use.
- Move a couple functions to better places.

BUG= 663125 

Review-Url: https://codereview.chromium.org/2501743005
Cr-Commit-Position: refs/heads/master@{#432399}

[modify] https://crrev.com/e238f9653ed383542f2121f38428928c6c619e38/components/sync/driver/glue/sync_backend_host_impl.cc
[modify] https://crrev.com/e238f9653ed383542f2121f38428928c6c619e38/components/sync/driver/glue/sync_backend_registrar.cc
[modify] https://crrev.com/e238f9653ed383542f2121f38428928c6c619e38/components/sync/driver/glue/sync_backend_registrar.h
[modify] https://crrev.com/e238f9653ed383542f2121f38428928c6c619e38/components/sync/driver/glue/sync_backend_registrar_unittest.cc

Project Member

Comment 7 by bugdroid1@chromium.org, Nov 17 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6c9a8fb0c390c21b77340455df70734abaf61342

commit 6c9a8fb0c390c21b77340455df70734abaf61342
Author: maxbogue <maxbogue@chromium.org>
Date: Thu Nov 17 20:08:36 2016

[Sync] Move ChangeProcessor to model/.

BUG= 631271 , 663125 

Review-Url: https://codereview.chromium.org/2508003002
Cr-Commit-Position: refs/heads/master@{#432938}

[modify] https://crrev.com/6c9a8fb0c390c21b77340455df70734abaf61342/components/browser_sync/profile_sync_service.cc
[modify] https://crrev.com/6c9a8fb0c390c21b77340455df70734abaf61342/components/browser_sync/profile_sync_service_mock.h
[modify] https://crrev.com/6c9a8fb0c390c21b77340455df70734abaf61342/components/sync/BUILD.gn
[modify] https://crrev.com/6c9a8fb0c390c21b77340455df70734abaf61342/components/sync/driver/frontend_data_type_controller.cc
[modify] https://crrev.com/6c9a8fb0c390c21b77340455df70734abaf61342/components/sync/driver/frontend_data_type_controller_unittest.cc
[modify] https://crrev.com/6c9a8fb0c390c21b77340455df70734abaf61342/components/sync/driver/generic_change_processor.h
[modify] https://crrev.com/6c9a8fb0c390c21b77340455df70734abaf61342/components/sync/driver/glue/sync_backend_registrar.cc
[modify] https://crrev.com/6c9a8fb0c390c21b77340455df70734abaf61342/components/sync/driver/glue/sync_backend_registrar_unittest.cc
[modify] https://crrev.com/6c9a8fb0c390c21b77340455df70734abaf61342/components/sync/driver/sync_api_component_factory_mock.cc
[rename] https://crrev.com/6c9a8fb0c390c21b77340455df70734abaf61342/components/sync/model/change_processor.cc
[rename] https://crrev.com/6c9a8fb0c390c21b77340455df70734abaf61342/components/sync/model/change_processor.h
[rename] https://crrev.com/6c9a8fb0c390c21b77340455df70734abaf61342/components/sync/model/change_processor_mock.cc
[rename] https://crrev.com/6c9a8fb0c390c21b77340455df70734abaf61342/components/sync/model/change_processor_mock.h
[modify] https://crrev.com/6c9a8fb0c390c21b77340455df70734abaf61342/components/sync_bookmarks/bookmark_change_processor.h
[modify] https://crrev.com/6c9a8fb0c390c21b77340455df70734abaf61342/components/sync_bookmarks/bookmark_data_type_controller_unittest.cc

Project Member

Comment 8 by bugdroid1@chromium.org, Nov 18 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/288c6917ae57645088e0b3346a150be9a2bf5c2c

commit 288c6917ae57645088e0b3346a150be9a2bf5c2c
Author: maxbogue <maxbogue@chromium.org>
Date: Fri Nov 18 05:27:32 2016

[Sync] Move sync's ModelSafeWorker implementations to engine/.

PassiveModelWorker already lives in engine/; BrowserThreadModelWorker
and UIModelWorker should too. This unblocks moving SyncBackendRegistrar
to engine/ as well.

BUG= 631271 ,  663125 

Review-Url: https://codereview.chromium.org/2503423004
Cr-Commit-Position: refs/heads/master@{#433118}

[modify] https://crrev.com/288c6917ae57645088e0b3346a150be9a2bf5c2c/chrome/browser/sync/chrome_sync_client.cc
[modify] https://crrev.com/288c6917ae57645088e0b3346a150be9a2bf5c2c/components/browser_sync/profile_sync_test_util.cc
[modify] https://crrev.com/288c6917ae57645088e0b3346a150be9a2bf5c2c/components/sync/BUILD.gn
[modify] https://crrev.com/288c6917ae57645088e0b3346a150be9a2bf5c2c/components/sync/driver/glue/sync_backend_registrar_unittest.cc
[rename] https://crrev.com/288c6917ae57645088e0b3346a150be9a2bf5c2c/components/sync/engine/browser_thread_model_worker.cc
[rename] https://crrev.com/288c6917ae57645088e0b3346a150be9a2bf5c2c/components/sync/engine/browser_thread_model_worker.h
[rename] https://crrev.com/288c6917ae57645088e0b3346a150be9a2bf5c2c/components/sync/engine/browser_thread_model_worker_unittest.cc
[rename] https://crrev.com/288c6917ae57645088e0b3346a150be9a2bf5c2c/components/sync/engine/ui_model_worker.cc
[rename] https://crrev.com/288c6917ae57645088e0b3346a150be9a2bf5c2c/components/sync/engine/ui_model_worker.h
[rename] https://crrev.com/288c6917ae57645088e0b3346a150be9a2bf5c2c/components/sync/engine/ui_model_worker_unittest.cc
[modify] https://crrev.com/288c6917ae57645088e0b3346a150be9a2bf5c2c/ios/chrome/browser/sync/ios_chrome_sync_client.mm

Project Member

Comment 9 by bugdroid1@chromium.org, Dec 8 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/27ff5590e848a211fc06eb383b3ac954fc5e9901

commit 27ff5590e848a211fc06eb383b3ac954fc5e9901
Author: maxbogue <maxbogue@chromium.org>
Date: Thu Dec 08 01:38:14 2016

[Sync] Plumb initial type set from engine to DTM.

This change is in preparation for moving the synchronous configure logic
out of SyncBackendRegistrar and into DataTypeManagerImpl.

BUG= 663125 

Review-Url: https://codereview.chromium.org/2555433003
Cr-Commit-Position: refs/heads/master@{#437119}

[modify] https://crrev.com/27ff5590e848a211fc06eb383b3ac954fc5e9901/components/browser_sync/profile_sync_components_factory_impl.cc
[modify] https://crrev.com/27ff5590e848a211fc06eb383b3ac954fc5e9901/components/browser_sync/profile_sync_components_factory_impl.h
[modify] https://crrev.com/27ff5590e848a211fc06eb383b3ac954fc5e9901/components/browser_sync/profile_sync_service.cc
[modify] https://crrev.com/27ff5590e848a211fc06eb383b3ac954fc5e9901/components/browser_sync/profile_sync_service.h
[modify] https://crrev.com/27ff5590e848a211fc06eb383b3ac954fc5e9901/components/browser_sync/profile_sync_service_autofill_unittest.cc
[modify] https://crrev.com/27ff5590e848a211fc06eb383b3ac954fc5e9901/components/browser_sync/profile_sync_service_mock.h
[modify] https://crrev.com/27ff5590e848a211fc06eb383b3ac954fc5e9901/components/browser_sync/profile_sync_service_startup_unittest.cc
[modify] https://crrev.com/27ff5590e848a211fc06eb383b3ac954fc5e9901/components/browser_sync/profile_sync_service_typed_url_unittest.cc
[modify] https://crrev.com/27ff5590e848a211fc06eb383b3ac954fc5e9901/components/browser_sync/profile_sync_service_unittest.cc
[modify] https://crrev.com/27ff5590e848a211fc06eb383b3ac954fc5e9901/components/sync/driver/data_type_manager_impl.cc
[modify] https://crrev.com/27ff5590e848a211fc06eb383b3ac954fc5e9901/components/sync/driver/data_type_manager_impl.h
[modify] https://crrev.com/27ff5590e848a211fc06eb383b3ac954fc5e9901/components/sync/driver/data_type_manager_impl_unittest.cc
[modify] https://crrev.com/27ff5590e848a211fc06eb383b3ac954fc5e9901/components/sync/driver/generic_change_processor_unittest.cc
[modify] https://crrev.com/27ff5590e848a211fc06eb383b3ac954fc5e9901/components/sync/driver/glue/sync_backend_host_core.cc
[modify] https://crrev.com/27ff5590e848a211fc06eb383b3ac954fc5e9901/components/sync/driver/glue/sync_backend_host_impl.cc
[modify] https://crrev.com/27ff5590e848a211fc06eb383b3ac954fc5e9901/components/sync/driver/glue/sync_backend_host_impl.h
[modify] https://crrev.com/27ff5590e848a211fc06eb383b3ac954fc5e9901/components/sync/driver/glue/sync_backend_host_impl_unittest.cc
[modify] https://crrev.com/27ff5590e848a211fc06eb383b3ac954fc5e9901/components/sync/driver/shared_change_processor_unittest.cc
[modify] https://crrev.com/27ff5590e848a211fc06eb383b3ac954fc5e9901/components/sync/driver/sync_api_component_factory.h
[modify] https://crrev.com/27ff5590e848a211fc06eb383b3ac954fc5e9901/components/sync/driver/sync_api_component_factory_mock.h
[modify] https://crrev.com/27ff5590e848a211fc06eb383b3ac954fc5e9901/components/sync/engine/fake_sync_engine.cc
[modify] https://crrev.com/27ff5590e848a211fc06eb383b3ac954fc5e9901/components/sync/engine/sync_engine_host.h

Project Member

Comment 11 by bugdroid1@chromium.org, Jan 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/00f04a8ef2a691cb5f025c112f454f7138f0486b

commit 00f04a8ef2a691cb5f025c112f454f7138f0486b
Author: maxbogue <maxbogue@chromium.org>
Date: Fri Jan 06 19:18:53 2017

[Sync] Filter out types that can't be synced at configure time.

This replaces the previous check that was done inside
SyncBackendRegistrar to see whether the corresponding workers for these
types existed.

BUG= 663125 

Review-Url: https://codereview.chromium.org/2612323003
Cr-Commit-Position: refs/heads/master@{#442003}

[modify] https://crrev.com/00f04a8ef2a691cb5f025c112f454f7138f0486b/chrome/browser/sync/chrome_sync_client.cc
[modify] https://crrev.com/00f04a8ef2a691cb5f025c112f454f7138f0486b/chrome/browser/sync/chrome_sync_client.h
[modify] https://crrev.com/00f04a8ef2a691cb5f025c112f454f7138f0486b/components/browser_sync/profile_sync_components_factory_impl.cc
[modify] https://crrev.com/00f04a8ef2a691cb5f025c112f454f7138f0486b/components/browser_sync/profile_sync_service_autofill_unittest.cc
[modify] https://crrev.com/00f04a8ef2a691cb5f025c112f454f7138f0486b/components/browser_sync/profile_sync_service_typed_url_unittest.cc
[modify] https://crrev.com/00f04a8ef2a691cb5f025c112f454f7138f0486b/components/sync/driver/data_type_manager_impl.cc
[modify] https://crrev.com/00f04a8ef2a691cb5f025c112f454f7138f0486b/components/sync/driver/data_type_manager_impl.h
[modify] https://crrev.com/00f04a8ef2a691cb5f025c112f454f7138f0486b/components/sync/driver/data_type_manager_impl_unittest.cc
[modify] https://crrev.com/00f04a8ef2a691cb5f025c112f454f7138f0486b/components/sync/driver/fake_sync_client.cc
[modify] https://crrev.com/00f04a8ef2a691cb5f025c112f454f7138f0486b/components/sync/driver/fake_sync_client.h
[modify] https://crrev.com/00f04a8ef2a691cb5f025c112f454f7138f0486b/components/sync/driver/sync_client.h
[modify] https://crrev.com/00f04a8ef2a691cb5f025c112f454f7138f0486b/ios/chrome/browser/sync/ios_chrome_sync_client.h
[modify] https://crrev.com/00f04a8ef2a691cb5f025c112f454f7138f0486b/ios/chrome/browser/sync/ios_chrome_sync_client.mm

Project Member

Comment 12 by bugdroid1@chromium.org, Jan 9 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/82712717bb8f87ad7cc66e831d61d5fcb5352053

commit 82712717bb8f87ad7cc66e831d61d5fcb5352053
Author: maxbogue <maxbogue@chromium.org>
Date: Mon Jan 09 22:22:08 2017

[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}

[modify] https://crrev.com/82712717bb8f87ad7cc66e831d61d5fcb5352053/components/browser_sync/abstract_profile_sync_service_test.cc
[modify] https://crrev.com/82712717bb8f87ad7cc66e831d61d5fcb5352053/components/sync/BUILD.gn
[modify] https://crrev.com/82712717bb8f87ad7cc66e831d61d5fcb5352053/components/sync/driver/data_type_controller.h
[modify] https://crrev.com/82712717bb8f87ad7cc66e831d61d5fcb5352053/components/sync/driver/data_type_manager_impl.cc
[modify] https://crrev.com/82712717bb8f87ad7cc66e831d61d5fcb5352053/components/sync/driver/data_type_manager_impl.h
[modify] https://crrev.com/82712717bb8f87ad7cc66e831d61d5fcb5352053/components/sync/driver/data_type_manager_impl_unittest.cc
[modify] https://crrev.com/82712717bb8f87ad7cc66e831d61d5fcb5352053/components/sync/driver/directory_data_type_controller.cc
[modify] https://crrev.com/82712717bb8f87ad7cc66e831d61d5fcb5352053/components/sync/driver/directory_data_type_controller.h
[modify] https://crrev.com/82712717bb8f87ad7cc66e831d61d5fcb5352053/components/sync/driver/fake_data_type_controller.cc
[modify] https://crrev.com/82712717bb8f87ad7cc66e831d61d5fcb5352053/components/sync/driver/fake_data_type_controller.h
[modify] https://crrev.com/82712717bb8f87ad7cc66e831d61d5fcb5352053/components/sync/driver/glue/sync_backend_host_core.cc
[modify] https://crrev.com/82712717bb8f87ad7cc66e831d61d5fcb5352053/components/sync/driver/glue/sync_backend_host_core.h
[modify] https://crrev.com/82712717bb8f87ad7cc66e831d61d5fcb5352053/components/sync/driver/glue/sync_backend_host_impl.cc
[modify] https://crrev.com/82712717bb8f87ad7cc66e831d61d5fcb5352053/components/sync/driver/glue/sync_backend_host_impl.h
[modify] https://crrev.com/82712717bb8f87ad7cc66e831d61d5fcb5352053/components/sync/driver/glue/sync_backend_host_impl_unittest.cc
[modify] https://crrev.com/82712717bb8f87ad7cc66e831d61d5fcb5352053/components/sync/driver/model_type_controller.cc
[modify] https://crrev.com/82712717bb8f87ad7cc66e831d61d5fcb5352053/components/sync/driver/model_type_controller.h
[modify] https://crrev.com/82712717bb8f87ad7cc66e831d61d5fcb5352053/components/sync/driver/model_type_controller_unittest.cc
[modify] https://crrev.com/82712717bb8f87ad7cc66e831d61d5fcb5352053/components/sync/driver/proxy_data_type_controller.cc
[modify] https://crrev.com/82712717bb8f87ad7cc66e831d61d5fcb5352053/components/sync/driver/proxy_data_type_controller.h
[modify] https://crrev.com/82712717bb8f87ad7cc66e831d61d5fcb5352053/components/sync/engine/fake_sync_engine.cc
[modify] https://crrev.com/82712717bb8f87ad7cc66e831d61d5fcb5352053/components/sync/engine/fake_sync_engine.h
[modify] https://crrev.com/82712717bb8f87ad7cc66e831d61d5fcb5352053/components/sync/engine/model_type_configurer.cc
[modify] https://crrev.com/82712717bb8f87ad7cc66e831d61d5fcb5352053/components/sync/engine/model_type_configurer.h
[modify] https://crrev.com/82712717bb8f87ad7cc66e831d61d5fcb5352053/components/sync/engine/sync_engine.h
[add] https://crrev.com/82712717bb8f87ad7cc66e831d61d5fcb5352053/components/sync/engine/sync_engine_host_stub.cc
[add] https://crrev.com/82712717bb8f87ad7cc66e831d61d5fcb5352053/components/sync/engine/sync_engine_host_stub.h

Owner: pav...@chromium.org
Status: Assigned (was: Started)
Assigning to Pavel to do or re-assess.
Status: Archived (was: Assigned)

Sign in to add a comment