|
Sync: Refactoring of DEVICE_INFO syncable type - Part 1
This change introduces a new class LocalDeviceInfoProvider that is responsible
for providing the local device specific DeviceInfo/cache_guid. It initializes
the data asynchronously and allows consumers to get notified when the data
becomes available.
LocalDeviceInfoProvider will allow to remove these responsibilities from
SyncedDeviceTracker / ProfileSyncService and loose coupling between
ProfileSyncService and a number of SyncableService and DataTypeController
derived classes.
LocalDeviceInfoProvider is hosted on the frontend thread. Since it needs
cache_guid to initialize DeviceInfo, which is currently available only on the
backend, I updated SyncBackendHostCore and SyncBackendHostImpl to pass
cache_guid to the frontend via OnBackendInitialized.
For the time being SyncedDeviceTracker remains unchanged
and continues to initialize the local device info too. The entire class will be
removed in the Part 2 of the change which will move SyncedDeviceTracker
functionality to a new SyncableService.
LocalDeviceInfoProvider also replaces SessionsSyncManager::SyncInternalApiDelegate
which was previously used to decouple SessionsSyncManager from the specifics of
of the local device info implementation.
SessionsSyncManager is changed to consume LocalDeviceInfoProvider instead of
SessionsSyncManager::SyncInternalApiDelegate.
SessionDataTypeController now also consumes LocalDeviceInfoProvider to make sure
that SESSIONS type model doesn't start before local device info becomes available.
A very similar approach will be used in the upcoming second part of the change
for DEVICE_INFO DataTypeController and SyncableType.
The change includes new unit tests for LocalDeviceInfoProvider and
SessionDataTypeController.
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=283461
Total comments: 2
Total comments: 19
Total comments: 14
Total comments: 6
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+893 lines, -189 lines) |
Patch |
 |
M |
chrome/browser/extensions/api/preferences_private/preferences_private_apitest.cc
|
View
|
1
2
3
4
5
6
|
2 chunks |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/api/sessions/sessions_apitest.cc
|
View
|
1
2
3
4
5
6
|
5 chunks |
+25 lines, -10 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api.cc
|
View
|
|
3 chunks |
+6 lines, -1 line |
0 comments
|
Download
|
 |
A |
chrome/browser/sync/glue/local_device_info_provider.h
|
View
|
1
2
3
|
1 chunk |
+48 lines, -0 lines |
0 comments
|
Download
|
 |
A |
chrome/browser/sync/glue/local_device_info_provider_impl.h
|
View
|
1
2
3
|
1 chunk |
+39 lines, -0 lines |
0 comments
|
Download
|
 |
A |
chrome/browser/sync/glue/local_device_info_provider_impl.cc
|
View
|
1
2
3
|
1 chunk |
+58 lines, -0 lines |
0 comments
|
Download
|
 |
A |
chrome/browser/sync/glue/local_device_info_provider_mock.h
|
View
|
1
2
3
4
5
|
1 chunk |
+43 lines, -0 lines |
0 comments
|
Download
|
 |
A |
chrome/browser/sync/glue/local_device_info_provider_mock.cc
|
View
|
1
2
3
4
5
|
1 chunk |
+58 lines, -0 lines |
0 comments
|
Download
|
 |
A |
chrome/browser/sync/glue/local_device_info_provider_unittest.cc
|
View
|
1
2
3
|
1 chunk |
+82 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/glue/non_frontend_data_type_controller_unittest.cc
|
View
|
1
2
3
4
5
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/glue/sync_backend_host_core.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/glue/sync_backend_host_impl.h
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/glue/sync_backend_host_impl.cc
|
View
|
|
3 chunks |
+4 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/glue/sync_backend_host_impl_unittest.cc
|
View
|
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/glue/sync_backend_host_mock.cc
|
View
|
|
2 chunks |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/profile_sync_components_factory.h
|
View
|
1
2
3
4
5
6
|
2 chunks |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/profile_sync_components_factory_impl.h
|
View
|
1
2
3
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/profile_sync_components_factory_impl.cc
|
View
|
1
2
3
|
3 chunks |
+12 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/profile_sync_components_factory_impl_unittest.cc
|
View
|
1
2
3
4
5
6
|
2 chunks |
+14 lines, -12 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/profile_sync_components_factory_mock.h
|
View
|
1
2
3
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/profile_sync_components_factory_mock.cc
|
View
|
1
2
3
4
5
|
4 chunks |
+17 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/profile_sync_service.h
|
View
|
1
2
3
4
5
6
|
7 chunks |
+12 lines, -15 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/profile_sync_service.cc
|
View
|
1
2
3
4
5
6
7
|
7 chunks |
+18 lines, -23 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/profile_sync_service_factory.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+7 lines, -5 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/profile_sync_service_mock.h
|
View
|
1
2
3
4
5
6
|
3 chunks |
+4 lines, -7 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/profile_sync_service_mock.cc
|
View
|
1
2
3
4
5
6
|
3 chunks |
+15 lines, -6 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/profile_sync_service_startup_unittest.cc
|
View
|
1
2
3
4
5
6
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/profile_sync_service_unittest.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/sessions/session_data_type_controller.h
|
View
|
|
3 chunks |
+21 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/sessions/session_data_type_controller.cc
|
View
|
1
2
3
|
6 chunks |
+42 lines, -5 lines |
0 comments
|
Download
|
 |
A |
chrome/browser/sync/sessions/session_data_type_controller_unittest.cc
|
View
|
1
2
3
|
1 chunk |
+233 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/sessions/sessions_sync_manager.h
|
View
|
1
2
3
|
4 chunks |
+6 lines, -15 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/sessions/sessions_sync_manager.cc
|
View
|
1
2
3
|
6 chunks |
+26 lines, -8 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/sessions/sessions_sync_manager_unittest.cc
|
View
|
|
6 chunks |
+18 lines, -17 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/test_profile_sync_service.h
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/test_profile_sync_service.cc
|
View
|
1
2
3
4
5
6
|
2 chunks |
+9 lines, -9 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller_unittest.mm
|
View
|
1
2
3
4
5
6
|
5 chunks |
+15 lines, -17 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/sync/one_click_signin_helper_unittest.cc
|
View
|
1
2
3
4
5
6
|
2 chunks |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/sync/one_click_signin_sync_observer_unittest.cc
|
View
|
1
2
3
4
5
6
|
2 chunks |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/toolbar/recent_tabs_sub_menu_model_unittest.cc
|
View
|
1
2
3
4
5
6
|
4 chunks |
+11 lines, -19 lines |
0 comments
|
Download
|
 |
M |
chrome/chrome_browser.gypi
|
View
|
1
2
3
4
5
6
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/chrome_tests_unit.gypi
|
View
|
1
2
3
4
5
6
|
4 chunks |
+6 lines, -2 lines |
0 comments
|
Download
|
 |
M |
components/sync_driver/sync_frontend.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
Total messages: 23 (0 generated)
|