|
|
[Sync] Make directory types registration explicit in ModelTypeRegistry
The goal of this change is to make registration of directory types with
ModelTypeRegistry to be driven by individual data type controllers. Today set of
directory data types are registered with single call to
SetEnabledDirectoryTypes, they are derived from routing info passed through
sync manager and scheduler.
Since datatype registration will be performed as separate posts to sync thread
it is important to switch scheduler to configuration mode at the beginning of
configuration.
In this change I:
- Added Register/UnregisterDirectoryType to ModelTypeConnector and
ModelTypeRegistry.
- Removed SetEnabledDirectoryTypes form ModelTypeRegistry as it is no longer
needed.
- Added StartConfiguration to SyncEngine. This method needs to be called before
RegisterDirectoryDataType are called so that normal sync cycle doesn't get
executed on sync thread and doesn't include new datatypes before their
services are ready to receive updates.
- Added BeforeLoadModels method to DataTypeController. This method is called
right before LoadModels and allows directory datatypes to register with sync
engine before initial data downloading begins.
BUG= 647505
R=maxbogue@chromium.org
Review-Url: https://codereview.chromium.org/2641523004
Cr-Commit-Position: refs/heads/master@{#444846}
Committed: https://chromium.googlesource.com/chromium/src/+/1c7af89ea2d8e6e5e31be9d1f7bfa6c306584f5d
Total comments: 14
Total comments: 12
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+532 lines, -561 lines) |
Patch |
 |
M |
components/browser_sync/profile_sync_service.cc
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
components/sync/driver/data_type_controller.h
|
View
|
1
2
|
1 chunk |
+6 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/sync/driver/data_type_manager_impl.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
components/sync/driver/data_type_manager_impl.cc
|
View
|
|
1 chunk |
+6 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/sync/driver/data_type_manager_impl_unittest.cc
|
View
|
|
28 chunks |
+55 lines, -1 line |
0 comments
|
Download
|
 |
M |
components/sync/driver/directory_data_type_controller.h
|
View
|
1
2
|
2 chunks |
+9 lines, -5 lines |
0 comments
|
Download
|
 |
M |
components/sync/driver/directory_data_type_controller.cc
|
View
|
1
2
|
2 chunks |
+25 lines, -19 lines |
0 comments
|
Download
|
 |
M |
components/sync/driver/glue/sync_backend_host_core.h
|
View
|
|
1 chunk |
+6 lines, -2 lines |
0 comments
|
Download
|
 |
M |
components/sync/driver/glue/sync_backend_host_core.cc
|
View
|
1
|
5 chunks |
+18 lines, -10 lines |
0 comments
|
Download
|
 |
M |
components/sync/driver/glue/sync_backend_host_impl.h
|
View
|
|
2 chunks |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/sync/driver/glue/sync_backend_host_impl.cc
|
View
|
|
3 chunks |
+18 lines, -6 lines |
0 comments
|
Download
|
 |
M |
components/sync/driver/glue/sync_backend_host_impl_unittest.cc
|
View
|
|
9 chunks |
+0 lines, -9 lines |
0 comments
|
Download
|
 |
M |
components/sync/driver/model_association_manager.h
|
View
|
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/sync/driver/model_association_manager.cc
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
components/sync/driver/model_association_manager_unittest.cc
|
View
|
|
13 chunks |
+18 lines, -1 line |
0 comments
|
Download
|
 |
M |
components/sync/driver/model_type_controller.h
|
View
|
1
2
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
components/sync/driver/model_type_controller.cc
|
View
|
1
2
|
2 chunks |
+14 lines, -12 lines |
0 comments
|
Download
|
 |
M |
components/sync/driver/model_type_controller_unittest.cc
|
View
|
1
2
|
1 chunk |
+9 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/sync/driver/proxy_data_type_controller.h
|
View
|
1
2
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
components/sync/driver/proxy_data_type_controller.cc
|
View
|
1
2
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/sync/engine/fake_model_type_connector.h
|
View
|
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
components/sync/engine/fake_model_type_connector.cc
|
View
|
|
1 chunk |
+7 lines, -2 lines |
0 comments
|
Download
|
 |
M |
components/sync/engine/fake_sync_engine.h
|
View
|
|
2 chunks |
+6 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/sync/engine/fake_sync_engine.cc
|
View
|
|
2 chunks |
+7 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/sync/engine/fake_sync_manager.h
|
View
|
1
|
6 chunks |
+8 lines, -11 lines |
0 comments
|
Download
|
 |
M |
components/sync/engine/fake_sync_manager.cc
|
View
|
1
|
6 chunks |
+11 lines, -17 lines |
0 comments
|
Download
|
 |
M |
components/sync/engine/model_type_configurer.h
|
View
|
|
1 chunk |
+10 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/sync/engine/model_type_connector.h
|
View
|
1
|
3 chunks |
+18 lines, -5 lines |
0 comments
|
Download
|
 |
M |
components/sync/engine/sync_engine.h
|
View
|
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/sync/engine/sync_manager.h
|
View
|
1
2
|
3 chunks |
+12 lines, -4 lines |
0 comments
|
Download
|
 |
M |
components/sync/engine_impl/cycle/sync_cycle.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
components/sync/engine_impl/cycle/sync_cycle_context.h
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
components/sync/engine_impl/cycle/sync_cycle_context.cc
|
View
|
|
1 chunk |
+0 lines, -5 lines |
0 comments
|
Download
|
 |
M |
components/sync/engine_impl/model_type_connector_proxy.h
|
View
|
|
2 chunks |
+5 lines, -2 lines |
0 comments
|
Download
|
 |
M |
components/sync/engine_impl/model_type_connector_proxy.cc
|
View
|
|
1 chunk |
+20 lines, -7 lines |
0 comments
|
Download
|
 |
M |
components/sync/engine_impl/model_type_registry.h
|
View
|
|
4 chunks |
+12 lines, -11 lines |
0 comments
|
Download
|
 |
M |
components/sync/engine_impl/model_type_registry.cc
|
View
|
1
|
4 chunks |
+58 lines, -68 lines |
0 comments
|
Download
|
 |
M |
components/sync/engine_impl/model_type_registry_unittest.cc
|
View
|
|
5 chunks |
+72 lines, -130 lines |
0 comments
|
Download
|
 |
M |
components/sync/engine_impl/sync_manager_impl.h
|
View
|
1
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
components/sync/engine_impl/sync_manager_impl.cc
|
View
|
1
|
4 chunks |
+11 lines, -11 lines |
0 comments
|
Download
|
 |
M |
components/sync/engine_impl/sync_manager_impl_unittest.cc
|
View
|
|
10 chunks |
+41 lines, -109 lines |
0 comments
|
Download
|
 |
M |
components/sync/engine_impl/sync_scheduler.h
|
View
|
|
2 chunks |
+0 lines, -3 lines |
0 comments
|
Download
|
 |
M |
components/sync/engine_impl/sync_scheduler_impl.cc
|
View
|
|
3 chunks |
+0 lines, -26 lines |
0 comments
|
Download
|
 |
M |
components/sync/engine_impl/sync_scheduler_impl_unittest.cc
|
View
|
|
19 chunks |
+7 lines, -31 lines |
0 comments
|
Download
|
 |
M |
components/sync/engine_impl/syncer_unittest.cc
|
View
|
|
5 chunks |
+7 lines, -39 lines |
0 comments
|
Download
|
 |
M |
components/sync/tools/sync_client.cc
|
View
|
1
|
2 chunks |
+7 lines, -5 lines |
0 comments
|
Download
|
Total messages: 25 (17 generated)
|