See sdefresne@'s comments on https://codereview.chromium.org/2768923005/
The basic idea is that we are declaring DependOns in [IOSChrome]ProfileSyncServiceFactory but for the most part not actually using the corresponding KeyedServiceFactories there. Instead we use them in the [IOS]ChromeSyncClient. This is okayish, in that we're successfully protecting ourselves from having our dependencies yanked out from underneath us. But it makes the code confusing to read and obfuscates why/where we actually use our depdenecies.
A better approach would to have the [IOSChrome]ProfileSyncServiceFactory retrieve services and pass then into the PSS's constructor somehow. This would allow overriding them in tests, and make the code easier to follow.
Comment 1 by s...@chromium.org
, Mar 28 2017