<!--
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 Offline 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>

<histogram name="OfflineIndicator.ShownDurationV2" units="ms"
    expires_after="2022-04-17">
  <owner>curranmax@chromium.org</owner>
  <owner>tbansal@chromium.org</owner>
  <summary>
    The duration the offline indicator was shown. Recorded when the offline
    indicator stops being shown. There are two differences between this
    histogram and OfflineIndicator.ShownDuration: 1) the maximum bucket size and
    total number of buckets are higher in this histogram, and 2) this histogram
    is persisted in perfs. The second point means that if the user backgrounds
    then kills Chrome when the Offline Indicator was shown, then we will still
    record a sample. Note that in this case, when the user opens Chrome again
    and if the Offline Indicator is shown, then it will be treated as a
    continuation from before Chrome was killed.
  </summary>
</histogram>

<histogram name="OfflinePages.AccessPageCount"
    enum="OfflinePagesNamespaceEnumeration" expires_after="2022-08-28">
  <owner>dimich@chromium.org</owner>
  <owner>offline-dev@chromium.org</owner>
  <summary>
    Counts the number of times an offline page is accessed. Events are reported
    per offline pages namespace.
  </summary>
</histogram>

<histogram name="OfflinePages.CachedOfflineStatusValid" enum="BooleanMatched"
    expires_after="2025-09-28">
  <owner>pnoland@chromium.org</owner>
  <owner>offline-dev@chromium.org</owner>
  <summary>
    Whether the offline page status cached for a given tab agrees with the true
    value. Recorded with 1/100 probability each time the offline status for a
    tab is checked.
  </summary>
</histogram>

<histogram name="OfflinePages.DidNavigationThrottleCancelNavigation"
    enum="Boolean" expires_after="2024-05-19">
  <owner>curranmax@chromium.org</owner>
  <owner>tbansal@chromium.org</owner>
  <summary>
    Whether or not the OfflinePageNavigationThrottle canceled a navigation
    request. Requests are only canceled if and only if the navigation request
    was initiated by the renderer and the request headers contain the
    &quot;X-Chrome-offline&quot; header.

    This histogram is recorded each time Chrome tries to create an
    OfflinePageNavigationThrottle, which only happens on Android (since Offline
    Pages is only enabled there).
  </summary>
</histogram>

</histograms>

</histogram-configuration>
