<!--
Copyright 2020 The Chromium Authors
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->

<!--
This file is used to generate a comprehensive list of Sync histograms
along with a detailed description for each histogram.

For best practices on writing histogram descriptions, see
https://chromium.googlesource.com/chromium/src.git/+/HEAD/tools/metrics/histograms/README.md

Please follow the instructions in the OWNERS file in this directory to find a
reviewer. If no OWNERS file exists, please consider signing up at
go/reviewing-metrics (Googlers only), as all subdirectories are expected to
have an OWNERS file. As a last resort you can send the CL to
chromium-metrics-reviews@google.com.
-->

<histogram-configuration>

<histograms>

<variants name="AssociateWindowsType">
  <variant name="SessionRestore"
      summary="Recorded during session restore. This should only happen on
               start up."/>
  <variant name="TabModification"
      summary="Recorded on tab modification, such as a when a new WebContents
               is shown."/>
</variants>

<!-- LINT.IfChange(DataTypeHistogramSuffix) -->

<variants name="SyncDataType">
  <variant name=".ACCOUNT_SETTING" summary="ACCOUNT_SETTING"/>
  <variant name=".AI_THREAD" summary="AI_THREAD"/>
  <variant name=".APP" summary="APP"/>
  <variant name=".APP_LIST" summary="APP_LIST"/>
  <variant name=".APP_SETTING" summary="APP_SETTING"/>
  <variant name=".ARC_PACKAGE" summary="ARC_PACKAGE"/>
  <variant name=".AUTOFILL" summary="AUTOFILL"/>
  <variant name=".AUTOFILL_OFFER" summary="AUTOFILL_OFFER"/>
  <variant name=".AUTOFILL_PROFILE" summary="AUTOFILL_PROFILE"/>
  <variant name=".AUTOFILL_VALUABLE" summary="AUTOFILL_VALUABLE"/>
  <variant name=".AUTOFILL_VALUABLE_METADATA"
      summary="AUTOFILL_VALUABLE_METADATA"/>
  <variant name=".AUTOFILL_WALLET" summary="AUTOFILL_WALLET"/>
  <variant name=".AUTOFILL_WALLET_CREDENTIAL"
      summary="AUTOFILL_WALLET_CREDENTIAL"/>
  <variant name=".AUTOFILL_WALLET_USAGE" summary="AUTOFILL_WALLET_USAGE"/>
  <variant name=".BOOKMARK" summary="BOOKMARK"/>
  <variant name=".COLLABORATION_GROUP" summary="COLLABORATION_GROUP"/>
  <variant name=".CONTACT_INFO" summary="CONTACT_INFO"/>
  <variant name=".CONTEXTUAL_TASK" summary="CONTEXTUAL_TASK"/>
  <variant name=".COOKIE" summary="COOKIE"/>
  <variant name=".DEVICE_INFO" summary="DEVICE_INFO"/>
  <variant name=".DICTIONARY" summary="DICTIONARY"/>
  <variant name=".ENCRYPTED_TAB_CONTEXT_CONTAINER"
      summary="ENCRYPTED_TAB_CONTEXT_CONTAINER"/>
  <variant name=".ENCRYPTED_TAB_CONTEXT_ITEM"
      summary="ENCRYPTED_TAB_CONTEXT_ITEM"/>
  <variant name=".EXTENSION" summary="EXTENSION"/>
  <variant name=".EXTENSION_SETTING" summary="EXTENSION_SETTING"/>
  <variant name=".GEMINI_THREAD" summary="GEMINI_THREAD"/>
  <variant name=".HISTORY" summary="HISTORY"/>
  <variant name=".HISTORY_DELETE_DIRECTIVE" summary="HISTORY_DELETE_DIRECTIVE"/>
  <variant name=".INCOMING_PASSWORD_SHARING_INVITATION"
      summary="INCOMING_PASSWORD_SHARING_INVITATION"/>
  <variant name=".JOURNEY" summary="JOURNEY"/>
  <variant name=".MANAGED_USER_SETTING" summary="MANAGED_USER_SETTING"/>
  <variant name=".NIGORI" summary="NIGORI"/>
  <variant name=".NOTEBOOK" summary="NOTEBOOK"/>
  <variant name=".OS_PREFERENCE" summary="OS_PREFERENCE"/>
  <variant name=".OS_PRIORITY_PREFERENCE" summary="OS_PRIORITY_PREFERENCE"/>
  <variant name=".OUTGOING_PASSWORD_SHARING_INVITATION"
      summary="OUTGOING_PASSWORD_SHARING_INVITATION"/>
  <variant name=".PASSWORD" summary="PASSWORD"/>
  <variant name=".PREFERENCE" summary="PREFERENCE"/>
  <variant name=".PRINTER" summary="PRINTER"/>
  <variant name=".PRINTERS_AUTHORIZATION_SERVER"
      summary="PRINTERS_AUTHORIZATION_SERVER"/>
  <variant name=".PRIORITY_PREFERENCE" summary="PRIORITY_PREFERENCE"/>
  <variant name=".PRODUCT_COMPARISON" summary="PRODUCT_COMPARISON"/>
  <variant name=".READING_LIST" summary="READING_LIST"/>
  <variant name=".SAVED_TAB_GROUP" summary="SAVED_TAB_GROUP"/>
  <variant name=".SEARCH_ENGINE" summary="SEARCH_ENGINE"/>
  <variant name=".SECURITY_EVENT" summary="SECURITY_EVENT"/>
  <variant name=".SEND_TAB_TO_SELF" summary="SEND_TAB_TO_SELF"/>
  <variant name=".SESSION" summary="SESSION"/>
  <variant name=".SHARED_COMMENT" summary="SHARED_COMMENT"/>
  <variant name=".SHARED_TAB_GROUP_ACCOUNT_DATA"
      summary="SHARED_TAB_GROUP_ACCOUNT_DATA"/>
  <variant name=".SHARED_TAB_GROUP_DATA" summary="SHARED_TAB_GROUP_DATA"/>
  <variant name=".SHARING_MESSAGE" summary="SHARING_MESSAGE"/>
  <variant name=".SKILL" summary="SKILL"/>
  <variant name=".THEME" summary="THEME"/>
  <variant name=".THEME_IOS" summary="THEME_IOS"/>
  <variant name=".THEMES_ANDROID" summary="THEMES_ANDROID"/>
  <variant name=".USER_CONSENT" summary="USER_CONSENT"/>
  <variant name=".USER_EVENT" summary="USER_EVENT"/>
  <variant name=".WALLET_METADATA" summary="WALLET_METADATA"/>
  <variant name=".WEB_APK" summary="WEB_APK"/>
  <variant name=".WEB_APP" summary="WEB_APP"/>
  <variant name=".WEBAUTHN_CREDENTIAL" summary="WEBAUTHN_CREDENTIAL"/>
  <variant name=".WIFI_CONFIGURATION" summary="WIFI_CONFIGURATION"/>
  <variant name=".WORKSPACE_DESK" summary="WORKSPACE_DESK"/>
</variants>

<!-- LINT.ThenChange(/components/sync/base/data_type.cc:DataTypeHistogramSuffix) -->

<variants name="SyncDataTypeForSyncToSigninMigration">
  <variant name=".BOOKMARK" summary="BOOKMARK"/>
  <variant name=".EXTENSION" summary="EXTENSIONS"/>
  <variant name=".PASSWORD" summary="PASSWORD"/>
  <variant name=".READING_LIST" summary="READING_LIST"/>
  <variant name=".THEME" summary="THEMES"/>
</variants>

<variants name="SyncErrorInfobarTrigger">
  <variant name="" summary="Any trigger, this is just a total count."/>
  <variant name=".NewTab" summary="Opening a new tab."/>
  <variant name=".PasswordForm" summary="Loading a page with a password form."/>
</variants>

<variants name="SyncErrorReason">
  <variant name=".AuthError" summary="Auth error."/>
  <variant name=".BookmarkLimitReached" summary="Bookmark limit reached."/>
  <variant name=".ClientOutOfDate" summary="Client out of date."/>
  <variant name=".PassphraseRequired" summary="Passphrase required."/>
  <variant name=".TrustedVaultKeyRequiredForEverything"
      summary="Trusted vault keys required for everything."/>
  <variant name=".TrustedVaultKeyRequiredForPasswords"
      summary="Trusted vault keys required for passwords."/>
  <variant name=".TrustedVaultRecoverabilityDegradedForEverything"
      summary="Trusted vault recoverability degraded for everything."/>
  <variant name=".TrustedVaultRecoverabilityDegradedForPasswords"
      summary="Trusted vault recoverability degraded for passwords."/>
  <variant name=".UpmBackendOutdated"
      summary="UPM backend outdated error for passwords."/>
</variants>

<variants name="SyncInvalidationLatencySource">
  <variant name="ClientBased" summary="client-based clock time"/>
  <variant name="ServerBased.Uncertainty2s"
      summary="server-authoritative network time with uncertainty &lt;= 2s"/>
  <variant name="ServerBased.Uncertainty10s"
      summary="server-authoritative network time with uncertainty&lt;= 10s"/>
  <variant name="ServerBased.Uncertainty15s"
      summary="server-authoritative network time with uncertainty &lt;= 15s"/>
</variants>

<variants name="SyncToSigninMigrationMode">
  <variant name=".DryRun" summary="run the migration in dry-run mode"/>
  <variant name=".Migration" summary="run the migration"/>
</variants>

<variants name="TabsFromOtherDevicesVersion">
  <variant name="List" summary="list version"/>
  <variant name="Screenshot" summary="screenshot version"/>
</variants>

<variants name="TrustedVaultTimeSinceMigrationSuffix">
  <variant name=""
      summary="Includes data for users that went through migration any time
               (including unknown and invalid)."/>
  <variant name=".MigratedLast3Days"
      summary="Includes data for users that went through migration during the
               last 3 days (wrt recording the metrics)."/>
  <variant name=".MigratedLast7Days"
      summary="Includes data for users that went through migration during the
               last 7 days (wrt recording the metrics)."/>
  <variant name=".MigratedLast28Days"
      summary="Includes data for users that went through migration during the
               last 28 days (wrt recording the metrics)."/>
  <variant name=".MigratedLast90Days"
      summary="Includes data for users that went through migration during the
               last 90 days (wrt recording the metrics)."/>
  <variant name=".MigratedLast180Days"
      summary="Includes data for users that went through migration during the
               last 180 days (wrt recording the metrics)."/>
  <variant name=".MigratedLastDay"
      summary="Includes data for users that went through migration during the
               last day (wrt recording the metrics)."/>
</variants>

<histogram name="Sync.AccountManagedStatusAsynchronousOutcome"
    enum="AccountManagedStatusFinderOutcome" expires_after="2027-01-17">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the account managed status that was asynchronously determined during
    sync startup. Only recorded if the status was not known synchronously (see
    `Sync.AccountManagedStatusSynchronousOutcome`). Also see
    `Sync.AccountManagedStatusDuration` for timings.
  </summary>
</histogram>

<histogram name="Sync.AccountManagedStatusDuration" units="ms"
    expires_after="2027-01-17">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the time it took to determine the account managed status during sync
    startup. Only recorded if the status was not known synchronously (see
    `Sync.AccountManagedStatusSynchronousOutcome` and
    `Sync.AccountManagedStatusAsynchronousOutcome`).
  </summary>
</histogram>

<histogram name="Sync.AccountManagedStatusSynchronousOutcome"
    enum="AccountManagedStatusFinderOutcome" expires_after="2027-01-17">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the account managed status during sync startup, or
    &quot;pending&quot; if the status wasn't known yet - in that case, see
    `Sync.AccountManagedStatusAsynchronousOutcome`.
  </summary>
</histogram>

<histogram name="Sync.AccountMenu.UserActionableError"
    enum="UserActionableError" expires_after="2027-01-24">
  <owner>rgod@google.com</owner>
  <owner>ylahodiuk@google.com</owner>
  <summary>
    iOS only.

    Account menu settings page displays an error on top whenever there is any
    user actionable error.

    Records the type of an error that is visible to the user when they navigate
    to the account menu settings page or when it appears while the user is on
    that page.
  </summary>
</histogram>

<histogram name="Sync.AssociateWindowsTime.On{Type}" units="ms"
    expires_after="2027-08-24">
  <owner>skym@chromium.org</owner>
  <owner>ckitagawa@chromium.org</owner>
  <summary>
    The amount of time it takes to assocate windows. The goal of this process is
    to match tab sync data with live tabs. This process is currently run in
    multiple situations, which this histogram is emitted separately for. Ideally
    as little time is spent as possible doing this.
  </summary>
  <token key="Type" variants="AssociateWindowsType"/>
</histogram>

<histogram name="Sync.BackedOffDataType" enum="SyncDataTypes"
    expires_after="2027-02-07">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Logged when a data type is backed off.

    This histogram can help explain changes in
    Sync.PostedClientToServerMessageError2::PARTIAL_FAILURE.
  </summary>
</histogram>

<histogram name="Sync.BatchUpload.BookmarksDisabledDueToLimitExceeded"
    enum="Boolean" expires_after="2027-02-14">
  <owner>mtatarski@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records whether Bookmarks batch upload is disabled due to the bookmark limit
    being exceeded. Recorded when the batch upload local data description for
    bookmarks is requested, provided there are local bookmarks available to
    upload.

    Note: This metric is recorded in GetLocalDataDescription to avoid double
    logging during the migration process itself, but this means its trigger
    depends on how often GetLocalDataDescription is called by external UI code.
  </summary>
</histogram>

<histogram name="Sync.BatchUpload.DataTypeAvailable" enum="SyncDataTypes"
    expires_after="2026-12-27">
  <owner>rsult@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the data types that are available in the Batch Upload. A data type
    is available if it has local items displayed. Records when the dialog is
    first shown.
  </summary>
</histogram>

<histogram name="Sync.BatchUpload.DataTypeSelected" enum="SyncDataTypes"
    expires_after="2027-02-14">
  <owner>rsult@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the data types that are selected in the Batch Upload. A data type is
    considered selected if some items are checked in the dialog when the user
    saves the choices. Records when the dialog is closed only after the users
    saves their choice - not for any other way the dialog is closed.
  </summary>
</histogram>

<histogram name="Sync.BatchUpload.DataTypeSelectedItemPercentage"
    units="selection" expires_after="2027-02-14">
  <owner>rsult@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the percentage of selected items versus the available items per data
    type in the Batch Upload. It is recorded only for data types that are
    available and that are selected. Records when the dialog is closed after the
    users saves their choice - not for any other way the dialog is closed.
  </summary>
</histogram>

<histogram name="Sync.BatchUpload.DialogCloseReason"
    enum="BatchUploadDialogCloseReason" expires_after="2026-12-27">
  <owner>rsult@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the reason for closing the Batch Upload Dialog. Recorded when the
    dialog is closed.
  </summary>
</histogram>

<histogram name="Sync.BatchUpload.Opened" enum="BatchUploadEntryPoint"
    expires_after="2026-12-27">
  <owner>rsult@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the entry point from which the Batch Upload Dialog was opened.
    Records when the dialog is first shown.
  </summary>
</histogram>

<histogram name="Sync.BatchUpload.Requests3" enum="SyncDataTypes"
    expires_after="2027-01-03">
  <owner>ankushkush@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Logged when batch upload of local data for a data type is requested via
    SyncService::TriggerLocalDataMigration() (normally by one of the UI entry
    points).

    Note that at the time of writing, this metric only supports PASSWORDS,
    BOOKMARKS and READING_LIST.

    This replaced Sync.BatchUpload.Requests2, which omitted types that issued
    requests but weren't healthy.
  </summary>
</histogram>

<histogram name="Sync.BookmarkAccountStorageMoveDialog.Download.{Action}"
    enum="BooleanHit" expires_after="2026-12-01">
  <owner>amelies@google.com</owner>
  <owner>chrome-signin-desktop-team@google.com</owner>
  <summary>
    Records that the user {Action} the dialog which asks them to confirm whether
    they want to move a bookmark from account to local storage.

    This histogram is usually recorded twice per dialog, once for `Shown` and
    once for the following user action (accepted, declined, or explicitly
    closed). It is only recorded once with `Shown` if the browser is closed
    while the dialog is opened.
  </summary>
  <token key="Action">
    <variant name="Accepted" summary="accepted"/>
    <variant name="Declined" summary="declined"/>
    <variant name="ExplicitlyClosed"
        summary="explicitly closed (e.g. by using the Escape key)"/>
    <variant name="Shown" summary="was shown"/>
  </token>
</histogram>

<histogram name="Sync.BookmarkAccountStorageMoveDialog.Upload.{Action}"
    enum="BookmarkAccountStorageMoveDialogType" expires_after="2026-12-01">
  <owner>amelies@google.com</owner>
  <owner>chrome-signin-desktop-team@google.com</owner>
  <summary>
    Records that the user {Action} the dialog which asks them to confirm whether
    they want to move a bookmark from local to account storage.

    This histogram is usually recorded twice per dialog, once for `Shown` and
    once for the following user action (accepted, declined, or explicitly
    closed). It is only recorded once with `Shown` if the browser is closed
    while the dialog is opened.

    `BookmarkAccountStorageMoveDialogType` refers to the type of dialog:

    * `Download or upload version` is the version of the dialog which can be
    used for either uploading or downloading a bookmark, usually triggered
    through a drag and drop by the user in a folder of a different storage
    (account vs. local). This dialog is triggered for merged surfaces such as
    the bookmarks bar or the side panel, not unmerged surfaces such as the
    bookmark manager.

    * `Upload only version` is the version of the dialog which can only be used
    for uploading a bookmark without specifying the location, triggered by
    clicking on a local bookmark's cloud upload icon in the bookmark manager.
  </summary>
  <token key="Action">
    <variant name="Accepted" summary="accepted"/>
    <variant name="Declined" summary="declined"/>
    <variant name="ExplicitlyClosed"
        summary="explicitly closed (e.g. by using the Escape key)"/>
    <variant name="Shown" summary="was shown"/>
  </token>
</histogram>

<histogram name="Sync.BookmarkEntityReuploadNeeded.On{UpdateType}"
    enum="Boolean" expires_after="2027-04-26">
  <owner>rushans@google.com</owner>
  <owner>mastiz@chromium.org</owner>
  <summary>
    Records if the entity is marked to be reuploaded. It is recorded on each
    incoming bookmark update from the server during {UpdateType}.
  </summary>
  <token key="UpdateType">
    <variant name="IncrementalUpdate" summary="incremental update"/>
    <variant name="InitialMerge" summary="initial merge"/>
  </token>
</histogram>

<histogram name="Sync.BookmarkGUIDSource2" enum="BookmarkGUIDSource"
    expires_after="2027-02-04">
  <owner>rushans@google.com</owner>
  <owner>mastiz@chromium.org</owner>
  <summary>
    Records whether a GUID was found within BookmarkSpecifics, if an
    originator_client_item_id of valid GUID format was used to replace it, or if
    the field was left empty. Recorded when processing a remote bookmark update,
    except for permanent nodes, which are created server-side and don't have an
    originator client item ID.
  </summary>
</histogram>

<histogram name="Sync.BookmarkModelMerger.ReachableInputUpdates"
    units="bookmarks" expires_after="2027-09-19">
  <owner>rushans@google.com</owner>
  <owner>mastiz@chromium.org</owner>
  <summary>
    Records the number of valid and non-duplicate updates processed during
    initial merge for bookmarks that are reachable when traversing the bookmark
    tree, including permanent folders. Recorded during the initial merge
    procedure after deduplication.
  </summary>
</histogram>

<histogram name="Sync.BookmarkModelMerger.UnsyncedEntitiesUponCompletion"
    units="bookmarks" expires_after="2027-09-19">
  <owner>rushans@google.com</owner>
  <owner>mastiz@chromium.org</owner>
  <summary>
    Records the number of unsynced entities (bookmarks or folders) as a result
    of the initial merge for bookmarks. This includes local creations (i.e. did
    not match any entity in the server) as well as local modifications (e.g.
    pending reupload). Recorded upon completion of the initial merge procedure.
  </summary>
</histogram>

<histogram name="Sync.BookmarkModelMerger.ValidInputUpdates" units="bookmarks"
    expires_after="2027-09-19">
  <owner>rushans@google.com</owner>
  <owner>mastiz@chromium.org</owner>
  <summary>
    Records the number of received input updates considered valid during initial
    merge for bookmarks, prior to deduplication, including permanent folders and
    unreachable nodes (see Sync.BookmarkModelMerger.ReachableInputUpdates for a
    more strict variant). Invalid updates contribute to metric
    Sync.ProblematicServerSideBookmarksDuringMerge. Recorded during the initial
    merge procedure.
  </summary>
</histogram>

<histogram name="Sync.BookmarkModelMergerTime{UpdatesCount}" units="ms"
    expires_after="2027-02-07">
  <owner>rushans@google.com</owner>
  <owner>mastiz@chromium.org</owner>
  <summary>
    Measures the initial bookmark merge time broken down by different stages.
    Recorded after every initial merge procedure {UpdatesCount}.
  </summary>
  <token key="UpdatesCount">
    <variant name="" summary="regardless of the number of updates"/>
    <variant name=".10kUpdates" summary="having more than 10k remote updates"/>
    <variant name=".50kUpdates" summary="having more than 50k remote updates"/>
    <variant name=".100kUpdates"
        summary="having more than 100k remote updates"/>
  </token>
</histogram>

<histogram name="Sync.BookmarkParentGuidFromSpecifics" enum="Boolean"
    expires_after="2027-02-07">
  <owner>rushans@google.com</owner>
  <owner>mastiz@chromium.org</owner>
  <summary>
    Records whether the parent GUID for a bookmark was read from the
    BookmarkSpecifics or from the SyncEntity.parent_id field. Recorded when
    processing remote updates for each non-deletion update.
  </summary>
</histogram>

<histogram name="Sync.BookmarkParentGuidSource"
    enum="SyncBookmarkParentGuidSource" expires_after="2027-02-07">
  <owner>mtatarski@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the source of the parent GUID for a bookmark when processing remote
    updates. Recorded for each non-deletion update.
  </summary>
</histogram>

<histogram name="Sync.BookmarksCountAtLimitExceeded.{Type}" units="bookmarks"
    expires_after="2027-02-02">
  <owner>mtatarski@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the number of bookmarks when the sync limit is exceeded. This helps
    inform what the new limit should be. Recorded when the error is detected (on
    sync start, update received, or initial merge).
  </summary>
  <token key="Type">
    <variant name="Local" summary="local bookmarks count"/>
    <variant name="Remote" summary="remote updates count during initial merge"/>
  </token>
</histogram>

<histogram name="Sync.BookmarksGUIDDuplicates" enum="BookmarksGUIDDuplicates"
    expires_after="2026-12-08">
  <owner>mastiz@chromium.org</owner>
  <owner>rushans@google.com</owner>
  <summary>
    Records different types of bookmark entities having the same GUIDs. It's
    recorded on each found duplicate when processing remote bookmarks from the
    sync server during the initial merge.
  </summary>
</histogram>

<histogram name="Sync.BookmarksLimitExceededHelpClickedSource"
    enum="BookmarksLimitExceededHelpClickedSource" expires_after="2026-12-27">
  <owner>mtatarski@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Recorded when the user clicks on the &quot;Learn more&quot; link regarding
    the bookmarks limit exceeded error. Recorded by the UI surface that
    triggered the click.
  </summary>
</histogram>

<histogram name="Sync.BookmarksLimitExceededOnSignoutPrompt" enum="Boolean"
    expires_after="2027-01-19">
  <owner>mtatarski@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records whether the bookmarks limit exceeded error was present when a
    sign-out confirmation dialog was shown. This helps track how often this
    specific error is a reason for the confirmation dialog. Recorded on all
    platforms.
  </summary>
</histogram>

<histogram name="Sync.BookmarksModelMetadataCorruptionReason"
    enum="SyncBookmarkModelMetadataCorruptionReason" expires_after="2027-09-06">
  <owner>rushans@google.com</owner>
  <owner>mastiz@chromium.org</owner>
  <summary>
    The reason why the persisted metadata for a bookmark model is considered
    corrupted. It either has corrupted data or doesn't match the bookmark model.
    It's recorded at start up only if the initial sync has been performed
    already. It's recorded after loading the metadata.
  </summary>
</histogram>

<histogram name="Sync.BookmarkSpecificsExcludingFoldersContainFavicon"
    enum="Boolean" expires_after="2027-09-19">
  <owner>rushans@google.com</owner>
  <owner>mastiz@chromium.org</owner>
  <summary>
    Records if a remote sync update for a bookmark, excluding folders, contains
    a favicon. It is recorded upon initial and incremental updates, when the
    local state is about to be modified.
  </summary>
</histogram>

<histogram name="Sync.BootstrapTokenDecryptionResult" enum="BooleanSuccess"
    expires_after="2026-12-27">
  <owner>mtatarski@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the success or failure of decrypting the sync bootstrap token. This
    token is used to decrypt sync data when a custom passphrase is set.
  </summary>
</histogram>

<histogram name="Sync.BootstrapTokenEncryptionResult" enum="BooleanSuccess"
    expires_after="2026-12-27">
  <owner>mtatarski@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the success or failure of encrypting the sync bootstrap token. This
    token is used to decrypt sync data when a custom passphrase is set.
  </summary>
</histogram>

<histogram name="Sync.ClearMetadataWhileStopped{ClearTime}"
    enum="SyncDataTypes" expires_after="2027-04-13">
  <owner>ankushkush@google.com</owner>
  <owner>treib@chromium.org</owner>
  <summary>
    Recorded when metadata is cleared while the data type was not
    running{ClearTime}.
  </summary>
  <token key="ClearTime">
    <variant name="" summary=""/>
    <variant name=".DelayedClear"
        summary=", in the case where clearing of metadata was requested
                 before ModelReadyToSync()"/>
    <variant name=".ImmediateClear"
        summary=", in the case where clearing of metadata happened
                 immediately"/>
  </token>
</histogram>

<histogram name="Sync.CommitLatency{SyncDataType}" units="ms"
    expires_after="2027-02-07">
  <owner>rushans@google.com</owner>
  <owner>treib@chromium.org</owner>
  <summary>
    Records the duration of each successful Commit request for {SyncDataType}.
  </summary>
  <token key="SyncDataType" variants="SyncDataType">
    <variant name="" summary="Any type"/>
  </token>
</histogram>

<histogram name="Sync.CommitRequestEntityCount" units="entities"
    expires_after="2026-12-27">
  <owner>rushans@google.com</owner>
  <owner>treib@chromium.org</owner>
  <summary>
    Records the number of entries in a commit request. Recorded only when the
    commit request was successfully sent and a response was received (i.e. no
    network or protocol error).
  </summary>
</histogram>

<histogram name="Sync.CommitResponse{SyncDataType}" enum="SyncerErrorValues"
    expires_after="2027-01-03">
  <owner>rushans@google.com</owner>
  <owner>treib@chromium.org</owner>
  <summary>
    Emitted per network Commit() request to the sync server and datatype.
    Records the outcome of each commit attempt per data type (success or one of
    various error codes).
  </summary>
  <token key="SyncDataType" variants="SyncDataType">
    <variant name="" summary="Any type"/>
  </token>
</histogram>

<histogram name="Sync.ConfigureDataTypeManager.Finished"
    enum="BooleanIsFirstSync" expires_after="2027-01-10">
  <owner>rushans@google.com</owner>
  <owner>treib@chromium.org</owner>
  <summary>
    Records whether the data type manager was configured for the first time
    (i.e. whether the user signed in within the same browser session). Recorded
    whenever sync configuration finishes successfully. Note that this metric is
    not recorded if the configuration takes too much time or is aborted.
  </summary>
</histogram>

<histogram name="Sync.ConfigureDataTypeManager.Start" enum="BooleanIsFirstSync"
    expires_after="2027-01-10">
  <owner>rushans@google.com</owner>
  <owner>treib@chromium.org</owner>
  <summary>
    Whether the data type manager is configured for the first time, i.e. the
    user signs in. Recorded when configuring the data type manager is started
    (e.g. on profile load when a user is signed in or the user signs in, enables
    or disables sync, etc).
  </summary>
</histogram>

<histogram name="Sync.ConfigureDataTypeManagerOption"
    enum="SyncFeatureOrTransport" expires_after="2027-01-10">
  <owner>mastiz@chromium.org</owner>
  <owner>treib@chromium.org</owner>
  <summary>
    Whether the full Sync feature or only the Sync transport layer is being
    configured. Recorded when configuring the data types for any reason: Most
    commonly during browser startup, but also after initial setup, after a
    reconfiguration by the user, or when switching between full feature mode and
    transport mode.
  </summary>
</histogram>

<histogram name="Sync.ConfigureDataTypeManagerReason"
    enum="SyncConfigureDataTypeManagerReason" expires_after="2027-01-31">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    The reason that triggered a configuration cycle. Recorded when configuring
    the data types for any reason: Most commonly during browser startup, but
    also after initial setup, or after a reconfiguration by the user.
  </summary>
</histogram>

<histogram name="Sync.ConfigureDataTypes" enum="SyncDataTypes"
    expires_after="2027-01-03">
  <owner>mastiz@chromium.org</owner>
  <owner>treib@chromium.org</owner>
  <summary>
    Breakdown of sync data types being configured. This is different from
    Sync.CustomTypes in that this captures all active devices, not just those
    that are choosing a custom sync configuration.

    A sync configuration refers to the process of initializing or updating the
    set of active, syncing data types. This is triggered under several
    scenarios: most commonly, when a user signs in for the first time (setting
    up a new client); upon browser restart or profile load while already signed
    in (restarting sync for an existing client); when the user changes sync
    toggles or settings (reconfiguration); when an identity/authentication error
    is resolved; when key crypto-related events occur (such as decryption key
    acquisition or entering a correct custom passphrase); and as a result of
    other more advanced triggers such as error conditions.

    Note that not all platforms support all data types. As such, comparing
    across platforms should only look at the common data types.
  </summary>
</histogram>

<histogram name="Sync.ConfigureTime_{ConfigurationType}.{Result}" units="ms"
    expires_after="2027-01-10">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Time spent configuring data types for {ConfigurationType}. Recorded when
    DataTypeManagerImpl finishes.
  </summary>
  <token key="ConfigurationType">
    <variant name="Initial" summary="initial sync"/>
    <variant name="Subsequent" summary="subsequent (non-first) sync"/>
  </token>
  <token key="Result">
    <variant name="ABORTED" summary="When configuration gets aborted."/>
    <variant name="OK" summary="When configuration is successful"/>
  </token>
</histogram>

<histogram name="Sync.CrossDevicePrefTracker.AvailabilityAtQuery"
    enum="CrossDevicePrefTrackerAvailabilityAtQuery" expires_after="2027-02-14">
  <owner>bwwilliams@google.com</owner>
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the service status of the CrossDevicePrefTracker every time a client
    calls one of the Query APIs (GetValues() or GetMostRecentValue()). This
    metric helps determine how often clients attempt to read cross-device
    preferences when the tracker is unavailable. Recorded immediately upon API
    invocation.
  </summary>
</histogram>

<!-- LINT.IfChange(CrossDeviceSettingImportOutcome) -->

<histogram name="Sync.CrossDeviceSettingImportOutcome"
    enum="CrossDeviceSettingImportOutcome" expires_after="2026-12-30">
  <owner>jhimawan@google.com</owner>
  <owner>bwwilliams@google.com</owner>
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the possible outcomes after checking for settings to import from a
    remote device. Recorded when we conclude that the user has no settings to
    import (which can happen for several reasons) or when we show a snackbar
    allowing the user to undo/redo.
  </summary>
</histogram>

<!-- LINT.ThenChange() -->

<histogram
    name="Sync.Crypto.CustomPassphraseKeyDerivationMethodOnSuccessfulDecryption"
    enum="SyncCustomPassphraseKeyDerivationMethodState"
    expires_after="2027-02-07">
  <owner>mmoskvitin@google.com</owner>
  <owner>treib@chromium.org</owner>
  <summary>
    Key derivation method used for sync custom passphrase on successful
    decryption of pending keys, i.e. when a passphrase is requested and the user
    types in the correct one. &quot;Not set&quot; will never be reported for
    this metric, since we always have an explicit key derivation method on
    successful decryption.
  </summary>
</histogram>

<histogram name="Sync.Crypto.CustomPassphraseKeyDerivationMethodStateOnStartup"
    enum="SyncCustomPassphraseKeyDerivationMethodState"
    expires_after="2027-01-03">
  <owner>mmoskvitin@google.com</owner>
  <owner>treib@chromium.org</owner>
  <summary>
    State of the derivation method used for sync custom passphrase on startup.
    Reported only when the passphrase type is CUSTOM_PASSPHRASE.
  </summary>
</histogram>

<histogram name="Sync.Crypto.NigoriKeyDerivationDuration.{Method}" units="ms"
    expires_after="2027-04-28">
  <owner>mmoskvitin@google.com</owner>
  <owner>treib@chromium.org</owner>
  <summary>
    Time taken to derive keys in Nigori using a given key derivation method.
    This histogram is always recorded with one of the key derivation method
    suffixes.
  </summary>
  <token key="Method">
    <variant name="Pbkdf2" summary="PBKDF2_HMAC_SHA1_1003"/>
    <variant name="Scrypt8192" summary="SCRYPT_8192_8_11"/>
  </token>
</histogram>

<histogram name="Sync.CryptographerPendingKeys"
    enum="SyncCryptographerPendingKeysState" expires_after="2027-08-23">
  <owner>mastiz@chromium.org</owner>
  <owner>treib@chromium.org</owner>
  <summary>
    Breakdown of sync users whose cryptographer has pending keys.
  </summary>
</histogram>

<histogram name="Sync.CryptographerReady" enum="SyncCryptographerReadyState"
    expires_after="2027-08-30">
  <owner>mmoskvitin@google.com</owner>
  <owner>mastiz@chromium.org</owner>
  <summary>
    Breakdown of sync users whose cryptographer is fully ready for encryption
    and decryption (initialized and no pending keys).
  </summary>
</histogram>

<histogram name="Sync.CustomOSSync" enum="SyncDataTypes"
    expires_after="2027-08-02">
  <owner>mmoskvitin@google.com</owner>
  <owner>treib@chromium.org</owner>
  <summary>
    For users who have *not* selected the &quot;Sync Everything&quot; option,
    this records all the OS data types they have selected to sync. Samples are
    taken every time the Sync data types are (re)configured, which typically
    happens during startup and when the user changes any Sync settings.
  </summary>
</histogram>

<histogram name="Sync.CustomSync3" enum="SyncDataTypes"
    expires_after="2027-02-14">
  <owner>treib@chromium.org</owner>
  <owner>mastiz@chromium.org</owner>
  <summary>
    For Sync-the-feature users who have *not* selected the &quot;Sync
    Everything&quot; option, this records all the data types they have selected
    to sync. Samples are taken every time the Sync data types are
    (re)configured, which typically happens during startup and when the user
    changes any Sync settings.

    NOTE: This does NOT include OS datatypes. Use Sync.CustomOSSync for those.

    See also &quot;Sync.SelectedTypesInTransportMode&quot; which is the
    corresponding histogram for Sync-transport users, and
    &quot;Sync.SyncEverything2&quot; which is the histogram for whether the user
    has selected the &quot;Sync Everything&quot; option.
  </summary>
</histogram>

<histogram name="Sync.DataTypeActiveForSyncToSigninMigration{SyncDataType}"
    enum="BooleanActive" expires_after="2026-12-06">
  <owner>treib@chromium.org</owner>
  <owner>mastiz@chromium.org</owner>
  <summary>
    The Sync-the-feature &quot;active&quot; status of {SyncDataType} for the
    purpose of the SyncToSignin migration. Recorded on profile creation/startup,
    capturing the state from just before shutdown during the previous run of
    Chrome (i.e. before re-evaluation). Recorded only if
    `Sync.FeatureStatusForSyncToSigninMigration` recorded &quot;active&quot;.
  </summary>
  <token key="SyncDataType" variants="SyncDataType"/>
</histogram>

<histogram name="Sync.DataTypeCommitMessageHasDepletedQuota"
    enum="SyncDataTypes" expires_after="2026-12-06">
  <owner>rushans@google.com</owner>
  <owner>treib@chromium.org</owner>
  <summary>
    Recorded once per commit message after which the quota for the given data
    type is depleted. If the commit cycle contains 150 commit messages for a
    given data type and the quota has initially 100 tokens, the quota gets
    depleted after first 100 messages and this histogram gets recorded for all
    the remaining messages (i.e. ~50 times) for the data type. Quota is tracked
    (and this metric gets recorded) only for data types that can be committed
    via JS API of extensions.
  </summary>
</histogram>

<histogram name="Sync.DataTypeCommitWithDepletedQuota" enum="SyncDataTypes"
    expires_after="2026-11-04">
  <owner>rushans@google.com</owner>
  <owner>treib@chromium.org</owner>
  <summary>
    Recorded once per local change that gets scheduled for committing with an
    extra long nudge delay. This happens if and only if the commit quota for
    this data type for this user is depleted. Quota is tracked (and this metric
    gets recorded) only for data types that can be committed via JS API of
    extensions. This metric is not very reliable as nudging for local changes
    happens via thread hopping and there is no guarantee whether a local change
    will nudge for commit _before_ or _after_ it actually gets committed.
  </summary>
</histogram>

<histogram name="Sync.DataTypeConfigurationTime.{StorageType}{SyncDataType}"
    units="ms" expires_after="2027-02-07">
  <owner>rushans@google.com</owner>
  <owner>mastiz@chromium.org</owner>
  <summary>
    Recorded once per activation of a(n) {StorageType} data type; the value is
    the duration of the setup (time from the start of the configuration of sync
    until the data type receives all its sync data and the data is ready for the
    user). This metric is used for monitoring general health of sync client-side
    code.
  </summary>
  <token key="StorageType">
    <variant name="Ephemeral" summary="ephemeral (in-memory)"/>
    <variant name="Persistent" summary="persistent (on-disk)"/>
  </token>
  <token key="SyncDataType" variants="SyncDataType"/>
</histogram>

<histogram name="Sync.DataTypeCount{SyncDataType}" units="entries"
    expires_after="2027-01-31">
  <owner>rushans@google.com</owner>
  <owner>mastiz@chromium.org</owner>
  <summary>
    Counts the number of entries for each data type. The count is based on
    metadata entries for the type. Recorded after sync configuration. This
    metric is used for monitoring general health of sync client-side code.

    A sync configuration refers to the process of initializing or updating the
    set of active, syncing data types. This is triggered under several
    scenarios: most commonly, when a user signs in for the first time (setting
    up a new client); upon browser restart or profile load while already signed
    in (restarting sync for an existing client); when the user changes sync
    toggles or settings (reconfiguration); when an identity/authentication error
    is resolved; when key crypto-related events occur (such as decryption key
    acquisition or entering a correct custom passphrase); and as a result of
    other more advanced triggers such as error conditions.
  </summary>
  <token key="SyncDataType" variants="SyncDataType"/>
</histogram>

<histogram name="Sync.DataTypeEntityChange{SyncDataType}"
    enum="SyncEntityChange" expires_after="2027-01-31">
  <owner>treib@chromium.org</owner>
  <owner>rushans@google.com</owner>
  <summary>
    Recorded once for every sync entity change (whenever it is about to be
    commited to the server or updated from the server). This metric is used for
    monitoring general health of sync client-side code. Note: This is only
    recorded with a data type suffix. The base version is never recorded. Note:
    this metric may be recorded multiple times for the same entity change, e.g.
    if there is a retry commit after a server error, hence compare its changes
    against Sync.CommitResponse{SyncDataType}.
  </summary>
  <token key="SyncDataType" variants="SyncDataType"/>
</histogram>

<histogram name="Sync.DataTypeEntityConflictResolution{SyncDataType}"
    enum="SyncConflictResolution" expires_after="2027-08-02">
  <owner>rushans@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the resolution of a conflict per sync entity on incremental update.
    This metric should be compared against Sync.DataTypeEntityChange to compare
    with the total number of incremental updates. Not recorded for NIGORI.
  </summary>
  <token key="SyncDataType" variants="SyncDataType"/>
</histogram>

<histogram name="Sync.DataTypeErrorSite{SyncDataType}"
    enum="SyncDataTypeErrorSite" expires_after="2027-09-27">
  <owner>treib@chromium.org</owner>
  <owner>rushans@google.com</owner>
  <summary>
    Recorded whenever ClientTagBasedDataTypeProcessor triggers a data type
    failure (recorded for both Start and Run failures). It distinguishes call
    sites for triggering such failures.
  </summary>
  <token key="SyncDataType" variants="SyncDataType"/>
</histogram>

<histogram name="Sync.DataTypeMemoryKB{SyncDataType}" units="KB"
    expires_after="2027-02-07">
  <owner>mastiz@chromium.org</owner>
  <owner>rushans@google.com</owner>
  <summary>
    Estimated memory usage by sync datatype in kilobytes. Recorded after sync
    configuration. This metric is used for monitoring general health of sync
    client-side code.

    A sync configuration refers to the process of initializing or updating the
    set of active, syncing data types. This is triggered under several
    scenarios: most commonly, when a user signs in for the first time (setting
    up a new client); upon browser restart or profile load while already signed
    in (restarting sync for an existing client); when the user changes sync
    toggles or settings (reconfiguration); when an identity/authentication error
    is resolved; when key crypto-related events occur (such as decryption key
    acquisition or entering a correct custom passphrase); and as a result of
    other more advanced triggers such as error conditions.
  </summary>
  <token key="SyncDataType" variants="SyncDataType"/>
</histogram>

<histogram name="Sync.DataTypeMetadataConsistency{SyncDataType}"
    enum="SyncMetadataConsistency" expires_after="2027-08-02">
  <owner>rushans@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Recorded when ClientTagBasedDataTypeProcessor checks stored metadata
    consistency upon processor startup or activation. Tracks whether metadata is
    consistent or what mismatch/error occurred for {SyncDataType}.
  </summary>
  <token key="SyncDataType" variants="SyncDataType"/>
</histogram>

<histogram name="Sync.DataTypeNumUnsyncedEntities{Event}{SyncDataType}"
    units="entities" expires_after="2027-01-03">
  <owner>mmoskvitin@google.com</owner>
  <owner>treib@chromium.org</owner>
  <summary>
    Counts the number of unsynced entities for each data type, including
    tombstones. Recorded {Event}.
  </summary>
<!-- LINT.IfChange(UnsyncedDataRecordingEventVariants) -->

  <token key="Event">
    <variant name="OnModelReady"
        summary="once model is ready to sync, i.e. typically soon after
                 browser startup. Recorded only if initial sync is done"/>
    <variant name="OnReauthFromPendingState"
        summary="right after the user reauthenticates and fixes their signin
                 pending state. Only recorded in transport mode. Not recorded
                 for sync-the-feature (aka &quot;Sync paused&quot;)"/>
    <variant name="OnSignoutConfirmation"
        summary="when the user initiates a signout flow (but has not
                 confirmed yet) and is not in pending state."/>
    <variant name="OnSignoutConfirmationFromPendingState"
        summary="when the user initiates a signout flow (but has not
                 confirmed yet), and is in pending state"/>
  </token>
<!-- LINT.ThenChange(//components/sync/base/data_type_histogram.h:UnsyncedDataRecordingEvent) -->

  <token key="SyncDataType" variants="SyncDataType"/>
</histogram>

<histogram name="Sync.DataTypeOrphanMetadata.{Operation}" enum="SyncDataTypes"
    expires_after="2027-08-16">
  <owner>mastiz@chromium.org</owner>
  <owner>treib@chromium.org</owner>
  <summary>
    Records whenever an orphan metadata is encountered by the
    ClientTagBasedDataTypeProcessor.
  </summary>
  <token key="Operation">
    <variant name="GetData"
        summary="This happens as a result of missing data in response from
                 GetDataForCommit() call."/>
    <variant name="ModelReadyToSync"
        summary="This happens as a result of a ModelReadyToSync() call with
                 metadata batch containing entities with duplicate
                 client-tag-hashes (which indicates that all but one from
                 each equivalence class are previous orphans). The type of
                 the orphan is reported in this histogram, one for each
                 orphan."/>
    <variant name="Put"
        summary="This happens as a result of a Put() call with an entity
                 whose client-tag-hash is already tracked by the processor
                 (which indicates an orphan)."/>
  </token>
</histogram>

<histogram name="Sync.DataTypeRunFailures2" enum="SyncDataTypes"
    expires_after="2027-02-21">
  <owner>rushans@google.com</owner>
  <owner>mastiz@chromium.org</owner>
  <summary>
    Histogram of the run failures for the different sync datatypes. These are
    failures that occur after startup while the datatype is syncing. This is one
    of the base sync health metrics. The Sync.DataTypeStoreBackendError and
    Sync.DataTypeErrorSite histograms may help diagnosing the problem.
  </summary>
</histogram>

<histogram name="Sync.DataTypeStartFailures2" enum="SyncDataTypes"
    expires_after="2027-02-21">
  <owner>rushans@google.com</owner>
  <owner>mastiz@chromium.org</owner>
  <summary>
    Histogram of the startup failures for the different sync datatypes. These
    are failures that occur during startup before the data type is fully loaded.
    These errors are caused by failures in reading metadata (or data) from the
    DB or by another failure in interaction with the model. The
    Sync.DataTypeStoreBackendError and Sync.DataTypeErrorSite histograms may
    help diagnosing the problem.
  </summary>
</histogram>

<histogram name="Sync.DataTypeStoreBackendError.{Operation}"
    enum="LevelDBStatus" expires_after="2027-02-07">
  <owner>treib@chromium.org</owner>
  <owner>rushans@google.com</owner>
  <summary>
    Records the LevelDB Status error code for DataTypeStore {Operation}
    operations. Recorded when there is an error while communicating with the DB
    for any data type that uses the DataTypeStore. This metric should be used
    together with Sync.DataType[Run|Start]Failures2 to figure out the root cause
    of the data type failure. In case of an IOError,
    `Sync.DataTypeStoreBackendError.{Operation}.IOError` is also recorded.
  </summary>
  <token key="Operation">
    <variant name="DeleteData"/>
    <variant name="GetStoreVersion"/>
    <variant name="Init"/>
    <variant name="ReadAllRecords"/>
    <variant name="ReadRecords"/>
    <variant name="WriteModifications"/>
  </token>
</histogram>

<histogram name="Sync.DataTypeStoreBackendError.{Operation}.IOError"
    enum="PlatformFileError" expires_after="2027-02-07">
  <owner>treib@chromium.org</owner>
  <owner>mtatarski@google.com</owner>
  <summary>
    Records the base::File::Error code for DataTypeStore {Operation} operations
    when the LevelDB status is IOError.
  </summary>
  <token key="Operation">
    <variant name="DeleteData"/>
    <variant name="GetStoreVersion"/>
    <variant name="Init"/>
    <variant name="ReadAllRecords"/>
    <variant name="ReadRecords"/>
    <variant name="WriteModifications"/>
  </token>
</histogram>

<histogram name="Sync.DataTypeStoreBackendInitializationSuccess"
    enum="BooleanSuccess" expires_after="2027-08-31">
  <owner>treib@chromium.org</owner>
  <owner>rushans@google.com</owner>
  <summary>
    Records the outcome of the initialization of the DataTypeStoreBackend, which
    typically happens once every browser startup (or more precisely, profile
    initialization).
  </summary>
</histogram>

<histogram name="Sync.DataTypeUniquePositionError" enum="SyncDataTypes"
    expires_after="2027-09-22">
  <owner>rushans@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the data type for which a unique position in the correct order could
    not be generated. Recorded for each failed attempt of unique position
    generation (normally, for each local entity creation or update). This metric
    should be compared against Sync.DataTypeEntityChange3 to compare with the
    total number of incremental updates.
  </summary>
</histogram>

<histogram name="Sync.DataTypeUniquePositionIncorrectOrder"
    enum="SyncDataTypes" expires_after="2027-09-22">
  <owner>rushans@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    This histogram is similar to Sync.DataTypeUniquePositionError but it is
    recorded only when the incorrect order of valid unique positions is detected
    (as opposed to invalid unique positions). Recorded whenever an incorrect
    order is detected while generating unique position between two entities.
    This metric should be compared against Sync.DataTypeEntityChange3 to compare
    with the total number of incremental updates.
  </summary>
</histogram>

<histogram name="Sync.DataTypeUpdateDrop.{Reason}" enum="SyncDataTypes"
    expires_after="2027-01-10">
  <owner>treib@chromium.org</owner>
  <owner>rushans@google.com</owner>
  <summary>
    Recorded whenever a remote update for a particular data type gets dropped
    for the following reason: {Reason}.
  </summary>
  <token key="Reason">
    <variant name="CannotGenerateStorageKey"
        summary="The bridge cannot generate a valid storage key based on the
                 entity data."/>
    <variant name="DecryptionPending"
        summary="Decryption keys are missing at the moment (it is queued for
                 later decryption which may or may not happen)."/>
    <variant name="DecryptionPendingForTooLong"
        summary="Decryption keys were missing for so long that the update was
                 ignored."/>
    <variant name="DroppedByBridge"
        summary="The bridge classified the data as bad/invalid."/>
    <variant name="FailedToDecrypt"
        summary="Decryption is not successful (maybe the data is corrupt)."/>
    <variant name="InconsistentClientTag"
        summary="Client tag hash from the server does not match the one
                 computed by the bridge based on the entity data."/>
    <variant name="TombstoneForNonexistentInIncrementalUpdate"
        summary="It was a tombstone for an entity that does not exist
                 locally."/>
    <variant name="TombstoneInFullUpdate"
        summary="It was a tombstone in a full update."/>
  </token>
</histogram>

<histogram name="Sync.DeviceCount2" units="devices" expires_after="never">
<!-- expires-never: used internally for filtering -->

  <owner>mastiz@chromium.org</owner>
  <owner>rushans@google.com</owner>
  <owner>chrome-metrics-team@google.com</owner>
  <summary>
    The largest number of active and concurrently syncing devices known to any
    profile. May be 0 when there are no signed in/syncing profiles open. Logged
    with every UMA log.
  </summary>
</histogram>

<histogram name="Sync.DeviceCount2.{DeviceType}" units="devices"
    expires_after="2027-02-07">
  <owner>ssid@chromium.org</owner>
  <owner>mastiz@chromium.org</owner>
  <owner>chrome-metrics-team@google.com</owner>
  <summary>
    The largest number of active and concurrently syncing devices of type
    {DeviceType} known to any profile. May be 0 when there are no signed
    in/syncing profiles open. Logged with every UMA log.
  </summary>
  <token key="DeviceType">
    <variant name="Desktop"/>
    <variant name="Phone"/>
    <variant name="Tablet"/>
  </token>
</histogram>

<histogram
    name="Sync.DeviceStatistics.Outcome.NonPrimaryAccount.NumberOfAdditionalClients2"
    units="clients" expires_after="2027-01-17">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Device statistics: Records the number of additional syncing clients (i.e.
    not counting this client) of a non-primary account. Recorded at most once
    per day (30 seconds after profile initialization) for every non-primary
    account.
  </summary>
</histogram>

<histogram
    name="Sync.DeviceStatistics.Outcome.NonPrimaryAccount.NumberOfAdditionalClientsWithHistoryOptIn2"
    units="clients" expires_after="2027-01-17">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Device statistics: Records the number of additional syncing clients (i.e.
    not counting this client) of a non-primary account which are opted in to
    history sync. Recorded at most once per day (30 seconds after profile
    initialization) for every non-primary account.
  </summary>
</histogram>

<histogram
    name="Sync.DeviceStatistics.Outcome.NonPrimaryAccount.NumberOfAdditionalPlatforms2"
    units="platforms" expires_after="2027-01-17">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Device statistics: Records the number of distinct platforms among the
    additional syncing clients (i.e. not counting this client) of a non-primary
    account. Recorded at most once per day (30 seconds after profile
    initialization) for every non-primary account.
  </summary>
</histogram>

<histogram
    name="Sync.DeviceStatistics.Outcome.NonPrimaryAccount.NumberOfAdditionalPlatformsWithHistoryOptIn2"
    units="platforms" expires_after="2027-01-17">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Device statistics: Records the number of distinct platforms among the
    additional syncing clients (i.e. not counting this client) of a non-primary
    account where at least one client on that platform is opted in to history
    sync. Recorded at most once per day (30 seconds after profile
    initialization) for every non-primary account.
  </summary>
</histogram>

<histogram
    name="Sync.DeviceStatistics.Outcome.NonPrimaryAccount.PlatformAndFormFactorOfAdditionalClient2"
    enum="SyncDeviceStatisticsPlatformAndFormFactor" expires_after="2027-01-17">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Device statistics: Records the platform and form factor of each additional
    syncing client (i.e. not counting this client) of each non-primary account.
    Multiple clients with the same platform and form factor are recorded
    individually. Recorded at most once per day (30 seconds after profile
    initialization), but with one sample per other client.
  </summary>
</histogram>

<histogram
    name="Sync.DeviceStatistics.Outcome.NonPrimaryAccount.PlatformOfAdditionalClient2"
    enum="SyncDeviceStatisticsPlatform" expires_after="2027-01-17">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Device statistics: Records the platform of each additional syncing client
    (i.e. not counting this client) of each non-primary account. Multiple
    clients with the same platform are recorded individually. Recorded at most
    once per day (30 seconds after profile initialization), but with one sample
    per other client.
  </summary>
</histogram>

<histogram name="Sync.DeviceStatistics.Outcome.Overall2"
    enum="SyncDeviceStatisticsOutcome" expires_after="2027-01-17">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Device statistics: Records the overall outcome, i.e. whether primary and/or
    non-primary accounts have other syncing devices. Recorded at most once per
    day (30 seconds after profile initialization).
  </summary>
</histogram>

<histogram name="Sync.DeviceStatistics.Outcome.OverallMultiPlatform2"
    enum="SyncDeviceStatisticsMultiPlatformOutcome" expires_after="2027-01-17">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Device statistics: Records the overall outcome, i.e. whether primary and/or
    non-primary accounts have other syncing clients on other platforms. Recorded
    at most once per day (30 seconds after profile initialization).
  </summary>
</histogram>

<histogram name="Sync.DeviceStatistics.Outcome.PrimaryAccount.HistoryOptIn2"
    enum="SyncDeviceStatisticsHistoryOptInDevicesSummary"
    expires_after="2027-01-17">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Device statistics: Records the history opt-in status of the primary account,
    across this device and any other signed-in-to-Chrome devices. Recorded at
    most once per day (30 seconds after profile initialization).
  </summary>
</histogram>

<histogram
    name="Sync.DeviceStatistics.Outcome.PrimaryAccount.HistoryOptInMultiPlatform2"
    enum="SyncDeviceStatisticsHistoryOptInPlatformsSummary"
    expires_after="2027-01-17">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Device statistics: Records the history opt-in status of the primary account,
    across this device and any other signed-in-to-Chrome devices *on different
    platforms* only. Recorded at most once per day (30 seconds after profile
    initialization).
  </summary>
</histogram>

<histogram
    name="Sync.DeviceStatistics.Outcome.PrimaryAccount.MultiDeviceReadiness2"
    enum="SyncDeviceStatisticsMultiDeviceReadiness" expires_after="2027-01-17">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Device statistics: Records the multi-device readiness of the primary
    account, i.e. whether there are other signed-in-to-Chrome devices. Recorded
    at most once per day (30 seconds after profile initialization).
  </summary>
</histogram>

<histogram
    name="Sync.DeviceStatistics.Outcome.PrimaryAccount.MultiPlatformReadiness2"
    enum="SyncDeviceStatisticsMultiPlatformReadiness"
    expires_after="2027-01-17">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Device statistics: Records the multi-platform readiness of the primary
    account, i.e. whether there are other signed-in-to-Chrome devices *on
    different platforms*. Recorded at most once per day (30 seconds after
    profile initialization).
  </summary>
</histogram>

<histogram
    name="Sync.DeviceStatistics.Outcome.PrimaryAccount.NumberOfAdditionalClients2"
    units="clients" expires_after="2027-01-17">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Device statistics: Records the number of additional syncing clients (i.e.
    not counting this client) of the primary account. Recorded at most once per
    day (30 seconds after profile initialization).
  </summary>
</histogram>

<histogram
    name="Sync.DeviceStatistics.Outcome.PrimaryAccount.NumberOfAdditionalClientsWithHistoryOptIn2"
    units="clients" expires_after="2027-01-17">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Device statistics: Records the number of additional syncing clients (i.e.
    not counting this client) of the primary account which are opted in to
    history sync. Recorded at most once per day (30 seconds after profile
    initialization).
  </summary>
</histogram>

<histogram
    name="Sync.DeviceStatistics.Outcome.PrimaryAccount.NumberOfAdditionalPlatforms2"
    units="platforms" expires_after="2027-01-17">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Device statistics: Records the number of distinct platforms among the
    additional syncing clients (i.e. not counting this client) of the primary
    account. Recorded at most once per day (30 seconds after profile
    initialization).
  </summary>
</histogram>

<histogram
    name="Sync.DeviceStatistics.Outcome.PrimaryAccount.NumberOfAdditionalPlatformsWithHistoryOptIn2"
    units="platforms" expires_after="2027-01-17">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Device statistics: Records the number of distinct platforms among the
    additional syncing clients (i.e. not counting this client) of the primary
    account where at least one client on that platform is opted in to history
    sync. Recorded at most once per day (30 seconds after profile
    initialization).
  </summary>
</histogram>

<histogram
    name="Sync.DeviceStatistics.Outcome.PrimaryAccount.PlatformAndFormFactorOfAdditionalClient2"
    enum="SyncDeviceStatisticsPlatformAndFormFactor" expires_after="2027-01-17">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Device statistics: Records the platform and form factor of each additional
    syncing client (i.e. not counting this client) of the primary account.
    Multiple clients with the same platform and form factor are recorded
    individually. Recorded at most once per day (30 seconds after profile
    initialization), but with one sample per other client.
  </summary>
</histogram>

<histogram
    name="Sync.DeviceStatistics.Outcome.PrimaryAccount.PlatformOfAdditionalClient2"
    enum="SyncDeviceStatisticsPlatform" expires_after="2027-01-17">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Device statistics: Records the platform of each additional syncing client
    (i.e. not counting this client) of the primary account. Multiple clients
    with the same platform are recorded individually. Recorded at most once per
    day (30 seconds after profile initialization), but with one sample per other
    client.
  </summary>
</histogram>

<histogram name="Sync.DeviceStatistics.RequestOutcome"
    enum="SyncDeviceStatisticsRequestOutcome" expires_after="2027-01-17">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Device statistics: The outcome of an individual statistics request, recorded
    when a request completes.
  </summary>
</histogram>

<histogram name="Sync.DeviceStatistics.RequestsCompletedSuccess"
    enum="SyncDeviceStatisticsSuccess" expires_after="2027-01-17">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Device statistics: Whenever all GetUpdates requests that were started (see
    `Sync.DeviceStatistics.RequestsStartedCount`) have completed, records the
    success of the entire operation.
  </summary>
</histogram>

<histogram name="Sync.DeviceStatistics.RequestsStartedCount" units="requests"
    expires_after="2027-01-17">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Device statistics: Whenever GetUpdates requests are started for the purpose
    of device statistics metrics, records the number of requests (= the number
    of accounts in the profile). This happens at most once per day, 30 seconds
    after profile initialization.
  </summary>
</histogram>

<histogram name="Sync.DeviceStatistics.RequestUrlFetchResponse"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2027-01-17">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Device statistics: The fetch response to an individual statistics network
    request, i.e. the network error if any, and the HTTP response code
    otherwise. Recorded when a network request completes.
  </summary>
</histogram>

<histogram name="Sync.DownloadUpdatesResult" enum="SyncerErrorValues"
    expires_after="2026-12-27">
  <owner>rushans@google.com</owner>
  <owner>treib@chromium.org</owner>
  <summary>
    Records the result of the download updates step of the sync cycle. This
    metric is recorded only once per sync cycle and records the last error
    encountered during the cycle.
  </summary>
</histogram>

<histogram name="Sync.EncryptorReceivedTime" units="ms"
    expires_after="2026-12-27">
  <owner>mtatarski@google.com</owner>
  <owner>treib@chromium.org</owner>
  <summary>
    The time between SyncServiceImpl::TryStart() being called and the encryptor
    being received from OSCryptAsync.
  </summary>
</histogram>

<histogram name="Sync.EntitySizeOnCommit.Entity.SpecificsOnly{SyncDataType}"
    units="bytes" expires_after="2027-02-07">
  <owner>ankushkush@google.com</owner>
  <owner>treib@chromium.org</owner>
  <summary>
    Size of individual sync entity specifics (not including tombstones) in
    bytes, without the sync metadata. Recorded right before an entity is
    committed to the server.
  </summary>
  <token key="SyncDataType" variants="SyncDataType"/>
</histogram>

<histogram name="Sync.EntitySizeOnCommit.Entity.WithMetadata{SyncDataType}"
    units="bytes" expires_after="2027-05-18">
  <owner>ankushkush@google.com</owner>
  <owner>treib@chromium.org</owner>
  <summary>
    Size of individual sync entities (not including tombstones) in bytes,
    including the sync metadata. Recorded right before an entity is committed to
    the server. See also `Sync.EntitySizeOnCommit.Tombstone.*` for tombstones.
  </summary>
  <token key="SyncDataType" variants="SyncDataType"/>
</histogram>

<histogram name="Sync.EntitySizeOnCommit.Tombstone{SyncDataType}" units="bytes"
    expires_after="2026-12-06">
  <owner>ankushkush@google.com</owner>
  <owner>treib@chromium.org</owner>
  <summary>
    Size of individual sync tombstones in bytes, including the sync metadata.
    Recorded right before an entity is committed to the server. See also
    `Sync.EntitySizeOnCommit.Entity.*` for non-tombstones.
  </summary>
  <token key="SyncDataType" variants="SyncDataType"/>
</histogram>

<histogram name="Sync.FeatureStatusForSyncToSigninMigration"
    enum="SyncFeatureStatusForSyncToSigninMigration" expires_after="2026-12-27">
  <owner>treib@chromium.org</owner>
  <owner>mastiz@chromium.org</owner>
  <summary>
    The overall status of Sync-the-feature for the purpose of the SyncToSignin
    migration, recorded on profile creation/startup, capturing the state from
    just before shutdown during the previous run of Chrome (i.e. before
    re-evaluation). See also data-type-specific statuses in
    `Sync.DataTypeActiveForSyncToSigninMigration.*`.

    Before M130, &quot;disabled&quot; and &quot;paused&quot; were recorded to a
    single bucket (number 1, &quot;Disabled or Paused&quot;).
  </summary>
</histogram>

<histogram name="Sync.History.DatabaseError" enum="SyncHistoryDatabaseError"
    expires_after="2027-07-27">
  <owner>treib@chromium.org</owner>
  <owner>mastiz@chromium.org</owner>
  <summary>
    Recorded when HistorySyncBridge encounters a database error. As a result,
    the bridge stops operating (and tracking metadata) for the rest of the
    runtime of Chrome.
  </summary>
</histogram>

<histogram name="Sync.IdentityErrorCard{SyncErrorReason}"
    enum="SyncErrorUiAction" expires_after="2027-02-07">
  <owner>ankushkush@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Android only.

    Identity error card is shown to signed-in non-syncing users, whenever the
    user navigates to account settings and there exists an identity error.

    Recorded whenever an error card is shown to the user, and if the user
    interacts with the card (i.e. presses the button to resolve the error).
  </summary>
  <token key="SyncErrorReason" variants="SyncErrorReason"/>
</histogram>

<histogram name="Sync.IdentityErrorMessage{SyncErrorReason}"
    enum="SyncErrorUiAction" expires_after="2027-01-31">
  <owner>ankushkush@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Android only.

    Identity error message is shown to signed-in non-syncing users with an
    identity error, when certain conditions are met.

    Recorded whenever a message is shown to the user, and if the user interacts
    with the message(i.e. either dismissing the message or pressing the button
    to resolve the error).
  </summary>
  <token key="SyncErrorReason" variants="SyncErrorReason"/>
</histogram>

<histogram name="Sync.IncomingInvalidationStatus"
    enum="SyncIncomingInvalidationStatus" expires_after="2026-12-16">
  <owner>rushans@google.com</owner>
  <owner>treib@chromium.org</owner>
  <summary>
    An outcome of handling incoming sync invalidations, recorded for each
    incoming FCM message when sync engine is registered for invalidations. This
    metric shows only the number of incoming messages regardless of the number
    of invalidated data types.
  </summary>
</histogram>

<histogram name="Sync.InitialState2" enum="SyncInitialState"
    expires_after="2027-01-10">
  <owner>treib@chromium.org</owner>
  <owner>mastiz@chromium.org</owner>
  <summary>
    An approximate state of sync at profile startup. Logs a few reasons sync
    definitely wouldn't be able to start, or that it probably can start. A
    dashboard stop and clear will fall under &quot;turned off and setup not
    completed&quot;. Only recorded for &quot;regular&quot; profiles, i.e. those
    in which Sync might actually start. This excludes incognito profiles, guest
    profiles, system profiles (used for the profile picker), lockscreen
    profiles, etc.
  </summary>
</histogram>

<histogram
    name="Sync.InvalidationFcmDeliveryLatency.ClockSkewDetected.{SyncInvalidationLatencySource}"
    enum="Boolean" expires_after="2027-05-01">
  <owner>mastiz@chromium.org</owner>
  <owner>nyquist@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Recorded true when a Sync invalidation is received with an FCM dispatch
    timestamp in the future relative to the client's clock, indicating clock
    skew, using {SyncInvalidationLatencySource}. Recorded false when a valid
    latency sample (non-negative) is recorded. Note that ServerBased.* metrics
    are recorded cumulatively; a single sample is recorded in every histogram
    whose uncertainty threshold is satisfied.
  </summary>
  <token key="SyncInvalidationLatencySource"
      variants="SyncInvalidationLatencySource"/>
</histogram>

<histogram name="Sync.InvalidationFcmDeliveryLatency.ServerBased.Uncertainty"
    units="ms" expires_after="2027-05-01">
  <owner>mastiz@chromium.org</owner>
  <owner>nyquist@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    The uncertainty (estimated error range) of the network time used for
    recording Sync.InvalidationFcmDeliveryLatency.ServerBased.* histograms.
    Recorded only when the network time is successfully retrieved and available.
  </summary>
</histogram>

<histogram
    name="Sync.InvalidationFcmDeliveryLatency.{SyncInvalidationLatencySource}{SyncDataType}"
    units="ms" expires_after="2027-05-01">
  <owner>mastiz@chromium.org</owner>
  <owner>nyquist@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    The pure FCM delivery latency of Sync invalidations for {SyncDataType},
    measured from server dispatch (FCM exact publish time in payload) to client
    receipt, using {SyncInvalidationLatencySource}. Note that ServerBased.*
    metrics are recorded cumulatively; a single sample is recorded in every
    histogram whose uncertainty threshold is satisfied.
  </summary>
  <token key="SyncInvalidationLatencySource"
      variants="SyncInvalidationLatencySource"/>
  <token key="SyncDataType" variants="SyncDataType">
    <variant name="" summary="all types combined"/>
  </token>
</histogram>

<histogram name="Sync.InvalidationPerDataType" enum="SyncDataTypes"
    expires_after="never">
<!-- expires-never: For monitoring FCM based invalidations. -->

  <owner>mmoskvitin@google.com</owner>
  <owner>treib@chromium.org</owner>
  <summary>
    Histogram tracks the number of invalidations received per sync data type.
  </summary>
</histogram>

<histogram name="Sync.Invalidations.OnMessagesDeleted" enum="Boolean"
    expires_after="2026-10-25">
  <owner>rushans@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records true whenever OnMessagesDeleted is called on FCMHandler. This metric
    should be compared against Sync.IncomingInvalidationStatus total count to
    compare the ratio of deleted messages in FCM.

    Note: messages can be deleted if there are too many incoming FCM messages
    from different sender IDs on one client, i.e. not only sync invalidations.
    Refer to FCM documentation for more details.
  </summary>
</histogram>

<histogram name="Sync.InvalidationsInitializationTime" units="ms"
    expires_after="2027-02-04">
  <owner>rushans@google.com</owner>
  <owner>treib@chromium.org</owner>
  <summary>
    Records the time required for sync invalidations to be fully initialized.
    The metric is calculated against sync engine creation time (may be deferred
    from browser startup). This metric may be reported several times during
    browser session whenever SyncEngine is reset, e.g. when sync was disabled
    and re-enabled again.
  </summary>
</histogram>

<histogram
    name="Sync.InvalidationTransitLatency.ClockSkewDetected.{SyncInvalidationLatencySource}"
    enum="Boolean" expires_after="2027-05-01">
  <owner>mastiz@chromium.org</owner>
  <owner>nyquist@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Recorded true when a Sync invalidation is received with a timestamp in the
    future relative to the client's clock, indicating clock skew, using
    {SyncInvalidationLatencySource}. Recorded false when a valid latency sample
    (non-negative) is recorded. Note that ServerBased.* metrics are recorded
    cumulatively; a single sample is recorded in every histogram whose
    uncertainty threshold is satisfied.
  </summary>
  <token key="SyncInvalidationLatencySource"
      variants="SyncInvalidationLatencySource"/>
</histogram>

<histogram name="Sync.InvalidationTransitLatency.ServerBased.Uncertainty"
    units="ms" expires_after="2027-05-01">
  <owner>mastiz@chromium.org</owner>
  <owner>nyquist@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    The uncertainty (estimated error range) of the network time used for
    recording Sync.InvalidationTransitLatency.ServerBased.* histograms. Recorded
    only when the network time is successfully retrieved and available.
  </summary>
</histogram>

<histogram
    name="Sync.InvalidationTransitLatency.{SyncInvalidationLatencySource}{SyncDataType}"
    units="ms" expires_after="2027-05-01">
  <owner>mastiz@chromium.org</owner>
  <owner>nyquist@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    The end-to-end transit latency of Sync FCM invalidations for {SyncDataType},
    measured from server dispatch (publish time in payload) to client receipt,
    using {SyncInvalidationLatencySource}. Note that ServerBased.* metrics are
    recorded cumulatively; a single sample is recorded in every histogram whose
    uncertainty threshold is satisfied.
  </summary>
  <token key="SyncInvalidationLatencySource"
      variants="SyncInvalidationLatencySource"/>
  <token key="SyncDataType" variants="SyncDataType">
    <variant name="" summary="all types combined"/>
  </token>
</histogram>

<histogram name="Sync.InvalidBookmarkSpecifics"
    enum="InvalidBookmarkSpecificsError" expires_after="2026-05-24">
  <owner>mastiz@chromium.org</owner>
  <owner>rushans@google.com</owner>
  <summary>
    Records different causes for BookmarkSpecifics to be deemed invalid. Issues
    are recorded upon verifying validity of specifics received from the server.
  </summary>
</histogram>

<histogram name="Sync.KeystoreDecryptionFailed"
    enum="SyncKeystoreDecryptionFailure" expires_after="2027-09-13">
  <owner>mmoskvitin@google.com</owner>
  <owner>mastiz@chromium.org</owner>
  <summary>The reason for a failure decrypting the keystore Nigori.</summary>
</histogram>

<histogram name="Sync.Local.Enabled2" enum="BooleanEnabled"
    expires_after="2027-08-23">
  <owner>igorruvinov@chromium.org</owner>
  <owner>pastarmovj@chromium.org</owner>
  <summary>
    Tracks the number of times the local sync backend was enabled by the user.
    Recorded when the SyncService is created, i.e. during profile startup.
  </summary>
</histogram>

<histogram name="Sync.Local.FileSizeKB" units="KB" expires_after="2027-01-24">
  <owner>igorruvinov@chromium.org</owner>
  <owner>pastarmovj@chromium.org</owner>
  <summary>
    Tracks the size of the local sync backend database file. Recorded every time
    the roaming profile file is written by the client.
  </summary>
</histogram>

<histogram name="Sync.Local.ReadPlatformFileError" enum="PlatformFileError"
    expires_after="2026-11-15">
  <owner>igorruvinov@chromium.org</owner>
  <owner>pastarmovj@chromium.org</owner>
  <summary>
    Error code describing failure to read persisted sync state from local file.
    Recorded when an error is encountered during opening or reading of the local
    sync state file.
  </summary>
</histogram>

<histogram name="Sync.Local.RoamingProfileUnavailable2" enum="BooleanError"
    expires_after="2027-02-21">
  <owner>igorruvinov@chromium.org</owner>
  <owner>pastarmovj@chromium.org</owner>
  <summary>
    Tracks the number of times the Roaming profile cannot be retrieved. Recorded
    when the SyncService is created, i.e. during profile startup.
  </summary>
</histogram>

<histogram name="Sync.LocalChangeDuringRemoteUpdate" enum="SyncDataTypes"
    expires_after="2026-12-27">
  <owner>rushans@google.com</owner>
  <owner>treib@chromium.org</owner>
  <summary>
    Records local changes happening during an ongoing remote incremental update.
  </summary>
</histogram>

<histogram name="Sync.MissingProgressMarkerInGetUpdatesResponse"
    enum="SyncDataTypes" expires_after="2027-10-01">
  <owner>rushans@google.com</owner>
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Logged when the GetUpdates response didn't contain a progress marker for an
    expected/requested data type. Recorded once per missing data type.
  </summary>
</histogram>

<histogram name="Sync.ModelError{SyncDataType}" enum="SyncModelError"
    expires_after="2027-02-07">
  <owner>mtatarski@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the type of model error encountered in {SyncDataType}.
  </summary>
  <token key="SyncDataType" variants="SyncDataType">
    <variant name="" summary="Any type"/>
  </token>
</histogram>

<histogram name="Sync.ModelLoadManager.LoadModelsElapsedTime" units="ms"
    expires_after="2027-08-12">
  <owner>ankushkush@google.com</owner>
  <owner>treib@chromium.org</owner>
  <summary>
    Records the time taken for all data types to finish loading, initiated from
    ModelLoadManager::LoadModels().
  </summary>
</histogram>

<histogram name="Sync.ModelLoadManager.LoadModelsTimeout" enum="SyncDataTypes"
    expires_after="2027-08-12">
  <owner>ankushkush@google.com</owner>
  <owner>treib@chromium.org</owner>
  <summary>
    Recorded whenever a data type fails to complete loading, called from
    ModelLoadManager::LoadModels(), before the timeout. This type is ignored and
    the rest of types which have loaded are marked ready for configuration. This
    type would ultimately be stopped once gets out of MODEL_STARTING state.
  </summary>
</histogram>

<histogram name="Sync.NigoriStorageDecryptionResult" enum="BooleanSuccess"
    expires_after="2026-12-27">
  <owner>mtatarski@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the success or failure of decrypting the Nigori local data from
    disk. This data contains sync's encryption keys.
  </summary>
</histogram>

<histogram name="Sync.NigoriStorageEncryptionResult" enum="BooleanSuccess"
    expires_after="2026-12-27">
  <owner>mtatarski@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the success or failure of encrypting the Nigori local data to disk.
    This data contains sync's encryption keys.
  </summary>
</histogram>

<histogram
    name="Sync.NonReflectionUpdateFreshnessPossiblySkewed2{SyncDataType}"
    units="ms" expires_after="2027-01-31">
  <owner>mastiz@chromium.org</owner>
  <owner>treib@chromium.org</owner>
  <summary>
    Freshness of the sync data per received sync entity update, excluding
    reflections, for {SyncDataType}. The time represents the clock difference
    from the model being modified (usually on another device) until the change
    is processing by this instance of the browser. The time is capped at 1 week.
    Beware of potential clock skew due to two clients being involved.
  </summary>
  <token key="SyncDataType" variants="SyncDataType">
    <variant name=""
        summary="any data type. NOTE that changes in this histogram are often
                 caused by data types being introduced or retired, so look at
                 the per-data-type splits"/>
  </token>
</histogram>

<histogram name="Sync.NudgedUpdateLatency{SyncDataType}" units="ms"
    expires_after="2027-02-09">
  <owner>rushans@google.com</owner>
  <owner>treib@chromium.org</owner>
  <summary>
    Records the time between receiving invalidations and applying updates
    (including empty) per datatype. Recorded once per sync cycle for each
    datatype which had invalidations triggered GetUpdates.

    Note that only invalidations received during the current browser session are
    considered.
  </summary>
  <token key="SyncDataType" variants="SyncDataType"/>
</histogram>

<histogram name="Sync.NudgedUpdateResult{SyncDataType}"
    enum="NudgedUpdateResult" expires_after="2027-02-09">
  <owner>rushans@google.com</owner>
  <owner>treib@chromium.org</owner>
  <summary>
    Records the result of downloading updates for a data type when requested
    (i.e. there was at least one invalidation during a sync cycle). Recorded at
    the end of a sync cycle (excluding requests without invalidations for the
    data type).
  </summary>
  <token key="SyncDataType" variants="SyncDataType"/>
</histogram>

<histogram name="Sync.OutgoingPassordSharingInvitation.CommitError"
    enum="OutgoingPasswordSharingInvitationCommitError"
    expires_after="2026-11-05">
  <owner>rushans@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Recorded if commit of outgoing password sharing invitations fails with a
    datatype-specific error code returned from the server. Records the returned
    error. Sync.CommitResponse.OUTGOING_PASSWORD_SHARING_INVITATION can be used
    to compare with the total number of commit requests.
  </summary>
</histogram>

<histogram name="Sync.PassphraseType" enum="SyncPassphraseType"
    expires_after="2027-01-17">
  <owner>treib@chromium.org</owner>
  <owner>mastiz@chromium.org</owner>
  <summary>The active sync passphrase type at sync startup.</summary>
</histogram>

<histogram name="Sync.PassphraseType5" enum="PassphraseTypeForMetrics"
    expires_after="never">
<!-- expires-never: important for UMA filtering. -->

  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Sync passphrase type collected at each metrics upload. The implementation
    relies on the kSyncCachedPassphraseType pref, and thus can record the
    correct value before sync engine initialization. Signed-out users are
    counted in the &quot;unknown&quot; bucket. Recorded only after profile
    initialization.
  </summary>
</histogram>

<histogram name="Sync.PassphraseTypeUponNotMyBirthdayOrEncryptionObsolete"
    enum="SyncPassphraseType" expires_after="2027-02-14">
  <owner>mastiz@chromium.org</owner>
  <owner>mmoskvitin@google.com</owner>
  <summary>
    The active sync passphrase type when the client receives a NOT_MY_BIRTHDAY
    or ENCRYPTION_OBSOLETE event from the server.
  </summary>
</histogram>

<histogram name="Sync.PasswordNotesStateInUpdate"
    enum="SyncPasswordNotesStateInUpdate" expires_after="2026-11-15">
  <owner>mamir@chromium.org</owner>
  <owner>mastiz@chromium.org</owner>
  <summary>
    Records whether password notes are set in password specifics proto or the
    backup field. Recorded when decrypting password entity update upon download
    from the sync server.
  </summary>
</histogram>

<histogram name="Sync.PasswordsBatchUpload.Count" units="passwords"
    expires_after="2027-03-03">
  <owner>ankushkush@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Logs the count of local passwords moved to the account store.

    This is logged when, upon a batch upload request, passwords have been moved
    to the account store. Note that passwords may not have been uploaded to the
    server yet. Upload happens as part of the regular commit process.
  </summary>
</histogram>

<histogram name="Sync.PendingInvalidationStatus"
    enum="PendingInvalidationStatus" expires_after="2027-01-03">
  <owner>shabdan@google.com</owner>
  <owner>rushans@google.com</owner>
  <summary>
    Number of acknowledged and dropped invalidations broken down by reason.
    Recorded during browser shutdown, after a sync cycle or on incoming
    invalidation.
  </summary>
</histogram>

<histogram name="Sync.PlaceholderResync.On{Type}"
    enum="SyncPlaceholderTabResyncResult" expires_after="2027-08-17">
  <owner>skym@chromium.org</owner>
  <owner>ckitagawa@chromium.org</owner>
  <summary>
    Records the result of whether the placeholder tab had its local session
    found, had its data resynced successfully, or remained unsynced.
  </summary>
  <token key="Type" variants="AssociateWindowsType"/>
</histogram>

<histogram name="Sync.PostedClientToServerMessage"
    enum="SyncClientToServerMessageContents" expires_after="2027-02-14">
  <owner>mastiz@chromium.org</owner>
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Number of network requests issued by sync to the sync server, grouped by
    content type. Note: this metric is recorded before the request is sent and
    it may be impacted by network / server errors (e.g. due to retries). Compare
    against Sync.URLFetchResponse.
  </summary>
</histogram>

<histogram name="Sync.PostedClientToServerMessageError2" enum="SyncErrorType"
    expires_after="2027-02-14">
  <owner>mastiz@chromium.org</owner>
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    A sync error code received from the sync server as a result of a
    client-initiated request. Note that this excludes network errors (e.g.
    client offline) and HTTP errors.
  </summary>
</histogram>

<histogram name="Sync.PostedClientToServerMessageLatency" units="ms"
    expires_after="2027-02-14">
  <owner>mastiz@chromium.org</owner>
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Time taken for a client-initiated request to be sent over the network and
    receive the response from the sync server.
  </summary>
</histogram>

<histogram name="Sync.PostedClientToServerMessagePartialErrorDataType"
    enum="SyncDataTypes" expires_after="2027-02-14">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    The data type(s) which encountered a partial (i.e. data-type-specific) error
    as a result of a client-initiated request. Recorded when a request resulted
    in a PARTIAL_FAILURE (and the server provided the list of affected data
    types).

    This histogram can help explain changes in
    Sync.PostedClientToServerMessageError2::PARTIAL_FAILURE.
  </summary>
</histogram>

<histogram name="Sync.PostedDataTypeCommitRequest" enum="SyncDataTypes"
    expires_after="2027-02-14">
  <owner>mastiz@chromium.org</owner>
  <owner>rushans@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Emitted per network Commit() request to the sync server and datatype. It
    helps estimate how much load each datatype puts on the server. Note that the
    sum across buckets does not represent the total number of requests sent to
    the server, since multiple datatypes can be grouped in a single request. See
    Sync.PostedClientToServerMessage for the total number of requests/messages.
    Note: this metric is recorded before the request is sent and it may be
    impacted by network / server errors (e.g. due to retries). Compare against
    Sync.CommitResponse.
  </summary>
</histogram>

<histogram name="Sync.PostedDataTypeGetUpdatesRequest" enum="SyncDataTypes"
    expires_after="2027-02-14">
  <owner>mastiz@chromium.org</owner>
  <owner>rushans@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Emitted per network GetUpdates() request to the sync server and datatype. It
    represents how much load each datatype puts on the server. Note that the sum
    across buckets does not represent the total number of requests sent to the
    server, since multiple datatypes can be grouped in a single request. See
    Sync.PostedClientToServerMessage for the total number of requests/messages.
    Note: this metric is recorded before the request is sent and it may be
    impacted by network / server errors (e.g. due to retries).
  </summary>
</histogram>

<histogram name="Sync.PostedGetUpdatesOrigin" enum="SyncGetUpdatesOrigin"
    expires_after="2027-02-07">
  <owner>mastiz@chromium.org</owner>
  <owner>rushans@google.com</owner>
  <summary>
    Emitted per network GetUpdates() request to the sync server, it represents
    the reason for sending such GetUpdates() request.
  </summary>
</histogram>

<histogram name="Sync.PrefModelAssociator.OnPrefValueChanged{SyncDataType}"
    enum="SyncablePref" expires_after="2027-05-18">
  <owner>ankushkush@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the syncable preference id when it is changed. This is recorded as
    soon as an OnPrefValueChanged notification is received. Note that this is
    only recorded for syncable preferences and has been introduced to
    investigate metric changes in crbug.com/418991364.

    This is different from Sync.SyncablePrefValueChanged in the sense that this
    one is recorded even before the pref sync data type has started.
  </summary>
  <token key="SyncDataType" variants="SyncDataType"/>
</histogram>

<histogram name="Sync.ProblematicServerSideBookmarks"
    enum="RemoteBookmarkUpdateError" expires_after="2027-03-29">
  <owner>mastiz@chromium.org</owner>
  <owner>rushans@google.com</owner>
  <summary>
    Records different issues encountered when processing incremental bookmark
    updates from the sync server.
  </summary>
</histogram>

<histogram name="Sync.ProblematicServerSideBookmarksDuringMerge"
    enum="RemoteBookmarkUpdateError" expires_after="2027-03-29">
  <owner>rushans@google.com</owner>
  <owner>mastiz@chromium.org</owner>
  <summary>
    Records different issues encountered when processing remote bookmarks from
    the sync server during the initial merge procedure.
  </summary>
</histogram>

<histogram name="Sync.RecordedUserEventType" enum="SyncUserEventType"
    expires_after="2027-05-17">
  <owner>mmoskvitin@google.com</owner>
  <owner>treib@chromium.org</owner>
  <summary>
    For every user event that is recorded, this histogram records the type of
    event (i.e. which of the &quot;oneof event&quot; entries in the
    UserEventSpecifics proto was set).
  </summary>
</histogram>

<histogram name="Sync.ResetEngineReason" enum="SyncResetEngineReason"
    expires_after="2026-11-15">
  <owner>rushans@google.com</owner>
  <owner>treib@chromium.org</owner>
  <summary>
    Recorded whenever the sync engine is restarted. The recorded value is the
    calling site of ResetEngine.

    Before 08/2024, the bucket &quot;Upgrade client error&quot; used to record
    other events too (any call to the old StopAndClear() API, removed in
    crbug.com/40797392).
  </summary>
</histogram>

<histogram name="Sync.SearchEngine.AccountDefaultSearchEngineCopiedToLocal"
    enum="Boolean" expires_after="2027-02-24">
  <owner>ankushkush@google.com</owner>
  <owner>mahmadi@chromium.org</owner>
  <summary>
    Recorded whenever search engines sync is being stopped, for example, upon
    signout and there exists an account-only search engine which is set as the
    default search engine. Such a search engine is copied to local storage.
  </summary>
</histogram>

<histogram name="Sync.SearchEngine.AddedKeywordHasAccountData" enum="Boolean"
    expires_after="2027-01-03">
  <owner>ankushkush@google.com</owner>
  <owner>mahmadi@chromium.org</owner>
  <summary>
    Recorded whenever a new keyword is added. This records whether the keyword
    has account data. If it does not, the local value is copied to the account.
  </summary>
</histogram>

<histogram
    name="Sync.SearchEngine.ChangesCommittedUpon{UpdateType}_{Operation}"
    units="changes" expires_after="2027-07-12">
  <owner>ankushkush@google.com</owner>
  <owner>mahmadi@chromium.org</owner>
  <summary>
    Records the count of new changes committed to the sync server for search
    engines upon every startup and/or initial sync and upon every incremental
    update, separately for each type of sync change (add, delete or update).
  </summary>
  <token key="UpdateType">
    <variant name="IncrementalUpdate"/>
    <variant name="SyncStart"/>
  </token>
  <token key="Operation">
    <variant name="Added"/>
    <variant name="Deleted"/>
    <variant name="Updated"/>
  </token>
</histogram>

<histogram name="Sync.SearchEngine.DuplicateIsDefaultSearchProvider"
    enum="Boolean" expires_after="2027-01-03">
  <owner>ankushkush@google.com</owner>
  <owner>mahmadi@chromium.org</owner>
  <summary>
    Recorded upon every initial merge/startup if there exists a local search
    engine that is a duplicate of a remote search engine. Records whether the
    conflicting local search engine is the default search provider, which if so,
    ignores the account value.
  </summary>
</histogram>

<histogram name="Sync.SearchEngine.FaviconOnlyUpdate" enum="Boolean"
    expires_after="2027-01-24">
  <owner>ankushkush@google.com</owner>
  <owner>mahmadi@chromium.org</owner>
  <summary>
    Upon every search engine update, records whether the update only updates the
    favicon url. If true, the update is not committed to the sync server.
  </summary>
</histogram>

<histogram name="Sync.SearchEngine.HasLocalDataDuringStopSyncing2"
    enum="Boolean" expires_after="2027-02-24">
  <owner>ankushkush@google.com</owner>
  <owner>mahmadi@chromium.org</owner>
  <summary>
    Recorded whenever search engines sync is being stopped, for example, upon
    signout. For each search engine with account data, records whether there
    exists local data. Note that this is not recorded upon browser shutdown.
  </summary>
</histogram>

<histogram
    name="Sync.SearchEngine.LocalUntouchedAutogenerated.IsPrepopulatedEntry"
    enum="Boolean" expires_after="2027-05-06">
  <owner>ankushkush@google.com</owner>
  <owner>mahmadi@chromium.org</owner>
  <summary>
    Upon every initial merge/startup while going over the existing data to build
    the sync data, if a local synced search engine is untouched and
    autogenerated, records whether it is a prepopulated search engine. This
    should always be false.
  </summary>
</histogram>

<histogram
    name="Sync.SearchEngine.LocalUntouchedAutogenerated.IsStarterPackEntry"
    enum="Boolean" expires_after="2027-05-06">
  <owner>ankushkush@google.com</owner>
  <owner>mahmadi@chromium.org</owner>
  <summary>
    Upon every initial merge/startup while going over the existing data to build
    the sync data, if a local synced search engine is untouched and
    autogenerated, records whether it is a starter pack entry. This should
    always be false.
  </summary>
</histogram>

<histogram name="Sync.SearchEngine.RemoteSearchEngineIsUntouchedAutogenerated"
    enum="Boolean" expires_after="2027-05-06">
  <owner>ankushkush@google.com</owner>
  <owner>mahmadi@chromium.org</owner>
  <summary>
    Records whether an untouched autogenerated search engine is received from
    the server, can be during both initial and incremental updates.
  </summary>
</histogram>

<histogram
    name="Sync.SearchEngine.RemoteUntouchedAutogenerated.IsPrepopulatedEntry"
    enum="Boolean" expires_after="2027-05-06">
  <owner>ankushkush@google.com</owner>
  <owner>mahmadi@chromium.org</owner>
  <summary>
    Upon receiving an untouched autogenerated search engine from the sync the
    server, records whether it is a prepopulated search engine. This should
    always be false.
  </summary>
</histogram>

<histogram
    name="Sync.SearchEngine.RemoteUntouchedAutogenerated.IsStarterPackEntry"
    enum="Boolean" expires_after="2027-05-06">
  <owner>ankushkush@google.com</owner>
  <owner>mahmadi@chromium.org</owner>
  <summary>
    Upon receiving an untouched autogenerated search engine from the sync the
    server, records whether it is a starter pack entry. This should always be
    false.
  </summary>
</histogram>

<histogram name="Sync.SearchEngine.UntouchedAutogenerated{Operation}"
    enum="Boolean" expires_after="2027-05-06">
  <owner>ankushkush@google.com</owner>
  <owner>mahmadi@chromium.org</owner>
  <summary>
    If a new search engine is added/deleted/updated, records whether it is
    untouched and autogenerated.
  </summary>
  <token key="Operation">
    <variant name="Added"/>
    <variant name="Deleted"/>
    <variant name="Updated"/>
  </token>
</histogram>

<histogram
    name="Sync.SearchEngine.UntouchedAutogenerated{Operation}.IsPrepopulatedEntry"
    enum="Boolean" expires_after="2027-05-06">
  <owner>ankushkush@google.com</owner>
  <owner>mahmadi@chromium.org</owner>
  <summary>
    If an untouched and autogenerated search engine is added/deleted/updated,
    records whether it is a prepopulated search engine.
  </summary>
  <token key="Operation">
    <variant name="Added"/>
    <variant name="Deleted"/>
    <variant name="Updated"/>
  </token>
</histogram>

<histogram
    name="Sync.SearchEngine.UntouchedAutogenerated{Operation}.IsStarterPackEntry"
    enum="Boolean" expires_after="2027-05-06">
  <owner>ankushkush@google.com</owner>
  <owner>mahmadi@chromium.org</owner>
  <summary>
    If an untouched and autogenerated search engine is added/deleted/updated,
    records whether it is a starter pack entry. This should always be false.
  </summary>
  <token key="Operation">
    <variant name="Added"/>
    <variant name="Deleted"/>
    <variant name="Updated"/>
  </token>
</histogram>

<histogram name="Sync.SelectedTypesInTransportMode" enum="SyncDataTypes"
    expires_after="2026-12-27">
  <owner>treib@chromium.org</owner>
  <owner>mastiz@chromium.org</owner>
  <summary>
    For users in transport mode (i.e. without Sync-the-feature enabled), this
    records which data types they have selected. Samples are taken every time
    the Sync data types are (re)configured, which typically happens during
    startup and when the user changes any Sync settings.

    See also &quot;Sync.SyncEverything2&quot; and &quot;Sync.CustomSync3&quot;
    which are the corresponding histograms for Sync-the-feature users.
  </summary>
</histogram>

<histogram name="Sync.SharingMessage.CommitResult"
    enum="SyncSharingMessageCommitErrorCode" expires_after="2026-10-25">
  <owner>rushans@google.com</owner>
  <owner>treib@chromium.org</owner>
  <summary>
    Counts the number of commit results while committing sharing message.
  </summary>
</histogram>

<histogram name="Sync.SignoutWithUnsyncedData" enum="Boolean"
    expires_after="2027-08-02">
  <owner>ankushkush@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Logs whether the user chooses to proceed with signout or not, after a
    warning dialog about unsynced data is shown. True means the user continued
    with sign out, False means the action was cancelled.

    Note: iOS only.
  </summary>
</histogram>

<histogram name="Sync.Startup.TimeDeferred2" units="ms"
    expires_after="2027-03-31">
  <owner>mastiz@chromium.org</owner>
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Recorded on browser startup if the SyncEngine initialization is deferred by
    a fixed (configurable) delay due to performance reasons. In some cases, a
    data type may force sync to start before the delay finishes, causing the
    recorded time to be smaller. This histogram records the time spent after the
    SyncServiceImpl *creation* but before the SyncEngine initialization.
  </summary>
</histogram>

<histogram name="Sync.SyncablePrefIncomingIncrementalUpdate"
    enum="SyncablePref" expires_after="2027-02-14">
  <owner>ankushkush@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    This is recorded everytime a remote incremental update is received for a
    syncable pref. This does not take into account whether the pref exists
    locally or if has the same value.
  </summary>
</histogram>

<histogram name="Sync.SyncablePrefValueChanged{SyncDataType}"
    enum="SyncablePref" expires_after="2027-01-10">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    This is recorded everytime a syncable pref of type {SyncDataType} is changed
    locally. This does not include changes sent during the initial sync/merge.
  </summary>
  <token key="SyncDataType" variants="SyncDataType">
    <variant name="" summary="Any type"/>
  </token>
</histogram>

<histogram
    name="Sync.SyncableService.MaybeClearDataIfMetadataEmptyOrInvalid{SyncDataType}"
    enum="Boolean" expires_after="2027-05-19">
  <owner>ankushkush@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records if the metadata was empty or invalid during startup, leading to a
    possible clearing of data in the syncable service, triggered by the
    SyncableServiceBasedBridge. This is recorded once per type upon profile
    load. This is to let the data types clear the sync data if needed to avoid
    leaking stale account data.
  </summary>
  <token key="SyncDataType" variants="SyncDataType"/>
</histogram>

<histogram name="Sync.SyncableServiceStartTime{SyncDataType}" units="ms"
    expires_after="2027-03-03">
  <owner>ankushkush@google.com</owner>
  <owner>treib@chromium.org</owner>
  <summary>
    During browser startup, if sync is enabled and initial data exists, this
    records the time until a SyncableService is ready to process changes (both
    locally and coming from the server). The value is the duration from when
    SyncableServiceBasedBridge was initialized to the time when SyncableService
    has started (this comprises of loading all data from disk and
    MergeDataAndStartSyncing()).
  </summary>
  <token key="SyncDataType" variants="SyncDataType"/>
</histogram>

<histogram name="Sync.SyncErrorInfobarDismissed" enum="SyncErrorInfobarTypes"
    expires_after="2027-05-30">
  <owner>rgod@google.com</owner>
  <owner>ylahodiuk@google.com</owner>
  <summary>
    Records whenever user dismisses a sync error infobar displayed for a
    specific error. iOS only.

    Note: Recorded from M135. Keep in mind when comparing with
    Sync.SyncErrorInfobarDisplayed histogram that was introduced much earlier.
  </summary>
</histogram>

<histogram name="Sync.SyncErrorInfobarDisplayed2{SyncErrorInfobarTrigger}"
    enum="SyncErrorInfobarTypes" expires_after="2026-12-16">
  <owner>rgod@google.com</owner>
  <owner>ylahodiuk@google.com</owner>
  <owner>jlebel@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Enumeration of error conditions that displays an infobar to the user
    triggered by a following event: {SyncErrorInfobarTrigger}

    iOS only.
  </summary>
</histogram>

<histogram name="Sync.SyncEverything2" enum="Boolean"
    expires_after="2027-02-07">
  <owner>treib@chromium.org</owner>
  <owner>mastiz@chromium.org</owner>
  <summary>
    Boolean histogram for whether the &quot;Sync Everything&quot; option was
    selected by a Sync-the-feature user. Samples are taken every time the Sync
    data types are (re)configured, which typically happens during startup and
    when the user changes any Sync settings.
  </summary>
</histogram>

<histogram name="Sync.SyncEverythingOS" enum="Boolean"
    expires_after="2027-01-24">
  <owner>mmoskvitin@google.com</owner>
  <owner>treib@chromium.org</owner>
  <summary>
    Analogous to Sync.SyncEverything2 for Chrome OS sync settings. Reflects
    whether the &quot;Sync Everything&quot; option was selected by the user for
    OS datatypes. Samples are taken every time the Sync data types are
    (re)configured, which typically happens during startup and when the user
    changes any Sync settings.
  </summary>
</histogram>

<histogram name="Sync.SyncSetupIncompleteMigrationDecision"
    enum="SyncSetupIncompleteMigrationDecision" expires_after="2026-11-28">
  <owner>ankushkush@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    The decision whether to migrate the user from sync-setup-incomplete state to
    signed-in history-off state. This is recorded for all users upon profile
    load.
  </summary>
</histogram>

<histogram name="Sync.SyncStoppedURLFetchResponse"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2027-08-30">
  <owner>rushans@google.com</owner>
  <owner>treib@chromium.org</owner>
  <summary>
    Counts of responses (both http code and net error code) for Sync stopped
    event URL fetches. Note that requests that timed out are not covered by this
    histogram; see Sync.SyncStoppedURLFetchTimedOut for that.
  </summary>
</histogram>

<histogram name="Sync.SyncStoppedURLFetchTimedOut" enum="BooleanTimedOut"
    expires_after="2026-12-15">
  <owner>rushans@google.com</owner>
  <owner>treib@chromium.org</owner>
  <summary>
    Whether a Sync stopped event URL fetch timed out or not. Note that this
    records true on timeout and false on success, but doesn't record anything if
    the fetch failed for any other reason.
  </summary>
</histogram>

<histogram name="Sync.SyncToSigninMigration.ExtensionsMigrationStep"
    enum="SyncToSigninMigrationExtensionsStep" expires_after="2027-01-28">
  <owner>ankushkush@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Within the wider Sync-to-Signin migration, this records various steps in the
    Extensions-specific migration. The migration is requested by the central
    Sync-to-Signin migration on profile initialization, and happens at most once
    per browser session (and typically exactly once per profile). &quot;Total
    count&quot; and &quot;Bucket proportion&quot; are not really meaningful;
    instead compare the absolute sizes of the various buckets.
  </summary>
</histogram>

<histogram name="Sync.SyncToSigninMigration.MigrationType"
    enum="SyncToSigninMigrationType" expires_after="2027-02-07">
  <owner>ankushkush@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    This records the type of Sync-to-Signin migration that a user underwent,
    either just now or in a previous browser run. This is recorded upon profile
    creation/startup for all users.
  </summary>
</histogram>

<histogram name="Sync.SyncToSigninMigration.ReadingListMigrationStep"
    enum="SyncToSigninMigrationReadingListStep" expires_after="2027-02-07">
  <owner>treib@chromium.org</owner>
  <owner>mastiz@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Within the wider Sync-to-Signin migration, this records various steps in the
    ReadingList-specific migration. The migration is requested by the central
    Sync-to-Signin migration on profile initialization, and happens at most once
    per browser session (and typically exactly once per profile). &quot;Total
    count&quot; and &quot;Bucket proportion&quot; are not really meaningful;
    instead compare the absolute sizes of the various buckets.
  </summary>
</histogram>

<histogram name="Sync.SyncToSigninMigration.StatsTableCleanupStep"
    enum="SyncToSigninMigrationStatsTableCleanupStep"
    expires_after="2027-01-28">
  <owner>ankushkush@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Within the wider Sync-to-Signin migration, this records various steps in the
    Stats table cleanup process from the Account Password Store. The cleanup is
    requested by the central Sync-to-Signin migration on profile initialization,
    and happens at most once per browser session (and typically exactly once per
    profile). &quot;Total count&quot; and &quot;Bucket proportion&quot; are not
    really meaningful; instead compare the absolute sizes of the various
    buckets.
  </summary>
</histogram>

<histogram name="Sync.SyncToSigninMigration.ThemeMigrationStep"
    enum="SyncToSigninMigrationThemeStep" expires_after="2027-01-28">
  <owner>ankushkush@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Within the wider Sync-to-Signin migration, this records various steps in the
    Themes-specific migration. The migration is requested by the central
    Sync-to-Signin migration on profile initialization, and happens at most once
    per browser session (and typically exactly once per profile). &quot;Total
    count&quot; and &quot;Bucket proportion&quot; are not really meaningful;
    instead compare the absolute sizes of the various buckets.
  </summary>
</histogram>

<histogram name="Sync.SyncToSigninMigrationDecision"
    enum="SyncToSigninMigrationDecisionOverall" expires_after="2027-02-07">
  <owner>treib@chromium.org</owner>
  <owner>mastiz@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    The outcome of the decision whether the Sync-to-Signin migration should run
    or not (and why). Recorded on profile creation/startup, only on iOS. Note
    that the number of samples in the &quot;Migrate&quot; bucket can be compared
    to the total count of &quot;Sync.SyncToSigninMigrationOutcome&quot; to
    verify that all migrations that were started also finished.
  </summary>
</histogram>

<histogram
    name="Sync.SyncToSigninMigrationDecision{SyncToSigninMigrationMode}{SyncDataTypeForSyncToSigninMigration}"
    enum="SyncToSigninMigrationDataTypeDecision" expires_after="2027-02-07">
  <owner>treib@chromium.org</owner>
  <owner>mastiz@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    The outcome of the decision whether the Sync-to-Signin migration should run
    or not (and why) for {SyncDataTypeForSyncToSigninMigration}. Recorded on
    profile creation/startup, only on iOS, and when the overall decision was to
    {SyncToSigninMigrationMode} (see `Sync.SyncToSigninMigrationDecision`).
  </summary>
  <token key="SyncToSigninMigrationMode" variants="SyncToSigninMigrationMode"/>
  <token key="SyncDataTypeForSyncToSigninMigration"
      variants="SyncDataTypeForSyncToSigninMigration"/>
</histogram>

<histogram name="Sync.SyncToSigninMigrationExecutionMode"
    enum="SyncToSigninMigrationExecutionMode" expires_after="2027-05-15">
  <owner>ankushkush@google.com</owner>
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the execution mode (Synchronous vs Asynchronous) of the
    Sync-to-Signin migration. Recorded upon profile creation/startup iff the
    migration is happening.
  </summary>
</histogram>

<histogram name="Sync.SyncToSigninMigrationOutcome" enum="BooleanSuccess"
    expires_after="2027-02-07">
  <owner>treib@chromium.org</owner>
  <owner>mastiz@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    The outcome of the overall Sync-to-Signin migration, recorded when the
    migration finishes. Note that the total count of this histogram can be
    compared to the number of samples in the &quot;Migrate&quot; bucket of
    &quot;Sync.SyncToSigninMigrationDecision&quot; to verify that all migrations
    that were started also finished.
  </summary>
</histogram>

<histogram name="Sync.SyncToSigninMigrationOutcome.BookmarksFileMove"
    enum="PlatformFileError" expires_after="2027-02-07">
  <owner>treib@chromium.org</owner>
  <owner>mastiz@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    The outcome of moving the bookmarks JSON file from the local to the account
    location, during the Sync-to-Signin migration. Recorded only if the overall
    migration ran and decided to migrate bookmarks (see
    Sync.SyncToSigninMigrationDecision.Migration.BOOKMARK).
  </summary>
</histogram>

<histogram name="Sync.SyncToSigninMigrationOutcome.EncryptedBookmarksFileMove"
    enum="PlatformFileError" expires_after="2027-02-24">
  <owner>treib@chromium.org</owner>
  <owner>mastiz@chromium.org</owner>
  <owner>plcoirier@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    The outcome of moving the encrypted bookmarks JSON file from the local to
    the account location, during the Sync-to-Signin migration. Recorded only if
    the overall migration ran and decided to migrate bookmarks (see
    Sync.SyncToSigninMigrationDecision.Migration.BOOKMARK) and the Bookmarks
    encryption feature is enabled.
  </summary>
</histogram>

<histogram name="Sync.SyncToSigninMigrationOutcome.ExtensionsDeduplicatedCount"
    units="extensions" expires_after="2027-01-28">
  <owner>ankushkush@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    The number of extensions that were deduplicated during the Sync-to-Signin
    migration. An extension is deduplicated iff the extension exists locally and
    on account. Recorded only if the overall migration ran and decided to
    migrate extensions (see
    Sync.SyncToSigninMigrationDecision.Migration.EXTENSION).
  </summary>
</histogram>

<histogram name="Sync.SyncToSigninMigrationOutcome.PasswordsFileMove"
    enum="PlatformFileError" expires_after="2027-02-07">
  <owner>treib@chromium.org</owner>
  <owner>mastiz@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    The outcome of moving the passwords DB file from the local to the account
    location, during the Sync-to-Signin migration. Recorded only if the overall
    migration ran and decided to migrate passwords (see
    Sync.SyncToSigninMigrationDecision.Migration.PASSWORD).
  </summary>
</histogram>

<histogram name="Sync.SyncToSigninMigrationOutcome.ThemeDeduplication"
    enum="SyncToSigninMigrationThemeOutcome" expires_after="2027-01-28">
  <owner>ankushkush@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the outcome of the theme deduplication during the Sync-to-Signin
    migration. Theme is deduplicated iff the same theme exists locally and on
    account. Recorded only if the overall migration ran and decided to migrate
    themes (see Sync.SyncToSigninMigrationDecision.Migration.THEME).
  </summary>
</histogram>

<histogram name="Sync.SyncToSigninMigrationTime" units="ms"
    expires_after="2027-02-07">
  <owner>treib@chromium.org</owner>
  <owner>mastiz@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    The time taken for the Sync-to-Signin migration. Recorded on profile
    creation/startup, only if the migration actually ran. Note that the total
    count of this histogram can be compared to the number of samples in the
    &quot;Migrate&quot; bucket of &quot;Sync.SyncToSigninMigrationDecision&quot;
    to verify that all migrations that were started also finished.
  </summary>
</histogram>

<histogram
    name="Sync.TabsFromOtherDevicesSidePanel.{Version}.DeviceCountOnOpen"
    units="devices" expires_after="2027-05-07">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the number of synced devices shown when the TabsFromOtherDevices
    side panel ({Version}) is opened. Recorded once when the side panel is
    opened and data is loaded.
  </summary>
  <token key="Version" variants="TabsFromOtherDevicesVersion"/>
</histogram>

<histogram name="Sync.TabsFromOtherDevicesSidePanel.{Version}.Events"
    enum="TabsFromOtherDevicesSidePanelEvent" expires_after="2027-05-07">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records events for the TabsFromOtherDevices side panel ({Version}). Recorded
    when the side panel is created, opened, closed, or a tab is opened from it.
  </summary>
  <token key="Version" variants="TabsFromOtherDevicesVersion"/>
</histogram>

<histogram
    name="Sync.TabsFromOtherDevicesSidePanel.{Version}.OpenedTabDeviceIndex"
    units="index" expires_after="2027-05-07">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the 0-based index of the device from which a tab is opened in the
    TabsFromOtherDevices side panel ({Version}). Recorded when a tab is opened.
  </summary>
  <token key="Version" variants="TabsFromOtherDevicesVersion"/>
</histogram>

<histogram
    name="Sync.TabsFromOtherDevicesSidePanel.{Version}.OpenedTabRecencyIndex"
    units="index" expires_after="2027-05-07">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the index (by recency, i.e., visual order in the side panel) of the
    tab that was opened within its session/device in the TabsFromOtherDevices
    side panel ({Version}). Recorded when a tab is opened.
  </summary>
  <token key="Version" variants="TabsFromOtherDevicesVersion"/>
</histogram>

<histogram
    name="Sync.TabsFromOtherDevicesSidePanel.{Version}.TabCountOnOpen.ActiveDevice"
    units="tabs" expires_after="2027-05-07">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the number of tabs on the initially active/selected device shown
    when the TabsFromOtherDevices side panel ({Version}) is opened. Recorded
    once when the side panel is opened and data is loaded.
  </summary>
  <token key="Version" variants="TabsFromOtherDevicesVersion"/>
</histogram>

<histogram
    name="Sync.TabsFromOtherDevicesSidePanel.{Version}.TabCountOnOpen.Total"
    units="tabs" expires_after="2027-05-07">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the total number of synced tabs across all devices shown when the
    TabsFromOtherDevices side panel ({Version}) is opened. Recorded once when
    the side panel is opened and data is loaded.
  </summary>
  <token key="Version" variants="TabsFromOtherDevicesVersion"/>
</histogram>

<histogram name="Sync.TabsFromOtherDevicesSidePanel.{Version}.TimeSpentOpen"
    units="ms" expires_after="2027-05-07">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the total time spent with the TabsFromOtherDevices side panel
    ({Version}) open. Recorded when the side panel is closed or hidden.
  </summary>
  <token key="Version" variants="TabsFromOtherDevicesVersion"/>
</histogram>

<histogram name="Sync.TabsFromOtherDevicesSidePanel.{Version}.TimeToFirstTab"
    units="ms" expires_after="2027-05-07">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the time between opening the TabsFromOtherDevices side panel
    ({Version}) and opening the first tab from it. Recorded when the first tab
    is opened.
  </summary>
  <token key="Version" variants="TabsFromOtherDevicesVersion"/>
</histogram>

<histogram name="Sync.ThrottledAllDataTypes" enum="Boolean"
    expires_after="2027-02-25">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Logged when the server instructs the client to throttle all its data types.
    See also Sync.ThrottledSomeDataTypes which records a different event.

    This histogram can help explain changes in
    Sync.PostedClientToServerMessageError2::THROTTLED.
  </summary>
</histogram>

<histogram name="Sync.ThrottledSomeDataTypes" enum="SyncDataTypes"
    expires_after="2027-02-25">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Logged when the sync server instructs this client to throttle a special list
    of data types. See also Sync.ThrottledAllDataTypes which records a different
    event.

    This histogram can help explain changes in
    Sync.PostedClientToServerMessageError2::THROTTLED.
  </summary>
</histogram>

<histogram name="Sync.TriggerRefreshSource" enum="TriggerRefreshSource"
    expires_after="2026-12-20">
  <owner>mtatarski@google.com</owner>
  <owner>chrome-sync-dev@chromium.org</owner>
  <summary>
    Recorded whenever SyncService::TriggerRefresh() is called, records the call
    site/reason why it's called. This method forces a download of latest updates
    from the server. This histogram helps to track existing and new use cases
    and have an alert in case there are too many usages of it leading to
    additional traffic to the server.
  </summary>
</histogram>

<histogram name="Sync.TrustedVaultAddKeysAttemptIsSuccessful" enum="Boolean"
    expires_after="2027-03-15">
  <owner>mmoskvitin@google.com</owner>
  <owner>mastiz@chromium.org</owner>
  <summary>
    Records whether attempt of adding trusted vault keys was successful (i.e.
    whether pending keys state resolved).
  </summary>
</histogram>

<histogram name="Sync.TrustedVaultAddKeysSuccessfully"
    enum="TrustedVaultUserActionTrigger" expires_after="2027-01-03">
  <owner>thomasth@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Emitted when a key retrieval flow, initiated by a user action, successfully
    results in new keys being added to the sync engine. The histogram is
    enumerated by the UI surface that triggered the retrieval attempt.
  </summary>
</histogram>

<histogram name="Sync.TrustedVaultErrorShownOnFirstTimeSync2" enum="Boolean"
    expires_after="2027-01-17">
  <owner>mmoskvitin@google.com</owner>
  <owner>mastiz@chromium.org</owner>
  <summary>
    Records whether user action was required to fetch trusted vault keys upon
    first sync (i.e. after signin). Recorded only if trusted vault passphrase
    type is used and at least one encrypted data type is enabled. Recorded at
    most once per browser/profile lifetime.

    Note: Before M124, this metric only included Sync-the-feature users. This
    should mostly make a difference on iOS.
  </summary>
</histogram>

<histogram
    name="Sync.TrustedVaultErrorShownOnStartup{TrustedVaultTimeSinceMigrationSuffix}"
    enum="Boolean" expires_after="2027-02-07">
  <owner>mmoskvitin@google.com</owner>
  <owner>mastiz@chromium.org</owner>
  <summary>
    Records whether user action was required to fetch trusted vault keys upon
    startup. Recorded only if trusted vault passphrase type is used and at least
    one encrypted data type is enabled. Recorded at most once per
    browser/profile lifetime.

    {TrustedVaultTimeSinceMigrationSuffix}

    Note: Before M124, this metric only included Sync-the-feature users. This
    should mostly make a difference on iOS.
  </summary>
  <token key="TrustedVaultTimeSinceMigrationSuffix"
      variants="TrustedVaultTimeSinceMigrationSuffix"/>
</histogram>

<histogram name="Sync.TrustedVaultFetchedKeysCount" units="keys"
    expires_after="2027-03-15">
  <owner>mmoskvitin@google.com</owner>
  <owner>mastiz@chromium.org</owner>
  <summary>
    Records number of trusted vault keys fetched upon fetching completion.
  </summary>
</histogram>

<histogram name="Sync.TrustedVaultJavascriptAddRecoveryMethodIsIncognito"
    enum="BooleanIncognito" expires_after="2027-04-13">
  <owner>mmoskvitin@google.com</owner>
  <owner>mastiz@chromium.org</owner>
  <summary>
    Records whether invocations to the Javascript API
    chrome.addTrustedSyncEncryptionRecoveryMethod(), when received via Mojo in
    the browser process, corresponds to an incognito profile.
  </summary>
</histogram>

<histogram name="Sync.TrustedVaultJavascriptAddRecoveryMethodSucceeded"
    enum="BooleanSuccess" expires_after="2027-04-13">
  <owner>mmoskvitin@google.com</owner>
  <owner>mastiz@chromium.org</owner>
  <summary>
    Records whether invocations to the Javascript API
    chrome.addTrustedSyncEncryptionRecoveryMethod() completed successfully.
    Instrumented on Android only.
  </summary>
</histogram>

<histogram name="Sync.TrustedVaultJavascriptAddRecoveryMethodUserKnown"
    enum="BooleanKnown" expires_after="2027-04-13">
  <owner>mmoskvitin@google.com</owner>
  <owner>mastiz@chromium.org</owner>
  <summary>
    Records whether invocations to the Javascript API
    chrome.addTrustedSyncEncryptionRecoveryMethod() specify a user ID that is
    known by IdentityManager. Instrumented on Android only.
  </summary>
</histogram>

<histogram name="Sync.TrustedVaultJavascriptAddRecoveryMethodValidArgs"
    enum="BooleanValid" expires_after="2027-04-13">
  <owner>mmoskvitin@google.com</owner>
  <owner>mastiz@chromium.org</owner>
  <summary>
    Records invocations to the Javascript API
    chrome.addTrustedSyncEncryptionRecoveryMethod() and whether the passed
    arguments could be successfully parsed (which doesn't imply the function
    actually succeeded).
  </summary>
</histogram>

<histogram name="Sync.TrustedVaultJavascriptSetEncryptionKeysIsIncognito"
    enum="BooleanIncognito" expires_after="2026-12-27">
  <owner>mmoskvitin@google.com</owner>
  <owner>mastiz@chromium.org</owner>
  <summary>
    Records whether invocations to the Javascript API
    chrome.setSyncEncryptionKeys(), when received via Mojo in the browser
    process, corresponds to an incognito profile.
  </summary>
</histogram>

<histogram name="Sync.TrustedVaultJavascriptSetEncryptionKeysValidArgs"
    enum="BooleanValid" expires_after="2027-04-13">
  <owner>mmoskvitin@google.com</owner>
  <owner>mastiz@chromium.org</owner>
  <summary>
    Records invocations to the Javascript API chrome.setSyncEncryptionKeys() and
    whether the passed arguments could be successfully parsed (which doesn't
    imply the function actually succeeded).
  </summary>
</histogram>

<histogram name="Sync.TrustedVaultKeyRetrievalTrigger"
    enum="TrustedVaultUserActionTrigger" expires_after="2027-02-07">
  <owner>mmoskvitin@google.com</owner>
  <owner>mastiz@chromium.org</owner>
  <summary>
    Recorded when user clicks/taps on trusted vault error button for the
    keys-missing error state. Buckets represents the UI elements which contain
    trusted vault error button.
  </summary>
</histogram>

<histogram name="Sync.TrustedVaultRecoverabilityDegradedFixTrigger"
    enum="TrustedVaultUserActionTrigger" expires_after="2027-07-15">
  <owner>mmoskvitin@google.com</owner>
  <owner>mastiz@chromium.org</owner>
  <summary>
    Recorded when user clicks/taps on trusted vault error button for the
    recoverability-degraded error state. Buckets represents the UI elements
    which contain trusted vault error button.
  </summary>
</histogram>

<histogram
    name="Sync.TrustedVaultRecoverabilityDegradedOnStartup{TrustedVaultTimeSinceMigrationSuffix}"
    enum="Boolean" expires_after="2027-02-07">
  <owner>mmoskvitin@google.com</owner>
  <owner>mastiz@chromium.org</owner>
  <summary>
    Records whether user action was required to improve the recoverability of
    trusted vault keys. Recorded only if trusted vault passphrase type is used,
    when keys are locally available and at most once per browser/profile
    lifetime.

    {TrustedVaultTimeSinceMigrationSuffix}
  </summary>
  <token key="TrustedVaultTimeSinceMigrationSuffix"
      variants="TrustedVaultTimeSinceMigrationSuffix"/>
</histogram>

<histogram name="Sync.UnsyncedDataOnAccountSwitching" enum="SyncDataTypes"
    expires_after="2027-01-12">
  <owner>ankushkush@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the unsynced data types, when the user switches from one account to
    another within the same profile, but some data has not been synced yet. Only
    PASSWORDS, BOOKMARKS, READING_LIST and CONTACT_INFO are considered. This
    metric is only recorded when kSeparateProfilesForManagedAccounts feature is
    enabled.

    Note: iOS only.
  </summary>
</histogram>

<histogram name="Sync.UnsyncedDataOnProfileSwitching" enum="SyncDataTypes"
    expires_after="2027-01-12">
  <owner>ankushkush@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the unsynced data types, when the user switches from one account to
    another with two different profiles, but some data has not been synced yet.
    Only PASSWORDS, BOOKMARKS, READING_LIST and CONTACT_INFO are considered.

    Note: iOS only.
  </summary>
</histogram>

<histogram name="Sync.UnsyncedDataOnSignout2" enum="SyncDataTypes"
    expires_after="2027-01-12">
  <owner>ankushkush@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the unsynced data types, when the user clicks on sign out but some
    data has not been synced yet. Only PASSWORDS, BOOKMARKS, READING_LIST and
    CONTACT_INFO are considered.

    Note: iOS only.
  </summary>
</histogram>

<histogram name="Sync.URLFetchAccessToken" enum="BooleanValid"
    expires_after="2027-02-27">
  <owner>rushans@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records whether the access token is valid before a Sync URL fetch is
    attempted (no URL fetch is made if the access token is invalid). When
    kSyncValidateAccessToken is enabled, the token expiry is also verified.
  </summary>
</histogram>

<histogram name="Sync.URLFetchResponse"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2027-08-23">
  <owner>mastiz@chromium.org</owner>
  <owner>treib@chromium.org</owner>
  <summary>
    Counts of responses (both http code and net error code) for Sync URL
    fetches. Note that requests that timed out are not covered by this
    histogram; see Sync.URLFetchTimedOut for that.
  </summary>
</histogram>

<histogram name="Sync.URLFetchTimedOut" enum="BooleanTimedOut"
    expires_after="2027-08-23">
  <owner>mastiz@chromium.org</owner>
  <owner>treib@chromium.org</owner>
  <owner>rushans@google.com</owner>
  <summary>
    Whether a URL fetch timed out or not. Timing out implies the fetch was
    stalled for an unknown reason. Note that this records true on timeout and
    false on success, but doesn't record anything if the fetch failed for any
    other reason.
  </summary>
</histogram>

<histogram name="Sync.UserActionableError" enum="UserActionableError"
    expires_after="2027-02-07">
  <owner>mmrashad@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Recorded once for each new UserActionableError state the user encounter per
    browser startup. Records which error state that prevent Sync from working
    well or working at all.
  </summary>
</histogram>

<histogram name="Theme.BatchUpload.HasLocalTheme" enum="Boolean"
    expires_after="2027-02-24">
  <owner>ankushkush@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Recorded whenever the batch upload dialog queries the local theme data. This
    is true iff there exists a local theme, and false otherwise.
  </summary>
</histogram>

<histogram name="Theme.BatchUpload.LocalThemeMigrationTriggered" enum="Boolean"
    expires_after="2027-02-24">
  <owner>ankushkush@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Recorded whenever the batch upload dialog triggers the local theme
    migration. Only the true value is recorded.
  </summary>
</histogram>

<histogram name="Theme.RestoredLocalThemeUponSignout" enum="Boolean"
    expires_after="2027-04-13">
  <owner>ankushkush@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Recorded whenever themes sync is being stopped, for example, upon signout.
    This is true iff a saved local theme existed. A false value would imply that
    no local theme data existed which can happen if a batch upload was triggered
    previously.
  </summary>
</histogram>

<histogram name="Theme.ThemePrefMigration.AlreadyMigrated" enum="Boolean"
    expires_after="2026-11-15">
  <owner>ankushkush@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records whether the theme prefs have already been migrated from the syncing
    version to the non-syncing replacement. Recorded once per browser startup.
  </summary>
</histogram>

<histogram name="Theme.ThemePrefMigration.IncomingSyncingPrefApplied"
    enum="ThemePrefInMigration" expires_after="2026-11-15">
  <owner>ankushkush@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the incoming syncing theme pref. Recorded once upon browser startup
    when remote theme prefs are received from the server, iff they have been
    never read before. The count of the metric should ultimately reach zero.
  </summary>
</histogram>

<histogram name="Theme.ThemePrefMigration.MigratedPref"
    enum="ThemePrefInMigration" expires_after="2026-11-15">
  <owner>ankushkush@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the theme pref migrated from the syncing version to the non-syncing
    replacement. Recorded once per browser startup during pref migration iff the
    theme pref has not already been migrated.
  </summary>
</histogram>

</histograms>

</histogram-configuration>
