Sync Integration Checklist
If you want to integrate with our infrastructure, please follow these steps:
- Before starting any integration work, please reach out to us at chrome-sync-dev@google.com and share your plans / design doc! The Chrome Sync team will assign you a "champion" (primary contact person) to review your designs and code.
- If you're a Googler, please also file a bug via go/create-new-sync-data-type-bug
- Define your specifics proto in
//components/sync/protocol/
. - Add it to the proto value conversions files.
- Add a field for it to
EntitySpecifics
. - At this point, there are also some server-side integration steps to be done. They should be discussed in the thread or bug created above.
- Add it to the
ModelType
enum andkModelTypeInfoMap
. There are several static_assert() which will need to be updated. Some of those live in code specific to platforms you're not compiling to, so it's worth trying to find them via code search, e.g. with this query. - Add to the
SyncModelTypes
enum inenums.xml
and to theSyncModelType
suffix inhistograms.xml
. - If your type should have its own toggle in sync settings, add an entry to
the
UserSelectableType
enum, add a preference for tracking whether your type is enabled, and map your type to the pref inGetPrefNameForType
. Add the toggle UI for each supported platform: - Otherwise, if your type should be included in an existing toggle in sync
settings, add it in
GetUserSelectableTypeInfo
. - Register a
ModelTypeController
for your type inSyncApiComponentFactoryImpl::CreateCommonModelTypeControllers
or platform-specific equivalent inChromeSyncClient::CreateModelTypeControllers
. - Add your KeyedService dependency to
SyncServiceFactory
. - Implement the actual data type logic. This will mostly be an implementation
of the
ModelTypeSyncBridge
interface.- Add the sync team as co-owners of the bridge (and any associated
helpers, if appropriate), by adding something like
per-file *sync_bridge*=file://components/sync/OWNERS
to your OWNERS file. This allows us to do refactorings that touch all the bridges without needing reviews from tens of owners.
- Add the sync team as co-owners of the bridge (and any associated
helpers, if appropriate), by adding something like
- Write some integration tests.
- While rolling out your new data type, keep the Sync team in the loop! E.g. CC your assigned champion on all Finch CLs.
- If you're a Googler, please fill out go/sync-integration-feedback.