chromium/tools/metrics/histograms/metadata/sync/histograms.xml

<!--
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
[email protected].
-->

<histogram-configuration>

<histograms>

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

<variants name="SyncDataType">
  <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_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=".COOKIE" summary="COOKIE"/>
  <variant name=".DEVICE_INFO" summary="DEVICE_INFO"/>
  <variant name=".DICTIONARY" summary="DICTIONARY"/>
  <variant name=".EXTENSION" summary="EXTENSION"/>
  <variant name=".EXTENSION_SETTING" summary="EXTENSION_SETTING"/>
  <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=".MANAGED_USER_SETTING" summary="MANAGED_USER_SETTING"/>
  <variant name=".NIGORI" summary="NIGORI"/>
  <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=".PLUS_ADDRESS" summary="PLUS_ADDRESS"/>
  <variant name=".PLUS_ADDRESS_SETTING" summary="PLUS_ADDRESS_SETTING"/>
  <variant name=".POWER_BOOKMARK" summary="POWER_BOOKMARK"/>
  <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_TAB_GROUP_DATA" summary="SHARED_TAB_GROUP_DATA"/>
  <variant name=".SHARING_MESSAGE" summary="SHARING_MESSAGE"/>
  <variant name=".THEME" summary="THEME"/>
  <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=".PASSWORD" summary="PASSWORD"/>
  <variant name=".READING_LIST" summary="READING_LIST"/>
</variants>

<variants name="SyncErrorReason">
  <variant name=".AuthError" summary="Auth error."/>
  <variant name=".ClientOutOfDate" summary="Client out of date."/>
  <variant name=".OtherErrors" summary="Other/unrecoverable sync errors."/>
  <variant name=".PassphraseRequired" summary="Passphrase required."/>
  <variant name=".SyncSetupIncomplete" summary="Sync setup incomplete."/>
  <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="SyncToSigninMigrationMode">
  <variant name=".DryRun" summary="run the migration in dry-run mode"/>
  <variant name=".Migration" summary="run the migration"/>
</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.AndroidExplicitPassphrasePlatformApiResponse"
    enum="AndroidExplicitPassphrasePlatformApiResponse"
    expires_after="2025-01-25">
  <owner>[email protected]</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    The response returned by the API internally called by
    ExplicitPassphrasePlatformClient (see class docs). Recorded only on Android.
  </summary>
</histogram>

<histogram name="Sync.AssociateWindowsTime.On{Type}" units="ms"
    expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</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">
    <variant name="SessionRestore"
        summary="Triggered during session restore. This should only happen on
                 start up. Slower times here may be acceptable."/>
    <variant name="TabModification"
        summary="Triggered on tab modification, such as a when a new
                 WebContents is shown. This should almost always be very
                 fast."/>
  </token>
</histogram>

<histogram name="Sync.BackedOffDataType" enum="SyncDataTypes"
    expires_after="2025-02-16">
  <owner>[email protected]</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.Requests2" enum="SyncDataTypes"
    expires_after="2024-11-20">
  <owner>[email protected]</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Logged when batch upload of local data for a data type is requested.

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

    This is not logged when kSyncEnableModelTypeLocalDataBatchUploaders is
    enabled and will eventually be removed in favor of
    Sync.BatchUpload.Requests3.
  </summary>
</histogram>

<histogram name="Sync.BatchUpload.Requests3" enum="SyncDataTypes"
    expires_after="2025-02-10">
  <owner>[email protected]</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), if kSyncEnableModelTypeLocalDataBatchUploaders is enabled.

    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.BookmarkEntityReuploadNeeded.On{UpdateType}"
    enum="Boolean" expires_after="2025-02-20">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2024-12-24">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-09-19">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-09-19">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-09-19">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</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.BookmarksGUIDDuplicates" enum="BookmarksGUIDDuplicates"
    expires_after="2024-12-08">
  <owner>[email protected]</owner>
  <owner>[email protected]</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.BookmarksModelMetadataCorruptionReason"
    enum="SyncBookmarkModelMetadataCorruptionReason" expires_after="2025-02-23">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-09-19">
  <owner>[email protected]</owner>
  <owner>[email protected]</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.ClearMetadataWhileStopped{ClearTime}"
    enum="SyncDataTypes" expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</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.CommitResponseForUnknownEntity" enum="SyncDataTypes"
    expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Emitted when a Commit entity response is received for an unknown entity
    (i.e. for a client tag hash that doesn't correspond to a tracked entity).
  </summary>
</histogram>

<histogram name="Sync.CommitResponse{SyncDataType}" enum="SyncerErrorValues"
    expires_after="2025-01-19">
  <owner>[email protected]</owner>
  <owner>[email protected]</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.ConfigureDataTypeManagerOption"
    enum="SyncFeatureOrTransport" expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <owner>[email protected]</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.ConfigureDataTypes" enum="SyncDataTypes"
    expires_after="2025-02-09">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Breakdown of sync data types being configured at first time signin, restart,
    or user-initiated reconfiguration. This is different from Sync.CustomTypes
    in that this captures all active devices, not just those that are choosing a
    custom sync configuration.

    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="2025-02-16">
  <owner>[email protected]</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.CrossUserSharingDecryptionResult"
    enum="CrossUserSharingDecryptionResult" expires_after="2024-11-12">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the result of decryption of incoming password sharing invitations.
    Recorded for each incoming invitation received from the server.
  </summary>
</histogram>

<histogram name="Sync.CrossUserSharingInvalidKeyVersion.EmptyKeyPair"
    enum="Boolean" expires_after="2025-01-26">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether invalid public key version is caused by empty keys in
    cryptographer. Recorded on browser startup or profile load for invalid
    public key version only.
  </summary>
</histogram>

<histogram name="Sync.CrossUserSharingInvalidKeyVersion.ExpectedVersion"
    enum="Boolean" expires_after="2025-01-26">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether cross user sharing key pair with invalid public key version
    has unexpected version number. Recorded on browser startup or profile load
    for invalid public key version only.
  </summary>
</histogram>

<histogram name="Sync.CrossUserSharingKeyPairState"
    enum="CrossUserSharingKeyPairState" expires_after="2025-01-12">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the state of cross user sharing key pair on browser startup (or
    profile load) when Nigori local data is valid.
  </summary>
</histogram>

<histogram name="Sync.CrossUserSharingKeyPairState.DecryptPendingKeys"
    enum="CrossUserSharingKeyPairStateOnDecryptPendingKeys"
    expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the state of the key pair whenever pendings keys are successfully
    decrypted (e.g. on remote update, or custom passphrase or trusted vault
    become available).
  </summary>
</histogram>

<histogram name="Sync.CrossUserSharingLoadedFromDisk" enum="BooleanSuccess"
    expires_after="2024-12-08">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether the stored CrossUserSharingPrivateKey is successfully loaded
    from the disk on browser startup. Recorded for each of the stored key pair.
  </summary>
</histogram>

<histogram name="Sync.CrossUserSharingPublicPrivateKeyInitSuccess"
    enum="Boolean" expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Histogram that keeps track of the bootstrap of Public-private key
    initialization outcome. Recorded upon attempt to commit NigoriSpecifics with
    CrossUserSharingPrivateKey, that happens upon browser restart.
  </summary>
</histogram>

<histogram
    name="Sync.Crypto.CustomPassphraseKeyDerivationMethodOnSuccessfulDecryption"
    enum="SyncCustomPassphraseKeyDerivationMethodState"
    expires_after="2025-01-12">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-03-15">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2024-10-28">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-01-05">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Breakdown of sync users whose cryptographer has pending keys.
  </summary>
</histogram>

<histogram name="Sync.CryptographerReady" enum="SyncCryptographerReadyState"
    expires_after="2025-04-06">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-03-22">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-01-05">
  <owner>[email protected]</owner>
  <owner>[email protected]</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.DataTypeBlockedDueToUndecryptableUpdate"
    enum="SyncDataTypes" expires_after="2024-12-08">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Recorded on every GetUpdatesResponse if the data type is blocked because due
    to the existence of undecryptable updates sent by the server. This is *not*
    recorded for the cases where sync encryption is in a valid pending state,
    e.g. user hasn't entered their passphrase yet.
  </summary>
</histogram>

<histogram name="Sync.DataTypeClearedOnce" enum="SyncDataTypes"
    expires_after="2025-04-04">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Recorded when the model (including both data and metadata) for a given data
    type was cleared due to
    `WipeModelUponSyncDisabledBehavior::kOnceIfTrackingMetadata`. In practice,
    this happens only on iOS, when Chrome was just restored from an OS-level
    backup. As a denominator, look at e.g. `Sync.InitialState2`.
  </summary>
</histogram>

<histogram name="Sync.DataTypeCommitMessageHasDepletedQuota"
    enum="SyncDataTypes" expires_after="2025-08-04">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2024-11-04">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-01-26">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2024-12-29">
  <owner>[email protected]</owner>
  <owner>[email protected]</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.
  </summary>
  <token key="SyncDataType" variants="SyncDataType"/>
</histogram>

<histogram name="Sync.DataTypeEntityChange{SyncDataType}"
    enum="SyncEntityChange" expires_after="2024-12-29">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Recorded once for every sync entity change (whenever it is 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.
  </summary>
  <token key="SyncDataType" variants="SyncDataType"/>
</histogram>

<histogram name="Sync.DataTypeEntityConflictResolution{SyncDataType}"
    enum="SyncConflictResolution" expires_after="2025-06-11">
  <owner>[email protected]</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.DataTypeEntityMetadataWithoutInitialSync"
    enum="SyncDataTypes" expires_after="2024-12-08">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whenever ClientTagBasedDataTypeProcessor finds entity metadata
    during ModelReadyToSync() but initial_sync_done is false.
  </summary>
</histogram>

<histogram name="Sync.DataTypeErrorSite{SyncDataType}"
    enum="SyncDataTypeErrorSite" expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-01-26">
  <owner>[email protected]</owner>
  <owner>[email protected]</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.
  </summary>
  <token key="SyncDataType" variants="SyncDataType"/>
</histogram>

<histogram name="Sync.DataTypeNumUnsyncedEntitiesOnModelReady{SyncDataType}"
    units="entities" expires_after="2025-01-22">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Counts the number of unsynced entities for each data type, including
    tombstones. Recorded once model is ready to sync, i.e. typically soon after
    browser startup. Recorded only if initial sync is done.
  </summary>
  <token key="SyncDataType" variants="SyncDataType"/>
</histogram>

<histogram name="Sync.DataTypeOrphanMetadata.{Operation}" enum="SyncDataTypes"
    expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-01-26">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-01-26">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2024-12-08">
  <owner>[email protected]</owner>
  <owner>[email protected]</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.
  </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="2025-08-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</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.DataTypeUndecryptablePendingUpdatesDropped{SyncDataType}"
    units="SyncEntity" expires_after="2024-12-15">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the number of entities dropped when the data type decided that a
    certain encryption key was lost and dropped all pending updates encrypted
    with it. Future updates encrypted with such key will also be ignored by the
    data type, but those are *not* counted in this metric.
  </summary>
  <token key="SyncDataType" variants="SyncDataType">
    <variant name=""/>
  </token>
</histogram>

<histogram name="Sync.DataTypeUpdateDrop.{Reason}" enum="SyncDataTypes"
    expires_after="2024-12-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</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>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-01-05">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</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.EntityEncryptionSucceeded{SyncDataType}"
    enum="BooleanSuccess" expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Recorded for each committed sync entity ({SyncDataType}) when encryption is
    enabled (e.g. custom passphrase, always encrypted data type). The value is
    whether the encryption succeeded.
  </summary>
  <token key="SyncDataType" variants="SyncDataType">
    <variant name="" summary="Any type"/>
  </token>
</histogram>

<histogram name="Sync.EntitySizeOnCommit.Entity.SpecificsOnly{SyncDataType}"
    units="bytes" expires_after="2025-04-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-04-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <component>Services&gt;Sync</component>
  <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="2025-04-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <component>Services&gt;Sync</component>
  <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.FCMInstanceIdTokenRetrievalStatus"
    enum="InstanceIDResult" expires_after="2025-01-12">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records status of each attempt to retrieve the instance id token. Replaces
    FCMInvalidations.InitialTokenRetrievalStatus for Sync standalone
    invalidations.
  </summary>
</histogram>

<histogram name="Sync.FcmRegistrationTokenFetchTime" units="ms"
    expires_after="2025-01-12">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records time required to obtain an FCM registration token for Sync
    invalidations. Recorded on successful token fetch excluding token validation
    requests (Sync.FCMInstanceIdTokenRetrievalStatus can be used to compare with
    token fetch failure count).
  </summary>
</histogram>

<histogram name="Sync.FeatureStatusForSyncToSigninMigration"
    enum="SyncFeatureStatusForSyncToSigninMigration" expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <owner>[email protected]</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.*`.
  </summary>
</histogram>

<histogram name="Sync.History.DatabaseError" enum="SyncHistoryDatabaseError"
    expires_after="2025-03-17">
  <owner>[email protected]</owner>
  <owner>[email protected]</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.History.IncomingSpecificsError"
    enum="SyncHistorySpecificsError" expires_after="2024-12-24">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Recorded when HistorySyncBridge encounters an incoming entity that is
    invalid, i.e. that fails some validity check. Counts in this histogram
    should be compared to counts in the &quot;Remote&quot; buckets of
    Sync.DataTypeEntityChange.History.
  </summary>
</histogram>

<histogram name="Sync.IdentityErrorCard{SyncErrorReason}"
    enum="SyncErrorUiAction" expires_after="2025-02-20">
  <owner>[email protected]</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="2025-02-20">
  <owner>[email protected]</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="2025-01-05">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</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.InvalidationPerDataType" enum="SyncDataTypes"
    expires_after="never">
<!-- expires-never: For monitoring FCM based invalidations. -->

  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Histogram tracks the number of invalidations received per sync data type.
  </summary>
</histogram>

<histogram name="Sync.InvalidationPerModelType" enum="SyncDataTypes"
    expires_after="M135">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Histogram tracks the number of invalidations received per sync data type.
  </summary>
</histogram>

<histogram name="Sync.InvalidationsInitializationTime" units="ms"
    expires_after="2024-11-06">
  <owner>[email protected]</owner>
  <owner>[email protected]</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.InvalidBookmarkSpecifics"
    enum="InvalidBookmarkSpecificsError" expires_after="2025-02-16">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-01-05">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>The reason for a failure decrypting the keystore Nigori.</summary>
</histogram>

<histogram name="Sync.Local.Enabled2" enum="BooleanEnabled"
    expires_after="2025-05-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-05-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-05-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-05-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records local changes happening during an ongoing remote incremental update.
  </summary>
</histogram>

<histogram name="Sync.ModelLoadManager.LoadModelsElapsedTime" units="ms"
    expires_after="2024-11-03">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2024-11-03">
  <owner>[email protected]</owner>
  <owner>[email protected]</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.ModelTypeClearedOnce" enum="SyncDataTypes"
    expires_after="M135">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Recorded when the model (including both data and metadata) for a given data
    type was cleared due to
    `WipeModelUponSyncDisabledBehavior::kOnceIfTrackingMetadata`. In practice,
    this happens only on iOS, when Chrome was just restored from an OS-level
    backup. As a denominator, look at e.g. `Sync.InitialState2`.
  </summary>
</histogram>

<histogram name="Sync.ModelTypeCommitMessageHasDepletedQuota"
    enum="SyncDataTypes" expires_after="M135">
  <owner>[email protected]</owner>
  <owner>[email protected]</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.ModelTypeCommitWithDepletedQuota" enum="SyncDataTypes"
    expires_after="M135">
  <owner>[email protected]</owner>
  <owner>[email protected]</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.ModelTypeCount4{SyncDataType}" units="entries"
    expires_after="M135">
  <owner>[email protected]</owner>
  <owner>[email protected]</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.
  </summary>
  <token key="SyncDataType" variants="SyncDataType"/>
</histogram>

<histogram name="Sync.ModelTypeEntityChange3{SyncDataType}"
    enum="SyncEntityChange" expires_after="M135">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Recorded once for every sync entity change (whenever it is 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.
  </summary>
  <token key="SyncDataType" variants="SyncDataType"/>
</histogram>

<histogram name="Sync.ModelTypeMemoryKB{SyncDataType}" units="KB"
    expires_after="M135">
  <owner>[email protected]</owner>
  <owner>[email protected]</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.
  </summary>
  <token key="SyncDataType" variants="SyncDataType"/>
</histogram>

<histogram name="Sync.ModelTypeStoreBackendError.{Operation}"
    enum="LevelDBStatus" expires_after="M135">
  <owner>[email protected]</owner>
  <owner>[email protected]</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.
  </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.ModelTypeStoreBackendInitializationSuccess"
    enum="BooleanSuccess" expires_after="M135">
  <owner>[email protected]</owner>
  <owner>[email protected]</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.NonReflectionUpdateFreshnessPossiblySkewed2{SyncDataType}"
    units="ms" expires_after="2024-12-29">
  <owner>[email protected]</owner>
  <owner>[email protected]</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.OutgoingPassordSharingInvitation.CommitError"
    enum="OutgoingPasswordSharingInvitationCommitError"
    expires_after="2025-01-05">
  <owner>[email protected]</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="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>The active sync passphrase type at sync startup.</summary>
</histogram>

<histogram name="Sync.PassphraseType2" enum="PassphraseTypeForMetrics"
    expires_after="2025-06-17">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    TODO(crbug.com/347711860): Remove this on 06/2025, once Sync.PassphraseType4
    has been available for a year. That one relies on a pref that caches the
    passphrase type and thus can record the correct value before sync engine
    initialization.

    Sync passphrase type collected at each metrics upload. Also used for the
    &quot;Sync passphrase type&quot; filter in the dashboard.
  </summary>
</histogram>

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

  <owner>[email protected]</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. Recorded only after profile
    initialization.
  </summary>
</histogram>

<histogram name="Sync.PassphraseTypeUponNotMyBirthdayOrEncryptionObsolete"
    enum="SyncPassphraseType" expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-03-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-08-06">
  <owner>[email protected]</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="2025-01-26">
  <owner>[email protected]</owner>
  <owner>[email protected]</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.PlaceholderTabResyncResult"
    enum="SyncPlaceholderTabResyncResult" expires_after="2025-01-19">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the result of whether the placeholder tab had its local session
    found, had its data resynced successfully, or remained unsynced. Recorded
    once for each placeholder tab during session restore.
  </summary>
</histogram>

<histogram name="Sync.PostedClientToServerMessage"
    enum="SyncClientToServerMessageContents" expires_after="2025-01-19">
  <owner>[email protected]</owner>
  <summary>
    Number of network requests issued by sync to the sync server, grouped by
    content type.
  </summary>
</histogram>

<histogram name="Sync.PostedClientToServerMessageError2" enum="SyncErrorType"
    expires_after="2025-01-19">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-01-05">
  <owner>[email protected]</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.PostedDataTypeCommitRequest" enum="SyncDataTypes"
    expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <owner>[email protected]</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.
  </summary>
</histogram>

<histogram name="Sync.PostedDataTypeGetUpdatesRequest" enum="SyncDataTypes"
    expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <owner>[email protected]</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.
  </summary>
</histogram>

<histogram name="Sync.PostedGetUpdatesOrigin" enum="SyncGetUpdatesOrigin"
    expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <owner>[email protected]</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.ProblematicServerSideBookmarks"
    enum="RemoteBookmarkUpdateError" expires_after="2025-01-26">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-01-26">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-01-12">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-01-05">
  <owner>[email protected]</owner>
  <owner>[email protected]</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.SelectedTypesInTransportMode" enum="SyncDataTypes"
    expires_after="2025-01-26">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-02-16">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Counts the number of commit results while committing sharing message.
  </summary>
</histogram>

<histogram name="Sync.SignoutWithUnsyncedData" enum="Boolean"
    expires_after="2024-10-26">
  <owner>[email protected]</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.AccountInfoFullyLoaded2" enum="BooleanLoaded"
    expires_after="2025-05-15">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether refresh tokens were already fully loaded during SyncService
    initialization (i.e. during browser/profile startup).
  </summary>
</histogram>

<histogram name="Sync.Startup.SignedInWithoutAccountInfo2"
    enum="BooleanIsSignedIn" expires_after="2025-05-15">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether there was a signed-in user during SyncService initialization
    (i.e. during browser/profile startup), specifically in the case where the
    account info was NOT fully loaded yet (see
    Sync.Startup.AccountInfoFullyLoaded2).
  </summary>
</histogram>

<histogram name="Sync.Startup.TimeDeferred2" units="ms"
    expires_after="2025-05-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</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.SyncablePrefValueChanged" enum="SyncablePref"
    expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    This is recorded everytime a syncable pref is changed locally. This does not
    include changes sent during the initial sync/merge.
  </summary>
</histogram>

<histogram name="Sync.SyncableServiceStartTime{SyncDataType}" units="ms"
    expires_after="2025-07-23">
  <owner>[email protected]</owner>
  <owner>[email protected]</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.SyncedHistoryFaviconAvailability.{RequestOrigin}"
    enum="FaviconAvailabilityStatus" expires_after="2025-01-26">
  <owner>[email protected]</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the availability status (local, sync or non-available) for favicons
    associated with synced history entries. Recorded when one of the following
    is displayed: entries in chrome://history that are known to be present in
    remote history data; all entries in chrome://history/syncedTabs; tabs from
    other devices in the 3 dots history menu (desktop); tabs from other devices
    in the android Recent Tabs UI.
  </summary>
  <token key="RequestOrigin">
    <variant name="HISTORY" summary="Request made by chrome://history."/>
    <variant name="RECENTLY_CLOSED_TABS"
        summary="Request made by the recently closed tabs menu."/>
    <variant name="SYNCED_TABS"
        summary="Request made by chrome://history/syncedTabs."/>
  </token>
</histogram>

<histogram name="Sync.SyncErrorCard{SyncErrorReason}" enum="SyncErrorUiAction"
    expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Android only.

    Sync error card is shown to syncing users, whenever the user navigates to
    the manage sync settings page and there exists a {SyncErrorReason} sync
    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.SyncErrorInfobarDisplayed" enum="SyncErrorInfobarTypes"
    expires_after="2025-01-26">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Enumeration of error conditions that displays an infobar to the user. iOS
    only.
  </summary>
</histogram>

<histogram name="Sync.SyncEverything2" enum="Boolean"
    expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2024-11-19">
  <owner>[email protected]</owner>
  <owner>[email protected]</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.SyncStoppedReported" enum="Boolean"
    expires_after="2024-12-15">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Counts the number of Sync stopped events broken down by whether it was
    reported to the server. The event may be reported only if an access token
    and a birthday are not empty. Recorded when sync engine is stopped or
    disabled (it doesn't include regular browser shutdown).
  </summary>
</histogram>

<histogram name="Sync.SyncStoppedURLFetchResponse"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2024-12-15">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2024-12-15">
  <owner>[email protected]</owner>
  <owner>[email protected]</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.ReadingListMigrationStep"
    enum="SyncToSigninMigrationReadingListStep" expires_after="2025-01-31">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</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.SyncToSigninMigrationDecision"
    enum="SyncToSigninMigrationDecisionOverall" expires_after="2025-01-31">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-01-31">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</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.SyncToSigninMigrationOutcome" enum="BooleanSuccess"
    expires_after="2025-01-31">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-01-31">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</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.PasswordsFileMove"
    enum="PlatformFileError" expires_after="2025-01-31">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</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.SyncToSigninMigrationTime" units="ms"
    expires_after="2025-01-31">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</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.ThrottledAllDataTypes" enum="Boolean"
    expires_after="2025-02-12">
  <owner>[email protected]</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="2025-04-28">
  <owner>[email protected]</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.TrustedVaultAccessTokenFetchSuccess" enum="Boolean"
    expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether access token fetching attempt was successful upon every
    request to Security Domains service.
  </summary>
</histogram>

<histogram name="Sync.TrustedVaultAddKeysAttemptIsSuccessful" enum="Boolean"
    expires_after="2025-06-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether attempt of adding trusted vault keys was successful (i.e.
    whether pending keys state resolved).
  </summary>
</histogram>

<histogram
    name="Sync.TrustedVaultAutoUpgrade.Validation.OnProfileLoadSampled.{Consistency}.Binary_{Variant}"
    enum="Boolean" expires_after="2024-12-08">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records a {Consistency} that takes a true value with certain probability.
    The probability is dependent on whether or not the profile is signed into an
    account that is marked for a synthetic field trial, as encoded in the metric
    name. It is recoded upon profile load, only for 10% of users (deterministic
    sampling based on gaia ID) and, among those, only if the profile is actually
    associated to a synthetic field trial group (which excludes the default
    group).
  </summary>
  <token key="Consistency">
    <variant name="WithAccountConsistency"
        summary="random-like boolean computed deterministically for an
                 account ID"/>
    <variant name="WithoutAccountConsistency" summary="random boolean"/>
  </token>
  <token key="Variant">
    <variant name="C01_V01"/>
    <variant name="C01_V04"/>
    <variant name="C01_V06"/>
    <variant name="C01_V09"/>
    <variant name="C20_V20"/>
    <variant name="C20_V23"/>
    <variant name="C20_V25"/>
    <variant name="C20_V28"/>
    <variant name="C50_V50"/>
    <variant name="C50_V53"/>
    <variant name="C50_V55"/>
    <variant name="C50_V58"/>
  </token>
</histogram>

<histogram name="Sync.TrustedVaultDegradedRecoverabilityValue2"
    enum="TrustedVaultDegradedRecoverabilityValue" expires_after="2025-02-16">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the known degraded recoverability value when the degraded
    recoverability handler is started. Note that the value reflects state
    restored from the file and recorded before sending new request to the
    server.
  </summary>
</histogram>

<histogram name="Sync.TrustedVaultDeviceRegistered" enum="Boolean"
    expires_after="2024-11-03">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Simplified version of Sync.TrustedVaultDeviceRegistrationState. Records
    whether the local device is registered (and ignores whether re-registration
    was completed/pending/in-flight) upon startup (if signed in) or upon first
    signin.
  </summary>
</histogram>

<histogram name="Sync.TrustedVaultDeviceRegistrationOutcome"
    enum="TrustedVaultDeviceRegistrationOutcome" expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the outcome of device registration attempt upon request completion
    or failure.
  </summary>
</histogram>

<histogram name="Sync.TrustedVaultDeviceRegistrationState"
    enum="TrustedVaultDeviceRegistrationState" expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether the local device is registered on the server upon startup
    (if signed in) or upon first signin, and if not registered, provides
    insights into why.
  </summary>
</histogram>

<histogram name="Sync.TrustedVaultDownloadKeysStatus"
    enum="TrustedVaultDownloadKeysStatus" expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the result of an attempt to download trusted vault keys from the
    server (includes all registration versions).
  </summary>
</histogram>

<histogram name="Sync.TrustedVaultDownloadKeysStatusV1"
    enum="TrustedVaultDownloadKeysStatus" expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the result of an attempt to download trusted vault keys from the
    server, specifically if the local device is known to have a V1 registration.
  </summary>
</histogram>

<histogram name="Sync.TrustedVaultErrorShownOnFirstTimeSync2" enum="Boolean"
    expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-06-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records number of trusted vault keys fetched upon fetching completion.
  </summary>
</histogram>

<histogram name="Sync.TrustedVaultFetchKeysAttempt"
    enum="TrustedVaultFetchKeysAttempt" expires_after="2025-02-08">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>Recorded when fetching trusted vault keys is attempted.</summary>
</histogram>

<histogram name="Sync.TrustedVaultFileReadStatus"
    enum="TrustedVaultFileReadStatus" expires_after="2024-11-03">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>Recorded when reading local trusted vault file.</summary>
</histogram>

<histogram name="Sync.TrustedVaultFileWriteSuccess" enum="Boolean"
    expires_after="2024-11-03">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether writing local trusted vault file upon each write.
  </summary>
</histogram>

<histogram name="Sync.TrustedVaultHintDegradedRecoverabilityChangedReason2"
    enum="TrustedVaultHintDegradedRecoverabilityChangedReason"
    expires_after="2024-11-17">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Recorded when an immediate degraded recoverability request is going to be
    sent to the server. Records which heuristic triggered immediate request of
    the current degraded recoverability state from the server.
  </summary>
</histogram>

<histogram name="Sync.TrustedVaultJavascriptAddRecoveryMethodIsIncognito"
    enum="BooleanIncognito" expires_after="2024-10-13">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2024-11-03">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2024-11-03">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2024-11-03">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2024-10-28">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2024-11-03">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-01-05">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-01-15">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</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.TrustedVaultRecoverabilityStatusOnRequestCompletion"
    enum="TrustedVaultRecoverabilityStatus" expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the status of the degraded recoverability upon the request
    completion. Note that this is the status on the server side, which could be
    error if the request was failed.
  </summary>
</histogram>

<histogram name="Sync.UnsyncedDataOnSignout2" enum="SyncDataTypes"
    expires_after="2024-11-20">
  <owner>[email protected]</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.URLFetchResponse"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2025-01-19">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</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>

</histograms>

</histogram-configuration>