ProfileSyncService implements too many interfaces |
|||
Issue descriptionProfileSyncService implements way too many interfaces. Hopefully some of these can be extracted into separate classes. Full list as of right now: - syncer::SyncService - syncer::DataTypeEncryptionHandler - KeyedService - syncer::SyncEngineHost - syncer::SyncPrefObserver - syncer::DataTypeManagerObserver - syncer::UnrecoverableErrorHandler - OAuth2TokenService::Observer - identity::IdentityManager::Observer - GaiaCookieManagerService::Observer
,
May 8 2018
Initial survey: SyncService and KeyedService are fine. Identity-related things: See also bug 825190 . - OAuth2TokenService::Observer might get removed mid-term. - GaiaCookieManagerService::Observer is only for detecting cookie jar stats (mismatch, empty), I think this should get obsolete with DICE. - IdentityManager::Observer should be fine, could maybe be extracted into a new "SyncAccountTracker" or something like that. SyncEngineHost: This is basically an observer for the SyncEngine, and it has lots of methods. Maybe the whole SyncEngine lifetime can be extracted into another class. SyncPrefObserver: Only used for detecting changes to the "sync managed" pref, i.e. whether Sync is forced off by policy. Probably fine. DataTypeManagerObserver: Gets notified of OnConfigureStart and OnConfigureDone. Doesn't seem like this can be easily extracted. UnrecoverableErrorHandler: This is passed to the SyncEngine, maybe it can be merged into SyncEngineHost (and extracted along with that)?
,
May 22 2018
https://crrev.com/c/1057508 has extraced OAuth2TokenService::Observer and IdentityManager::Observer into a separate class (SyncAuthManager).
,
Nov 6
I don't think there's any low-hanging fruit left here: - The identity/OAuth things have been pulled out. - SyncEngineHost and DataTypeManagerObserver won't be easy to pull out. - UnrecoverableErrorHandler might be possible to remove, but it's only used for the Directory, so it'll hopefully become obsolete soonish anyway. - GaiaCookieManagerService::Observer will become obsolete once DICe is fully rolled out. So let's close this. |
|||
►
Sign in to add a comment |
|||
Comment 1 by mastiz@chromium.org
, May 8 2018