Description[Sync] Get SyncServce instead of ProfileSyncService.
In unit tests we call SetTestingFactoryAndUse to override how the
ProfileSyncServiceFactory works, and return a SyncService >
FakeSyncService > TestSyncService object. However, in these same unit
tests, we cause the SyncInternalsMessageHandler to call
ProfileSyncServiceFactory::GetForProfile which statically casts to
ProfileSyncService (which extends SyncServiceBase and SyncService),
which is clearly an invalid cast.
This fix switches SyncInternalsMessageHandler's behavior to retrieve
only a SyncService (which is all it uses anyways). It seems that in the
future we may want to auto retrievals from ProfileSyncServiceFactory
and see if we can switch more people to use the SyncService interface
only.
My understanding is that long term everyone external to Sync should
just use SyncService and we will no longer need to expose the concrete
ProfileSyncService, but we are currently very far from that world being
reality.
BUG=731884
Review-Url: https://codereview.chromium.org/2948603002
Cr-Commit-Position: refs/heads/master@{#480831}
Committed: https://chromium.googlesource.com/chromium/src/+/481300507088191e19ebc7f9d722cb58d80cdcdf
Patch Set 1 #
Messages
Total messages: 22 (14 generated)
|