This directory exposes Chromium Sync's service layer to Android Java code such as settings UI and sign-in flows. It provides the org.chromium.components.sync Java package and the JNI bridge that forwards calls to the native SyncService and SyncUserSettings interfaces and propagates state changes back to Java listeners.
Everything here runs on the UI thread, the same sequence as the native SyncService.
SyncService is the public Java interface, mirroring syncer::SyncService and syncer::SyncUserSettings (implemented by SyncServiceImpl and SyncServiceAndroidBridge, and obtained via SyncServiceFactory.getForProfile(); tests can inject FakeSyncServiceImpl via SyncServiceFactory.setInstanceForTesting()). It exposes transport state, active and user-selected data types, auth and user-actionable errors, passphrase and trusted-vault state, and local-data queries and migration triggers.SyncService.SyncStateChangedListener: implement it and call addSyncStateChangedListener() to learn whenever the underlying sync state changes (SyncServiceObserver::OnStateChanged()).LocalDataDescription and Passphrase: value and helper types used with SyncService — the Java mirror of syncer::LocalDataDescription returned by getLocalDataDescriptions() (with JNI domain-summary formatting in local_data_description.cc), and static predicates for @PassphraseType values.SyncFeatureMap: the FeatureMap accessor for querying Sync base::Feature flags exposed in sync_feature_map.cc.ExplicitPassphrasePlatformClient: a package-private ServiceLoaderUtil hook called from SyncServiceImpl to share explicit-passphrase NigoriKey material with external sync clients on the device.SyncService across JNI: Java code passing a SyncService to its own @NativeMethods can annotate the parameter with @JniType("syncer::SyncService*") to receive the native pointer directly (conversion in sync_service_android_bridge.h). The @IntDef enums used on SyncService (DataType, UserSelectableType, PassphraseType, TransportState, UserActionableError) are generated from the corresponding C++ enums in ../base/ and sync_service.h.No public design doc covers this directory specifically. Related public pages:
chrome://sync-internals, whose node dump is also exposed to Java tests through SyncService.getAllNodes().