components/sync/engine/)This directory implements the core Sync protocol engine (part B of the architecture overview). Unless noted otherwise, classes in this directory run on the dedicated Sync sequence (SequencedTaskRunner), isolated from the UI thread and individual model sequences.
SyncScheduler / SyncSchedulerImpl: Orchestrates when configuration, nudge, and poll sync cycles execute, tracking global throttling/backoff and per-datatype state via NudgeTracker.Syncer: Executes individual sync cycles (GetUpdates downloads and Commit uploads).ServerConnectionManager / SyncServerConnectionManager: Handles HTTP transport (PostBuffer()) and reports server connection status changes.DataTypeWorker: Bridges each connected data type between the Sync sequence and its model sequence.Access token acquisition and retry behavior span the UI thread (SyncAuthManager) and the Sync sequence (SyncSchedulerImpl and SyncServerConnectionManager):
IdentityManager fetches access tokens directly; on mobile, the responsibility for fetching access tokens lies outside of Chrome (in the platform account manager). IdentityManager performs a bounded number of fast exponential retries (< ~30s total) before reporting a failure to SyncAuthManager, so brief transient network blips resolve at this layer without surfacing to Sync.SyncAuthManager and SyncSchedulerImpl).CONNECTION_AUTH_ERROR / HTTP 401): When the Sync server rejects a request with HTTP 401—or when SyncServerConnectionManager rejects an expired or missing token locally with HTTP 401 before sending a request—SyncAuthManager invalidates the cached token, and Sync-layer backoff rate-limits repeated retries.ignore_auth_credentials_): Local sync operates without a signed-in account or access token.Key histograms emitted along the scheduling and HTTP transport path include Sync.URLFetchAccessToken, Sync.URLFetchResponse, Sync.CommitResponse, Sync.PostedDataTypeCommitRequest, and Sync.PostedGetUpdatesOrigin.
Some metrics along this path are emitted before an actual network request is sent and may therefore be duplicated when a cycle is retried.