ProfileSyncServiceMock inherits from ProfileSyncService, i.e. from the concrete implementation, and then overrides *some* of its methods with mocks. The result is a partial implementation that's just a mess, and makes refactorings like issue 884159 more difficult.
I'd say the root of the problem is that ProfileSyncServiceFactory should really be just SyncServiceFactory, and return a pointer to the SyncService interface rather than to the concrete ProfileSyncService implementation. As it is, many tests have no choice but to use ProfileSyncServiceMock (or something else derived from ProfileSyncService ), even when they just want a simple FakeSyncService that returns some particular values.
Comment 1 by bugdroid1@chromium.org
, Dec 3