-
Mikel Astiz authored
This historic mechanism to inject dependencies into ProfileSyncService doesn't belong in SyncClient (dependencies to core sync logic / engine itself), and it's questionable whether it should remain in this form in BrowserSyncClient, where feature-specific dependencies are injected, and where multiple similar approaches coexist. Arguably, the most elegant and universal way to inject a dependency to a sync controller is to have full access to the KeyedService that owns the local model. Most controllers are simple and don't actually need this: all they need is a SyncableService or ModelTypeControllerDelegate. However, that introduces code inconsistencies that can be confusing. In this patch, the approach is unified for the remaining SyncableService types, after migrating history delete directives and preferences). The corresponding keyed services are directly injected via BrowserSyncClient and hence SyncClient::GetSyncableServiceForType() can be deleted. Change-Id: I8e80482e8657624dc7c1e15b6bcf0409ae4d1336 Bug: 915154 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2463617Reviewed-by:
Marc Treib <treib@chromium.org> Commit-Queue: Mikel Astiz <mastiz@chromium.org> Cr-Commit-Position: refs/heads/master@{#816550}
de2a0999