<!--
Copyright 2021 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 Simple histograms
along with a detailed description for each histogram.

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

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

<histogram-configuration>

<histograms>

<variants name="InstallCommand">
<!-- These values must be kept in sync with the web_app::InstallCommand enum. -->

  <variant name="" summary="an aggregation across all install commands"/>
  <variant name=".FetchManifestAndInstall"
      summary="an install triggered by the user via omnibox icon, 3-dot menu
               in Chrome, or the beforeinstallprompt API (from an install
               button on the site's page)"/>
  <variant name=".InstallAppFromVerifiedManifest"
      summary="an install via a custom WebAppInstallInfo object, which is
               usually a backup install, but can occur for other reasons."/>
  <variant name=".InstallFromInfo"
      summary="an install via a custom WebAppInstallInfo object, which is
               usually a backup install, but can occur for other reasons."/>
  <variant name=".InstallFromManifestUrl"
      summary="a manifest-first install triggered by the user via the Web
               Install API."/>
  <variant name=".InstallIsolatedWebApp"
      summary="an isolated web app install."/>
  <variant name=".NavigateAndTriggerInstallDialog"
      summary="an install triggered by the user via the ChromeOS help app
               navigating the user to a page and displaying the install
               dialog."/>
  <variant name=".WebAppInstallFromUrl"
      summary="an install triggered by the user via the web app install
               javascript API, usually as a result of a user click"/>
</variants>

<variants name="WebAppType">
<!-- These values must be kept in sync with the web_app::WebAppType enum. -->

  <variant name=""
      summary="an aggregation across Diy apps (apps for sites without a
               manifest / not installable), Crafted apps (apps that are
               installable / have a valid manifest), and packaged isolated
               web apps"/>
  <variant name=".Crafted"
      summary="apps that are installable / have a valid manifest"/>
  <variant name=".Diy"
      summary="apps manually created for sites that didn't have a manifest /
               weren't installable"/>
  <variant name=".Isolated" summary="isolated web apps"/>
  <variant name=".Unknown"
      summary="an unknown app type, which means not enough information was
               fetched to know if this was 'Crafted' or 'Diy'."/>
</variants>

<variants name="WebInstallEntryPoint">
  <variant name="Api" summary="navigator.install() API"/>
  <variant name="Element" summary="&lt;install&gt; element"/>
</variants>

<histogram name="AppBanners.BeforeInstallEvent"
    enum="AppBannersBeforeInstallEvent" expires_after="2026-12-18">
  <owner>dominickn@chromium.org</owner>
  <owner>pjmclachlan@google.com</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    App banners promote an application related to the current website, and are
    requested specifically through the current page's HTML. This stat tracks
    usage of the BeforeInstallPromptEvent, which allows developers to control
    when an app banner appears. The events in this histogram are not mutually
    exclusive - for example, preventDefault() must be called if prompt() is
    called.
  </summary>
</histogram>

<histogram name="AppBanners.DismissEvent" enum="AppBannersDismissEvent"
    expires_after="2026-12-05">
  <owner>pjmclachlan@google.com</owner>
  <owner>pcovell@google.com</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    App banners promote an application related to the current website, and are
    requested specifically through the current page's HTML. This stat tracks the
    different ways that an app banner left the screen, e.g. through an automatic
    dismissal after navigation or an explicit user action.
  </summary>
</histogram>

<histogram name="AppBanners.DisplayEvent" enum="AppBannersDisplayEvent"
    expires_after="2027-01-31">
  <owner>pjmclachlan@google.com</owner>
  <owner>pcovell@google.com</owner>
  <summary>
    App banners promote an application related to the current website, and are
    requested specifically through the current page's HTML. This stat tracks
    when an app banner was requested and how the request was handled, e.g. the
    user blocked its appearance or the banner was ultimately created.
  </summary>
</histogram>

<histogram name="AppBanners.InstallableStatusCode" enum="InstallableStatusCode"
    expires_after="2026-12-06">
  <owner>dominickn@chromium.org</owner>
  <owner>pjmclachlan@google.com</owner>
  <summary>
    App banners promote an application related to the current website, and are
    requested specifically through the current page's HTML. This stat tracks the
    status code logged by the app banner system as it processes a site's
    eligibility for an app banner. Every request for a banner will be logged in
    a bucket of this histogram.
  </summary>
</histogram>

<histogram name="AppBanners.InstallEvent" enum="AppBannersInstallEvent"
    expires_after="2026-11-15">
  <owner>dominickn@chromium.org</owner>
  <owner>pjmclachlan@google.com</owner>
  <owner>pcovell@google.com</owner>
  <summary>
    App banners promote an application related to the current website, and are
    requested specifically through the current page's HTML. This stat tracks
    when a user triggers an install dialog for the app promoted by the banner,
    as well as whether or not the user ultimately decided to install the app.
  </summary>
</histogram>

<histogram name="AppBanners.UserResponse" enum="AppBannersUserResponse"
    expires_after="2026-12-18">
  <owner>dominickn@chromium.org</owner>
  <owner>pjmclachlan@google.com</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    This stat tracks the user reponse when the add-to-homescreen dialog is shown
    either: (A) Via the website's JavaScript (B) Via the user tapping the app
    banner which promotes the application related to the current site.
  </summary>
</histogram>

<histogram name="Launch.BrowserTab.DiyApp.WebAppDisplayMode"
    enum="WebAppDisplayMode" expires_after="2026-12-10">
  <owner>dibyapal@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the display mode (as defined in the Web App Manifest spec) at the
    launch of a web app that was created using &quot;Install Page as App&quot;
    flow inside the three dot menu on desktop. This is only recorded if the
    launch was to a browser tab context, not a standalone window. Note: This
    display mode value is not necessarily used when launching the app.
  </summary>
</histogram>

<histogram name="Launch.BrowserTab.WebAppDisplayMode" enum="WebAppDisplayMode"
    expires_after="2027-07-12">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the display mode specified in the manifest at the launch of a
    desktop web app installed NOT using &quot;Create Shortcut...&quot;. This is
    only recorded if the launch was to a browser tab context, not a standalone
    window.
  </summary>
</histogram>

<histogram name="Launch.BrowserTab.WebAppLaunchHandlerClientMode"
    enum="WebAppLaunchHandlerClientMode" expires_after="2027-08-09">
  <owner>alancutter@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the launch_handler.client_mode used when a web app is launched in a
    browser tab.
  </summary>
</histogram>

<histogram name="Launch.HomeScreen" enum="LaunchFromHomeScreen"
    expires_after="2027-01-03">
  <owner>dominickn@chromium.org</owner>
  <owner>hartmanng@chromium.org</owner>
  <owner>peconn@chromium.org</owner>
  <summary>
    Records how Chrome handled a launch from an Android Home screen shortcut.
  </summary>
</histogram>

<histogram name="Launch.HomeScreenSource" enum="LaunchFromHomeScreenSource"
    expires_after="2026-10-25">
  <owner>dominickn@chromium.org</owner>
  <owner>hartmanng@chromium.org</owner>
  <owner>peconn@chromium.org</owner>
  <summary>
    Records the source of an Android homescreen launch intent used to launch
    Chrome.

    The Menu item bucket is deprecated as of M57, and will only contain records
    for shortcuts added to the homescreen until M56.

    For M57+, the Menu item (standalone) bucket contains all launch intents
    originating from the add to homescreen menu item that launch to standalone
    mode and *are not* WebAPKs. These are sites which do not meet the PWA
    eligibility criteria, but have an app manifest that specifies either
    standalone or fullscreen display. This bucket also contains PWA *and*
    non-PWA intents that were added to the homescreen *prior* to M57, as we
    cannot distinguish between them after they are added.

    For M57+, the Menu item (shortcut) bucket contains all launch intents
    originating from the add to homescreen menu item that launch to a browser
    tab, regardless of when the intent was added.
  </summary>
</histogram>

<histogram name="Launch.WebApp.DiyOrCrafted" enum="LaunchedAppType"
    expires_after="2027-07-26">
  <owner>dibyapal@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records whether the type of app that was launched in a windowed context was
    a DIY app or a crafted app.
  </summary>
</histogram>

<histogram name="Launch.WebAppDisplayMode" enum="WebAppDisplayMode"
    expires_after="2026-11-29">
  <owner>peter@chromium.org</owner>
  <owner>yfriedman@chromium.org</owner>
  <summary>
    Records the display mode at the launch of the Added to Home screen or
    installed Web App (including WebAPKs). This is only recorded if the launch
    was to a windowed context, not a browser tab.
  </summary>
</histogram>

<histogram name="Launch.WebAppLaunchHandlerClientMode"
    enum="WebAppLaunchHandlerClientMode" expires_after="2027-06-21">
  <owner>alancutter@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the launch_handler.client_mode used when a web app is launched in a
    window.
  </summary>
</histogram>

<histogram name="Launch.Window.DiyApp.WebAppDisplayMode"
    enum="WebAppDisplayMode" expires_after="2027-04-28">
  <owner>dibyapal@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the display mode (as defined in the Web App Manifest spec) at the
    launch of a PWA created using the &quot;Install Page as App&quot; option
    from the three dot menu on desktop. This is only recorded if the launch was
    to a windowed context, not a browser tab. Note: This display mode value is
    not necessarily used when launching the app.
  </summary>
</histogram>

<histogram name="Webapp.AddToHomescreenDialog.Timeout" units="ms"
    expires_after="2027-07-05">
  <owner>dominickn@chromium.org</owner>
  <owner>peconn@chromium.org</owner>
  <owner>desktop-pwas-team@google.com</owner>
  <summary>
    Records the number of milliseconds that the add to homescreen dialog
    required to check installability eligibility. Warning: this histogram was
    expired from 2023-10-08 to 2025-05-02; data may be missing.
  </summary>
</histogram>

<histogram name="Webapp.AmbientBadge.Terminate"
    enum="InstallableAmbientBadgeState" expires_after="2026-10-13">
  <owner>hartmanng@chromium.org</owner>
  <owner>src/chrome/android/webapk/OWNERS</owner>
  <summary>
    On mobile, an install ambient badge may automatically shows to promote an
    application related to the current website when the site meets all install
    criteria. When the ambient badge pipleline was terminated, record the
    pipeline state.
  </summary>
</histogram>

<histogram name="Webapp.AppIdentityDialog.AlreadyApproved"
    enum="AppIdentityDisplayMetric" expires_after="2027-04-01">
  <owner>peter@chromium.org</owner>
  <owner>dmurph@chromium.org</owner>
  <owner>desktop-pwas-team@google.com</owner>
  <summary>
    Whenever PWAs change their manifest, this may result in a change to their
    identity (icon and/or name). This metric is intended to keep track of the
    combinations of App Identity changes that were requested (changes to the
    icons and/or app name -- plus icon masks and/or shortname on Android). This
    metric is logged once each time Chrome determines that a PWA is in need of
    an update, but ONLY if the change should be auto-approved. On Android that
    happens when the user has approved the App Identity dialog with identical
    data before (and another update request comes in), and on Desktop platforms
    that happens when Default apps/Policy apps are pre-approved for updating.
    See also complementary metric Webapp.AppIdentityDialog.NotShowing. Milestone
    112 update: This used to record when there were no app identity changes
    required or for shortcut apps, this is now recorded as
    Webapp.AppIdentityDialog.NotShowing instead. Warning: this histogram was
    expired from 2024-01-15 to 2025-05-02; data may be missing.
  </summary>
</histogram>

<histogram name="Webapp.AppIdentityDialog.NotShowing"
    enum="AppIdentityDisplayMetric" expires_after="2027-04-01">
  <owner>peter@chromium.org</owner>
  <owner>dmurph@chromium.org</owner>
  <owner>desktop-pwas-team@google.com</owner>
  <summary>
    Whenever PWAs change their manifest, this may result in a change to their
    identity (icon and/or name). This metric is intended to keep track of the
    combinations of App Identity changes that were requested (changes to the
    icons and/or app name -- plus icon masks and/or shortname on Android). This
    metric is logged once each time Chrome determines that a PWA is in need of
    an update, but ONLY if there is no App Identity change involved (or the App
    Identity dialog is disabled by a feature switch). See also complementary
    metric Webapp.AppIdentityDialog.Showing. Milestone 112 update:
    Webapp.AppIdentityDialog.AlreadyApproved used to record when there were no
    app identity changes required or for shortcut apps, this is now recorded as
    Webapp.AppIdentityDialog.NotShowing instead. Warning: this histogram was
    expired from 2024-01-15 to 2025-05-02; data may be missing.
  </summary>
</histogram>

<histogram name="Webapp.AppIdentityDialog.Showing"
    enum="AppIdentityDisplayMetric" expires_after="2027-04-01">
  <owner>dmurph@chromium.org</owner>
  <owner>peter@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Whenever PWAs change their manifest, this may result in a change to their
    identity (icon and/or name). This metric is intended to keep track of the
    combinations of App Identity changes that were requested (changes to the
    icons and/or app name -- plus icon masks and/or shortname on Android). This
    metric is logged once each time Chrome determines that a PWA is in need of
    an update, but ONLY if there is an App Identity change involved (the App
    Identity dialog is enabled by a feature switch and the dialog was shown to
    the user). See also complementary metric
    Webapp.AppIdentityDialog.NotShowing. Warning: this histogram was expired
    from 2024-01-15 to 2025-05-02; data may be missing.
  </summary>
</histogram>

<histogram name="Webapp.ApplySyncDataToApp.ManifestIdMatch"
    enum="BooleanSuccess" expires_after="2027-04-29">
  <owner>dmurph@chromium.org</owner>
  <owner>desktop-pwas-team@google.com</owner>
  <summary>
    Recorded when incoming sync data is applied to an app, whether the resolved
    manifest ID's path matches the manifest ID path stored in the sync proto.
  </summary>
</histogram>

<histogram name="WebApp.AppSettingsPage.EntryPoints"
    enum="AppSettingsPageEntryPoints" expires_after="2027-06-13">
  <owner>phillis@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Warning: this histogram was expired from 2023-08-08 to 2026-07; data may be
    missing.

    Records the source of certain navigations to chrome://app-settings.
    Recording happens at the given entry point, and not during the loading of
    chrome://app-settings, so direct visits to the URL are not recorded.
  </summary>
</histogram>

<histogram name="WebApp.Command.LaunchOrReparentResult"
    enum="WebAppLaunchOrReparentResult" expires_after="2027-04-16">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the result of the LaunchOrReparentWebContentsIntoAppCommand, which
    reparents a WebContents into an app window or launches the app. Logged when
    the command completes. This command is currently scheduled in the web app
    installation UX, where the option to launch the app is presented to the user
    after installation completes.
  </summary>
</histogram>

<histogram name="Webapp.CreateWebApp.ManifestIdMatch" enum="BooleanSuccess"
    expires_after="2027-04-29">
  <owner>dmurph@chromium.org</owner>
  <owner>desktop-pwas-team@google.com</owner>
  <summary>
    Recorded at web app database read time for each app, whether the resolved
    manifest ID's path matches the manifest ID path stored in the sync proto.
  </summary>
</histogram>

<histogram name="WebApp.Database.OpenResult" enum="WebAppDatabaseOpenResult"
    expires_after="2026-10-01">
  <owner>dmurph@chromium.org</owner>
  <owner>desktop-pwas-team@google.com</owner>
  <summary>
    Recorded when the Web App database is opened during profile startup. Records
    whether it was successful, had a read error, or if a database downgrade was
    detected. If it fails, this triggers the web app database recovery and
    profile wipe process.
  </summary>
</histogram>

<histogram name="WebApp.Database.ValidProto" enum="Boolean"
    expires_after="2026-10-25">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records whether parsing a proto::WebApp read from the database was
    successful. Recorded for each app proto read from the database during
    profile startup. A value of 'true' indicates parsing succeeded, and 'false'
    indicates the proto was invalid or incomplete.
  </summary>
</histogram>

<histogram name="WebApp.Database.VersionUpgradedTo" units="version"
    expires_after="2026-12-19">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the target version number each time the Web App database schema is
    upgraded. If a database starts at version 0 and the current version is 2,
    this will record '1' and then '2'. Recorded during profile initialization if
    a migration occurs.
  </summary>
</histogram>

<histogram name="WebApp.Database.WriteResult" enum="BooleanSuccess"
    expires_after="never">
<!-- expires-never: The dPWA team uses this from time to time to look into success rates for database writes for web apps. pwa-team@ -->

  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records if modifying data in the web app database was successful. Recorded
    whenever the database is written to, which can happen on large events like
    installing a web app, as well as small events like changing a the user
    display preference for a web app.
  </summary>
</histogram>

<histogram name="WebApp.DedupeInstallUrls.AppsDeduped" units="apps"
    expires_after="2027-01-03">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    The number of web apps deduped *for each install URL* that had more than one
    web app associated with it. Recorded at the end of each
    DedupeInstallUrlsCommand scan, about 3 times at start up (once per external
    web app install source) and once whenever web app policy changes.
  </summary>
</histogram>

<histogram name="WebApp.DedupeInstallUrls.InstallUrlsDeduped"
    units="install URLs" expires_after="2027-01-03">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    The number of install URLs that had multiple web apps associated with it
    during a run of DedupeInstallUrlsCommand. Recorded at the end of each
    DedupeInstallUrlsCommand scan, about 3 times at start up (once per external
    web app install source) and once whenever web app policy changes.
  </summary>
</histogram>

<histogram name="WebApp.DedupeInstallUrls.SessionRunCount" units="runs"
    expires_after="2027-04-19">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    The number of times the DedupeInstallUrlsCommand ran in a single browser
    profile session. Note that because this is recorded for each run, if it is
    run 3 times the client will emit 1, 2 and 3 in succession. Recorded at the
    start of each DedupeInstallUrlsCommand scan, about 3 times at start up (once
    per external web app install source) and once whenever web app policy
    changes.
  </summary>
</histogram>

<histogram name="WebApp.DefaultOffline.ClosingReason"
    enum="DefaultOfflineClosingReason" expires_after="2027-04-01">
  <owner>finnur@chromium.org</owner>
  <owner>peter@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Keeps track of why the default offline (error) page is no longer visible.
    Logged once each time the default error page shown, after determining that
    it is no longer needed, e.g. because a new navigation occurred for the error
    page's WebContents, the device is online again and the WebContents was
    refreshed or when the WebContents is destroyed. Warning: this histogram was
    expired from 2024-01-15 to 2025-05-02; data may be missing.
  </summary>
</histogram>

<histogram name="WebApp.DefaultOffline.DurationShown" units="seconds"
    expires_after="2027-04-01">
  <owner>finnur@chromium.org</owner>
  <owner>peter@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Keeps track of how long the default offline (error) page was shown for PWAs.
    Logged once each time the default error page shown, after determining that
    it is no longer needed, e.g. because a new navigation occurred for the error
    page's WebContents, the device is online again and the WebContents was
    refreshed or when the WebContents is destroyed. Warning: this histogram was
    expired from 2024-01-15 to 2025-05-02; data may be missing.
  </summary>
</histogram>

<histogram name="WebApp.DIY.IconMigrationResult" enum="RewriteIconResult"
    expires_after="2027-04-17">
  <owner>dmurph@chromium.org</owner>
  <owner>dibyapal@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the result of rewriting DIY app icon for apps that need icon
    migration due to https://crbug.com/372688523. This is logged after the
    RewriteDiyIconsCommand command completes, which occurs on a best-effort task
    runner, 1 minutes after profile startup.
  </summary>
</histogram>

<histogram name="WebApp.DiyAppsInstalledCount.ByUser" units="count"
    expires_after="2027-02-09">
  <owner>dibyapal@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the number of fully installed DIY web apps, installed by the user.
    This is recorded on the initialization of the Profile object, which can
    happen either at chrome startup or when the user switches profiles.
  </summary>
</histogram>

<histogram name="WebApp.Engagement.{EngagementType}"
    enum="SiteEngagementServiceEngagementType" expires_after="never">
<!-- expires-never: This is used for dashboard metrics. pwa-team@google.com -->

  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    The type of engagement (navigation, user input, etc.) which led to an
    accumulation in site engagement that {EngagementType}. This is collected for
    a subset of SiteEngagementService.EngagementType, which is triggered for all
    browsing contexts. Recorded at the time of engagement accumulation (e.g.,
    when mouse is clicked).
  </summary>
  <token key="EngagementType">
    <variant name="MoreThanThreeUserInstalledApps"
        summary="happened in web site for user with 4 or more user-installed
                 apps"/>
    <variant name="NoUserInstalledApps"
        summary="happened in web site for user without user-installed apps"/>
    <variant name="UpToThreeUserInstalledApps"
        summary="happened in web site for user with [1-3] user-installed apps"/>
  </token>
</histogram>

<histogram name="WebApp.Engagement2.Active" enum="BooleanValid"
    expires_after="never">
<!-- expires-never: This is used for dashboard metrics. pwa-team@google.com -->

  <owner>dmurph@chromium.org</owner>
  <owner>erikchen@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Whether the foreground window is a PWA, or if a foreground tab is in scope
    of an installed PWA. Installed PWAs can be from the user, from sources like
    administrator policies, and also preinstalled for all Chrome users. On
    non-ChromeOS, preinstalled apps will open in a browser tab by default (and
    are likely the majority of this count). See preinstalled_web_apps.cc. This
    metric is recorded every 5 minutes.
  </summary>
</histogram>

<histogram name="WebApp.Engagement2.Count" units="count" expires_after="never">
<!-- expires-never: This is used for dashboard metrics. pwa-team@google.com -->

  <owner>dmurph@chromium.org</owner>
  <owner>erikchen@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    The number of PWA windows that are running, including any browser tabs whose
    urls are in scope of an installed PWA. Installed PWAs can be from the user,
    from sources like administrator policies, and also preinstalled for all
    Chrome users. On non-ChromeOS, preinstalled apps will open in a browser tab
    by default (and are likely the majority of this count). See
    preinstalled_web_apps.cc. This metric is recorded every 5 minutes.
  </summary>
</histogram>

<histogram name="WebApp.Engagement2.Standalone.Active" enum="BooleanValid"
    expires_after="never">
<!-- expires-never: This is used for dashboard metrics. pwa-team@google.com -->

  <owner>dmurph@chromium.org</owner>
  <owner>erikchen@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Whether the foreground window is a standalone PWA. This metric is recorded
    every 5 minutes.
  </summary>
</histogram>

<histogram name="WebApp.Engagement2.Standalone.Count" units="count"
    expires_after="never">
<!-- expires-never: This is used for dashboard metrics. pwa-team@google.com -->

  <owner>dmurph@chromium.org</owner>
  <owner>erikchen@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    The number of standalone PWAs that are running. This metric is recorded
    every 5 minutes.
  </summary>
</histogram>

<histogram name="WebApp.Engagement2.Standalone.MigrationDialogShowing"
    enum="Boolean" expires_after="2027-03-25">
  <owner>aditipage@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records whether the PWA 'migration' review dialog is currently showing in a
    standalone PWA window. This metric is recorded every 5 minutes. Note: this
    is not 'true' if it is just a name/icon update dialog.
  </summary>
</histogram>

<histogram name="WebApp.Engagement2.Standalone.MigrationSuggested"
    enum="Boolean" expires_after="2027-03-25">
  <owner>aditipage@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records if a standalone PWA window has a 'migration' presented to the user
    via the 3-dot menu, where the 3-dot menu has &quot;App update
    available&quot; text. This metric is recorded every 5 minutes. Note: this is
    not 'true' if it is just a name/icon update.
  </summary>
</histogram>

<histogram name="WebApp.Engagement2.Tabbed.Active" enum="BooleanValid"
    expires_after="never">
<!-- expires-never: This is used for dashboard metrics. pwa-team@google.com -->

  <owner>dmurph@chromium.org</owner>
  <owner>erikchen@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Whether the foreground window is a normal browser window whose foreground
    tab is a url in scope of a PWA. This includes PWAs installed to open as a
    standalone window, as well as PWAs installed to open in a browser tab.
    Installed PWAs can be from the user, from sources like administrator
    policies, and also preinstalled for all Chrome users. On non-ChromeOS,
    preinstalled apps will open in a browser tab by default (and are likely the
    majority of this count). See preinstalled_web_apps.cc. This metric is
    recorded every 5 minutes.
  </summary>
</histogram>

<histogram name="WebApp.Engagement2.Tabbed.Count" units="count"
    expires_after="never">
<!-- expires-never: This is used for dashboard metrics. pwa-team@google.com -->

  <owner>dmurph@chromium.org</owner>
  <owner>erikchen@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    The number of browser tabs that have urls in scope of an installed PWA. This
    includes PWAs installed to open as a standalone window, as well as PWAs
    installed to open in a browser tab. Installed PWAs can be from the user,
    from sources like administrator policies, and also preinstalled for all
    Chrome users. On non-ChromeOS, preinstalled apps will open in a browser tab
    by default (and are likely the majority of this count). See
    preinstalled_web_apps.cc. This metric is recorded every 5 minutes.
  </summary>
</histogram>

<histogram name="WebApp.Engagement2.Tabbed.UserDisplayModeBrowser.Count"
    units="count" expires_after="never">
<!-- expires-never: This is used for dashboard metrics. pwa-team@google.com -->

  <owner>dmurph@chromium.org</owner>
  <owner>erikchen@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    The number of browser tabs that have urls in scope of an installed PWA which
    is configured to open in a browser tab. Installed PWAs can be from the user,
    from sources like administrator policies, and also preinstalled for all
    Chrome users. On non-ChromeOS, preinstalled apps will open in a browser tab
    by default (and are likely the majority of this count). See
    preinstalled_web_apps.cc. This metric is recorded every 5 minutes.
  </summary>
</histogram>

<histogram
    name="WebApp.Engagement2.Tabbed.UserDisplayModeBrowserInstalledByUser.Count"
    units="count" expires_after="never">
<!-- expires-never: This is used for dashboard metrics. pwa-team@google.com -->

  <owner>dmurph@chromium.org</owner>
  <owner>erikchen@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    The number of browser tabs that have urls in scope of an installed PWA which
    is configured to open in a browser tab and also installed by the user. While
    the app could be installed via admin or preinstalled too, this will filter
    out all apps that aren't explicitly installed by the user in this profile.
    Currently to get an app into this state, the user has to install the app,
    and then go to chrome://apps and turn off the &quot;open in a window&quot;
    setting. This metric is recorded every 5 minutes.
  </summary>
</histogram>

<histogram name="WebApp.Engagement2.Tabbed.UserDisplayModeStandalone.Count"
    units="count" expires_after="never">
<!-- expires-never: This is used for dashboard metrics. pwa-team@google.com -->

  <owner>dmurph@chromium.org</owner>
  <owner>erikchen@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    The number of browser tabs that have urls in scope of an installed PWA which
    is configured to open in a standalone window. Installed PWAs can be from the
    user, from sources like administrator policies, and also preinstalled for
    all Chrome users. On non-ChromeOS, preinstalled apps will open in a browser
    tab by default. See preinstalled_web_apps.cc. This metric is recorded every
    5 minutes.
  </summary>
</histogram>

<histogram
    name="WebApp.Engagement2.Tabbed.UserDisplayModeStandaloneInstalledByUser.Count"
    units="count" expires_after="never">
<!-- expires-never: This is used for dashboard metrics. pwa-team@google.com -->

  <owner>dmurph@chromium.org</owner>
  <owner>erikchen@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    The number of browser tabs that have urls in scope of an installed PWA which
    is configured to open in a standalone window and also installed by the user.
    While the app could be installed via admin or preinstalled too, this will
    filter out all apps that aren't explicitly installed by the user in this
    profile. This metric is recorded every 5 minutes.
  </summary>
</histogram>

<histogram name="WebApp.Engagement{Context}.{Container}"
    enum="SiteEngagementServiceEngagementType" expires_after="2027-09-06">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    The type of engagement (navigation, user input, etc.) which led to an
    accumulation in site engagement that {Container} for {Context}. This is
    collected for a subset of SiteEngagementService.EngagementType, which is
    triggered for all browsing contexts. Recorded at the time of engagement
    accumulation (e.g., when mouse is clicked).
  </summary>
  <token key="Context">
    <variant name="" summary="all web app types"/>
    <variant name=".DefaultInstalled"
        summary="an app installed by default on profile creation"/>
    <variant name=".UserInstalled" summary="an app installed by the user"/>
    <variant name=".UserInstalled.Crafted"
        summary="a 'crafted' app installed by the user (where the app was
                 normally installable)"/>
    <variant name=".UserInstalled.Diy"
        summary="a 'DIY' app installed by the user (where the app was not
                 normally installable)"/>
  </token>
  <token key="Container">
    <variant name="InTab" summary="happened in app running in a browser tab"/>
    <variant name="InWindow" summary="happened in app running as a window"/>
  </token>
</histogram>

<histogram name="WebApp.FetchInstallInfoFromInstallUrl.Result"
    enum="FetchInstallInfoResult" expires_after="2026-10-01">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the result of calling FetchInstallInfoFromInstallUrl on the
    WebAppCommandScheduler. This is used from a variety of callers / operations,
    including web install api for a launch dialog, a devtools PWA testing
    commands, and the sub-apps service.
  </summary>
</histogram>

<histogram name="WebApp.FetchManifestAndUpdate.Result"
    enum="FetchManifestAndUpdateResult" expires_after="2027-01-03">
  <owner>dmurph@google.com</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the result of the FetchManifestAndUpdateCommand, which is used to
    force-update an installed web app. This is triggered weekly on startup for
    every user, as well as when launching
  </summary>
</histogram>

<histogram name="WebApp.FileHandlersRegistration.Result" enum="BooleanSuccess"
    expires_after="2027-01-24">
  <owner>dibyapal@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the result of file handler registration for PWAs. This is triggered
    during installations or updates, when set by policy changes in the web app
    settings policy or when an user modifies the file handling settings from the
    chrome://app-settings/ page per app.
  </summary>
</histogram>

<histogram name="WebApp.FileHandlersUnregistration.Result"
    enum="BooleanSuccess" expires_after="2027-01-17">
  <owner>dibyapal@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the result of file handler unregistration for PWAs. This is
    triggered during uninstalls or updates, when set by policy changes in the
    web app settings policy or when an user modifies the file handling settings
    from the chrome://app-settings page per app.
  </summary>
</histogram>

<histogram name="WebApp.GeneratedIconFix.AttemptCount" units="attempts"
    expires_after="2027-06-13">
  <owner>alancutter@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Warning: this histogram was expired from 2024-06-01 to 2026-07; data may be
    missing.

    Records the number of generated icon fixes already attempted for each web
    app that had an icon fix scheduled at start up. Recorded at start up.
  </summary>
</histogram>

<histogram name="WebApp.GeneratedIconFix.Result" enum="GeneratedIconFixResult"
    expires_after="2027-06-13">
  <owner>alancutter@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Warning: this histogram was expired from 2024-06-01 to 2026-07; data may be
    missing.

    Records the result of attempting to fix a web app's generated icon. Recorded
    during start up and for all follow up daily retry events.
  </summary>
</histogram>

<histogram name="WebApp.GeneratedIconFix.ScheduleDecision"
    enum="GeneratedIconFixScheduleDecision" expires_after="2027-06-13">
  <owner>alancutter@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Warning: this histogram was expired from 2024-06-01 to 2026-07; data may be
    missing.

    Records the decision made for whether to fix a web app's generated icon.
    Recorded during start up and for all follow up daily retry events.
  </summary>
</histogram>

<histogram name="WebApp.GeneratedIconFix.StartUpAttemptCount"
    units="start up attempts" expires_after="2027-06-13">
  <owner>alancutter@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Warning: this histogram was expired from 2024-06-01 to 2026-07; data may be
    missing.

    Records the number of background generated icon fix attempts initiated
    during start up. Recorded at start up.
  </summary>
</histogram>

<histogram name="WebApp.Icon.AppsWithEmptyDownloadedIconSizes" units="web apps"
    expires_after="2027-04-24">
  <owner>alancutter@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the number of web apps that have an empty
    WebApp::downloaded_icon_sizes field. This indicates an icon failure state
    caused by an installation bug. This gets recorded at browser profile start
    up in both the Lacros and Ash processes.
  </summary>
</histogram>

<histogram name="WebApp.Icon.AppsWithEmptyIconBitmap" units="web apps"
    expires_after="2027-06-13">
  <owner>alancutter@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Warning: this histogram was expired from 2023-08-01 to 2026-07; data may be
    missing.

    Records the number of web apps that have missing icon bitmap data. This gets
    recorded at browser profile start up in both the Lacros and Ash processes.
  </summary>
</histogram>

<histogram name="WebApp.Icon.AppsWithEmptyIconFile" units="web apps"
    expires_after="2026-11-03">
  <owner>alancutter@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the number of web apps that have empty icon files. This gets
    recorded at browser profile start up in both the Lacros and Ash processes.
  </summary>
</histogram>

<histogram name="WebApp.Icon.AppsWithGeneratedIconBitmap" units="web apps"
    expires_after="2027-06-13">
  <owner>alancutter@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Warning: this histogram was expired from 2023-08-01 to 2026-07; data may be
    missing.

    Records the number of web apps that have a generated letter icon bitmap
    (distinct from the is_generated_icon flag). This gets recorded at browser
    profile start up in both the Lacros and Ash processes.
  </summary>
</histogram>

<histogram name="WebApp.Icon.AppsWithGeneratedIconFlag" units="web apps"
    expires_after="2026-11-03">
  <owner>alancutter@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the number of web apps that have their WebApp::is_generated_icon
    field set. This indicates a letter icon was generated during installation
    instead of using a real app icon. This gets recorded at browser profile
    start up in both the Lacros and Ash processes.
  </summary>
</histogram>

<histogram name="WebApp.Icon.AppsWithGeneratedIconFlagFalseNegative"
    units="web apps" expires_after="2027-06-13">
  <owner>alancutter@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Warning: this histogram was expired from 2023-08-01 to 2026-07; data may be
    missing.

    Records the number of web apps that have their WebApp::is_generated_icon
    field unset but actually have a generated icon bitmap. This indicates a
    letter icon was generated during installation instead of using a real app
    icon and a manifest update clobbered the correct value of is_generated_icon
    (https://crbug.com/1317922). This gets recorded at browser profile start up
    in both the Lacros and Ash processes.
  </summary>
</histogram>

<histogram name="WebApp.Icon.AppsWithMissingIconFile" units="web apps"
    expires_after="2026-11-03">
  <owner>alancutter@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the number of web apps that have missing icon files. This gets
    recorded at browser profile start up in both the Lacros and Ash processes.
  </summary>
</histogram>

<histogram name="WebApp.Icon.DownloadedHttpStatusCodeOnCreate"
    enum="HttpResponseCode" expires_after="2027-06-13">
  <owner>alancutter@chromium.org</owner>
  <owner>mgiuca@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Warning: this histogram was expired from 2024-01-01 to 2026-07; data may be
    missing.

    The HTTP status code returned for a list of icons when installing single
    WebApp. Recorded when WebAppInstallTask finishes downloading icons for
    non-sync installs. Icon download attempts with identical codes produce only
    one event for this histogram.
  </summary>
</histogram>

<histogram name="WebApp.Icon.DownloadedHttpStatusCodeOnSync"
    enum="HttpResponseCode" expires_after="2027-06-13">
  <owner>alancutter@chromium.org</owner>
  <owner>mgiuca@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Warning: this histogram was expired from 2024-01-01 to 2026-07; data may be
    missing.

    The HTTP status code returned for a list of icons when installing single
    WebApp. Recorded when WebAppInstallTask finishes downloading icons for web
    apps from sync. Icon download attempts with identical codes produce only one
    event for this histogram.
  </summary>
</histogram>

<histogram name="WebApp.Icon.DownloadedHttpStatusCodeOnUpdate"
    enum="HttpResponseCode" expires_after="2027-07-04">
  <owner>alancutter@chromium.org</owner>
  <owner>mgiuca@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    The HTTP status code returned for a list of icons when updating single
    WebApp. Recorded when ManifestUpdateDataFetchCommand finishes downloading
    icons for update. Icon download attempts with identical codes produce only
    one event for this histogram. Warning: this histogram was expired from
    2024-01-01 to 2025-07-03; data may be missing.
  </summary>
</histogram>

<histogram name="WebApp.Icon.DownloadedResultOnCreate"
    enum="WebAppIconsDownloadedResult" expires_after="2027-06-13">
  <owner>alancutter@chromium.org</owner>
  <owner>mgiuca@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Warning: this histogram was expired from 2024-01-01 to 2026-07; data may be
    missing.

    The overall result returned by WebAppIconDownloader. Recorded when
    WebAppInstallTask finishes downloading icons for non-sync installs.
  </summary>
</histogram>

<histogram name="WebApp.Icon.DownloadedResultOnSync"
    enum="WebAppIconsDownloadedResult" expires_after="2027-06-13">
  <owner>alancutter@chromium.org</owner>
  <owner>mgiuca@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Warning: this histogram was expired from 2024-01-01 to 2026-07; data may be
    missing.

    The overall result returned by WebAppIconDownloader. Recorded when
    WebAppInstallTask finishes downloading icons for web aps from sync.
  </summary>
</histogram>

<histogram name="WebApp.Icon.DownloadedResultOnUpdate"
    enum="WebAppIconsDownloadedResult" expires_after="2027-07-04">
  <owner>alancutter@chromium.org</owner>
  <owner>mgiuca@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    The overall result returned by WebAppIconDownloader. Recorded when
    ManifestUpdateDataFetchCommand finishes downloading icons. Warning: this
    histogram was expired from 2024-01-01 to 2025-07-03; data may be missing.
  </summary>
</histogram>

<histogram name="WebApp.Icon.HttpStatusCodeClassOnCreate"
    enum="HttpStatusCodeClass" expires_after="2027-06-13">
  <owner>alancutter@chromium.org</owner>
  <owner>mgiuca@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Warning: this histogram was expired from 2024-01-01 to 2026-07; data may be
    missing.

    The HTTP status code class returned for each icon loaded during a WebApp's
    creation. Recorded when WebAppInstallTask finishes downloading icons.
  </summary>
</histogram>

<histogram name="WebApp.Icon.HttpStatusCodeClassOnSync"
    enum="HttpStatusCodeClass" expires_after="2027-06-13">
  <owner>alancutter@chromium.org</owner>
  <owner>mgiuca@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Warning: this histogram was expired from 2024-01-01 to 2026-07; data may be
    missing.

    The HTTP status code class returned for each icon loaded when syncing a
    WebApp. Recorded when WebAppInstallTask finishes downloading icons on sync.
  </summary>
</histogram>

<histogram name="WebApp.Icon.HttpStatusCodeClassOnUpdate"
    enum="HttpStatusCodeClass" expires_after="2027-07-04">
  <owner>alancutter@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    The HTTP status code class returned for each icon loaded when updating a
    WebApp. Recorded when ManifestUpdateDataFetchCommand finishes downloading
    icons. Warning: this histogram was expired from 2024-01-01 to 2025-07-03;
    data may be missing.
  </summary>
</histogram>

<histogram name="WebApp.IconDownloader.HttpResult"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2027-06-13">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Warning: this histogram was expired from 2024-01-14 to 2026-07; data may be
    missing.

    Records the http error code returned from downloading icons from the
    WebAppIconDownloader. This is recorded during any type of web app install
    (user/sync/preinstall/policy/etc), manifest update checking which can occur
    on page loads under an installed app scope, or other users of of
    WebAppIconDownloader in the WebAppProvider system.
  </summary>
</histogram>

<histogram name="WebApp.IconDownloader.Result"
    enum="WebAppIconDownloaderResult" expires_after="2027-08-04">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the result of downloading a number of icons. This is recorded during
    any type of web app install (user/sync/preinstall/policy/etc), manifest
    update checking which can occur on page loads under an installed app scope,
    or other users of WebAppIconDownloader in the WebAppProvider system.
  </summary>
</histogram>

<histogram name="WebApp.Install.CompletedOsIntegrationOnStartup"
    enum="BooleanSuccess" expires_after="2027-04-17">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records whether the OS integration synchronization command, triggered during
    startup for apps that were installed with OS integration but lacked OS state
    in the database, completed successfully. Recorded once per app requiring
    this synchronization during startup.
  </summary>
</histogram>

<histogram name="Webapp.Install.DisplayMode2" enum="WebAppDisplayMode"
    expires_after="2027-01-03">
  <owner>peter@chromium.org</owner>
  <owner>yfriedman@chromium.org</owner>
  <summary>
    Records the display mode (as defined in the Web App Manifest spec) at the
    install time of a WebApp. Fixes a bug in the data collection for desktop web
    apps.
  </summary>
</histogram>

<histogram name="Webapp.Install.InstallBounce" enum="WebappInstallSource"
    expires_after="2027-02-07">
  <owner>alancutter@chromium.org</owner>
  <owner>dominickn@chromium.org</owner>
  <summary>
    Records when a web app install bounced for different install sources. A
    bounce is when the user uninstalls the web app within 1 hour of installing
    it.
  </summary>
</histogram>

<histogram name="Webapp.Install.InstallEvent" enum="WebappInstallSource"
    expires_after="never">
<!-- expires-never: This is used for dashboard metrics. pwa-team@google.com -->

  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the mechanism and source from which a web app installation was
    triggered, regardless of whether the installation was successful.
  </summary>
</histogram>

<histogram name="WebApp.Install.Result" enum="BooleanSuccess"
    expires_after="2027-08-09">
  <owner>phillis@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    This is recorded when a web app installation is completed. If the
    installation occurred or the app was already installed, then this records
    &quot;true&quot;. All other cases record &quot;false&quot;. This tracks all
    kinds of web app installations, e.g. user installs from install icon or
    admin installs from WebAppInstallForcelist.
  </summary>
</histogram>

<histogram name="WebApp.Install.Source.Failure" enum="WebappInstallSource"
    expires_after="never">
<!-- expires-never: This is used for dashboard metrics. pwa-team@google.com -->

  <owner>mek@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the mechanism and source from which a web app installation was
    triggered, when installation failed.
  </summary>
</histogram>

<histogram name="WebApp.Install.Source.Success" enum="WebappInstallSource"
    expires_after="never">
<!-- expires-never: This is used for dashboard metrics. pwa-team@google.com -->

  <owner>mek@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the mechanism and source from which a web app installation was
    triggered, when installation succeeded (this includes cases where the app
    was already installed).
  </summary>
</histogram>

<histogram name="WebApp.Install.SyncFallbackInstallInitiated"
    enum="WebAppInstallResultCode" expires_after="2027-06-13">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Warning: this histogram was expired from 2024-01-15 to 2026-07; data may be
    missing.

    This is recorded when a web app install from the sync system fails and the
    fallback install is initiated. Sync installations happen when the sync
    system tells the local client that a web app has been installed on the
    profile on a different device. This often happens during startup. The value
    is the error code for the regular install flow.
  </summary>
</histogram>

<histogram name="Webapp.Install.UninstallEvent" enum="WebappUninstallSource"
    expires_after="never">
<!-- expires-never: The dPWA team uses this from time to time to look into uninstallations of web apps per uninstall source. pwa-team@ -->

  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <owner>sunggch@microsoft.com</owner>
  <summary>
    Records the mechanism and source from which a web app uninstallation was
    triggered, regardless of whether the uninstallation was successful. Warning:
    this histogram was expired from 2024 to 2026-01-21; data may be missing.
  </summary>
</histogram>

<histogram name="WebApp.InstallCommand{InstallCommand}{WebAppType}.ResultCode"
    enum="WebAppInstallResultCode" expires_after="never">
<!-- expires-never: The PWA team looks at this metric to determine what exactly happens for user installs. -->

  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@chromium.org</owner>
  <summary>
    Records the WebAppInstallResult code for {InstallCommand}. This is
    specifically for {WebAppType}.
  </summary>
</histogram>

<histogram name="WebApp.InstallCommand{InstallCommand}{WebAppType}.Surface"
    enum="WebappInstallSource" expires_after="never">
<!-- expires-never: The PWA team looks at this metric to determine where user installs come from. -->

  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@chromium.org</owner>
  <summary>
    Records the source/surface that initiated {InstallCommand}. This is
    specifically for {WebAppType}.
  </summary>
</histogram>

<histogram name="WebApp.InstallConfirmation.CloseReason"
    enum="WidgetClosedReason" expires_after="2027-07-13">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the reason that the WebApp install confirmation dialog is closed.
    This dialog is shown when the user clicks on the 'install' icon in the
    omnibox for websites that are installable. This metric is intended to give
    data for an experiment to choose the best install icon.
  </summary>
</histogram>

<histogram name="WebApp.InstalledCount.ByUser" units="count"
    expires_after="2027-02-14">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the number of fully installed web apps, installed by the user. This
    is recorded on the initialization of the Profile object, which can happen
    either at chrome startup or when the user switches profiles. Note: This
    includes DIY apps as well.
  </summary>
</histogram>

<histogram name="WebApp.InstalledCount.ByUserInMultipleProfiles" units="count"
    expires_after="2027-01-17">
  <owner>mek@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the number of fully installed web apps, installed by the user in
    multiple profiles. This is only recorded on macOS. This is recorded on the
    initialization of the Profile object, which can happen either at chrome
    startup or when the user switches profiles.
  </summary>
</histogram>

<histogram name="WebApp.InstalledCount.ByUserNotLocallyInstalled" units="count"
    expires_after="2027-07-26">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the number of web apps that were installed by sync but not yet
    locally installed by the user. This is recorded on the initialization of the
    Profile object, which can happen either at chrome startup or when the user
    switches profiles.
  </summary>
</histogram>

<histogram name="WebApp.InstalledCount.ByUserNotLocallyInstalled.SyncDisabled"
    units="count" expires_after="2026-12-18">
  <owner>mek@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the number of web apps that were installed by sync but not yet
    locally installed by the user, in profiles where syncing of apps is
    currently disabled. This is recorded on the initialization of the Profile
    object, which can happen either at chrome startup or when the user switches
    profiles.
  </summary>
</histogram>

<histogram name="WebApp.InstalledCount.HasNoTrustedIcons" units="count"
    expires_after="2027-02-14">
  <owner>dibyapal@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the number of web apps that are installed that have no trusted icon
    metadata populated, but contains manifest icons that are untrusted. This is
    recorded on the initialization of the Profile object, which can happen
    either at chrome startup or when the user switches profiles. Note: This is
    supposed to go down once existing apps start getting their manifests
    updated, or new installs come in.
  </summary>
</histogram>

<histogram name="WebApp.InstalledCount.HasTrustedIcons" units="count"
    expires_after="2027-02-14">
  <owner>dibyapal@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the number of web apps that are installed that have trusted icon
    metadata populated for it. This is recorded on the initialization of the
    Profile object, which can happen either at chrome startup or when the user
    switches profiles.
  </summary>
</histogram>

<histogram name="WebApp.InstalledCount.NotSyncing.SyncEnabled" units="count"
    expires_after="2026-12-18">
  <owner>mek@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the number of fully installed web apps, installed by the user but
    not included in the users sync data, for profiles that do have app syncing
    enabled. This includes apps that were installed before sync was enabled.
    This is recorded on the initialization of the Profile object, which can
    happen either at chrome startup or when the user switches profiles.
  </summary>
</histogram>

<histogram name="WebApp.InstallFlow.DropOffStep" enum="WebAppInstallFlowStep"
    expires_after="2027-05-27">
  <owner>aixba@google.com</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the step at which a user drops off (cancels or closes) the web app
    installation flow. Recorded when the install flow dialog is cancelled,
    closed, or destroyed before completion.
  </summary>
</histogram>

<histogram name="WebApp.InstallFromMigrateFromField.Result"
    enum="WebAppInstallFromMigrateFromFieldResult" expires_after="2027-03-06">
  <owner>mek@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the result of the WebAppInstallFromMigrateFromFieldCommand. This
    occurs when a manifest is seen attached to a document the user navigated to,
    where the 'migrate_from' manifest field is set, signifying that the current
    manifest (web app) can can be migrated to from another installed manifest
    (web app). The general purpose of this command is to install the current
    manifest as a migration suggestion if the 'migrate_from' app is installed.
  </summary>
</histogram>

<histogram name="WebApp.InstallMigrateToApp.Result"
    enum="InstallMigrateToAppResult" expires_after="2027-02-11">
  <owner>mek@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the result of the InstallMigrateToAppCommand, which is scheduled
    when a manifest is seen via user navigation that contains a 'migrate_to'
    manifest field, signifying that the existing site, if it is an installed
    PWA, can be migrated to another PWA.
  </summary>
</histogram>

<histogram name="Webapp.InstallResult.{Type}" enum="WebAppInstallResultCode"
    expires_after="2027-02-07">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>Records the result code of Web App installs. {Type}</summary>
  <token key="Type">
    <variant name="Default" summary="Default-installed app"/>
    <variant name="Policy" summary="Policy-installed app"/>
    <variant name="Sync" summary="Sync-installed app"/>
    <variant name="System" summary="System-installed app"/>
    <variant name="System.Apps.Boca" summary="System-installed app: Boca"/>
    <variant name="System.Apps.Camera" summary="System-installed app: Camera"/>
    <variant name="System.Apps.ConnectivityDiagnostics"
        summary="System-installed app: Connectivity Diagnostics"/>
    <variant name="System.Apps.Crosh" summary="System-installed app: Crosh"/>
    <variant name="System.Apps.DemoMode"
        summary="System-installed app: DemoMode"/>
    <variant name="System.Apps.Diagnostics"
        summary="System-installed app: Diagnostics"/>
    <variant name="System.Apps.Eche" summary="System-installed app: Eche"/>
    <variant name="System.Apps.FaceML"
        summary="System-installed app: Face ML (Deprecated)"/>
    <variant name="System.Apps.FirmwareUpdate"
        summary="System-installed app: FirmwareUpdate"/>
    <variant name="System.Apps.Graduation"
        summary="System-installed app: Graduation"/>
    <variant name="System.Apps.Help" summary="System-installed app: Help"/>
    <variant name="System.Apps.Mall" summary="System-installed app: App Mall"/>
    <variant name="System.Apps.Media" summary="System-installed app: Media"/>
    <variant name="System.Apps.OSFeedback"
        summary="System-installed app: OSFeedback"/>
    <variant name="System.Apps.OsFlags"
        summary="System-installed app: OsFlags"/>
    <variant name="System.Apps.OSSettings"
        summary="System-installed app: OS Settings"/>
    <variant name="System.Apps.Personalization"
        summary="System-installed app: Personalization"/>
    <variant name="System.Apps.PrintManagement"
        summary="System-installed app: PrintManagement"/>
    <variant name="System.Apps.PrintPreviewCrOS"
        summary="System-installed app: Print Preview CrOS"/>
    <variant name="System.Apps.Projector"
        summary="System-installed app: Projector"/>
    <variant name="System.Apps.Recorder"
        summary="System-installed app: Recorder"/>
    <variant name="System.Apps.Sample" summary="System-installed app: Sample"/>
    <variant name="System.Apps.Sanitize"
        summary="System-installed app: Sanitize"/>
    <variant name="System.Apps.Scanning"
        summary="System-installed app: Scanning"/>
    <variant name="System.Apps.ShimlessRMA"
        summary="System-installed app: Shimless RMA"/>
    <variant name="System.Apps.ShortcutCustomization"
        summary="System-installed app: ShortcutCustomization"/>
    <variant name="System.Apps.Terminal"
        summary="System-installed app: Terminal"/>
    <variant name="System.Apps.VcBackground"
        summary="System-installed app: VC Background"/>
    <variant name="System.Profiles.Ephemeral"
        summary="System-installed app: Per-Profile: Guest or incognito"/>
    <variant name="System.Profiles.Kiosk"
        summary="System-installed app: Per-Profile: Kiosk app"/>
    <variant name="System.Profiles.Other"
        summary="System-installed app: Per-Profile: Other profile"/>
    <variant name="System.Profiles.Primary"
        summary="System-installed app: Per-Profile: Regular user"/>
    <variant name="System.Profiles.SigninOrLockScreen"
        summary="System-installed app: Per-Profile: Sign in or lockscreen"/>
  </token>
</histogram>

<histogram name="WebApp.Isolated.CleanupBundleCacheError"
    enum="IsolatedWebAppCleanupBundleCacheError" expires_after="2027-07-30">
  <owner>irfedorova@chromium.org</owner>
  <owner>pwa-commercial@google.com</owner>
  <owner>src/chrome/browser/web_applications/isolated_web_apps/OWNERS</owner>
  <summary>
    Records the exact error that occurred during the cleanup of the Isolated Web
    App bundle from cache. The error is logged together with
    WebApp.Isolated.CleanupBundleCacheSuccess in case an error occurs.
  </summary>
</histogram>

<histogram name="WebApp.Isolated.CleanupBundleCacheSuccess"
    enum="BooleanSuccess" expires_after="2027-07-30">
  <owner>irfedorova@chromium.org</owner>
  <owner>pwa-commercial@google.com</owner>
  <owner>src/chrome/browser/web_applications/isolated_web_apps/OWNERS</owner>
  <summary>
    Records whether the cleanup of the Isolated Web App bundle from cache was
    successful or resulted in an error.
  </summary>
</histogram>

<histogram name="WebApp.Isolated.CopyBundleToCacheAfterInstallationError"
    enum="IsolatedWebAppCopyBundleToCacheError" expires_after="2027-07-30">
  <owner>irfedorova@chromium.org</owner>
  <owner>pwa-commercial@google.com</owner>
  <owner>src/chrome/browser/web_applications/isolated_web_apps/OWNERS</owner>
  <summary>
    Records the exact error that occurred during the copying the bundle to cache
    after the installation of Isolated Web App. The error is logged together
    with WebApp.Isolated.CopyBundleToCacheAfterInstallationSuccess in case an
    error occurs.
  </summary>
</histogram>

<histogram name="WebApp.Isolated.CopyBundleToCacheAfterInstallationSuccess"
    enum="BooleanSuccess" expires_after="2027-07-30">
  <owner>irfedorova@chromium.org</owner>
  <owner>pwa-commercial@google.com</owner>
  <owner>src/chrome/browser/web_applications/isolated_web_apps/OWNERS</owner>
  <summary>
    Records whether the the copying bundle to cache after the installation of an
    Isolated Web App was successful or resulted in an error.
  </summary>
</histogram>

<histogram name="WebApp.Isolated.CopyBundleToCacheAfterUpdateError"
    enum="IsolatedWebAppCopyBundleToCacheError" expires_after="2027-07-30">
  <owner>irfedorova@chromium.org</owner>
  <owner>pwa-commercial@google.com</owner>
  <owner>src/chrome/browser/web_applications/isolated_web_apps/OWNERS</owner>
  <summary>
    Records the exact error that occurred during the copying the bundle to cache
    after the update of Isolated Web App. The error is logged together with
    WebApp.Isolated.CopyBundleToCacheAfterUpdateSuccess in case an error occurs.
  </summary>
</histogram>

<histogram name="WebApp.Isolated.CopyBundleToCacheAfterUpdateSuccess"
    enum="BooleanSuccess" expires_after="2027-07-30">
  <owner>irfedorova@chromium.org</owner>
  <owner>pwa-commercial@google.com</owner>
  <owner>src/chrome/browser/web_applications/isolated_web_apps/OWNERS</owner>
  <summary>
    Records whether the the copying bundle to cache after the update of an
    Isolated Web App was successful or resulted in an error.
  </summary>
</histogram>

<histogram name="WebApp.Isolated.FirstPolicyProcessingDelay" units="ms"
    expires_after="2027-07-12">
  <owner>greengrape@google.com</owner>
  <owner>iwa-team@google.com</owner>
  <summary>
    Records the elapsed time between the first user sign-in and the beginning of
    the initial processing of the IsolatedWebAppInstallForceList policy with a
    lock.
  </summary>
</histogram>

<histogram name="WebApp.Isolated.GetBundleCachePathError"
    enum="IsolatedWebAppGetBundleCachePathError" expires_after="2027-07-30">
  <owner>irfedorova@chromium.org</owner>
  <owner>pwa-commercial@google.com</owner>
  <owner>src/chrome/browser/web_applications/isolated_web_apps/OWNERS</owner>
  <summary>
    Records the exact error that occurred during the extraction of the Isolated
    Web App bundle from cache. The error is logged together with
    WebApp.Isolated.GetBundleCachePathSuccess in case an error occurs.
  </summary>
</histogram>

<histogram name="WebApp.Isolated.GetBundleCachePathSuccess"
    enum="BooleanSuccess" expires_after="2027-07-30">
  <owner>irfedorova@chromium.org</owner>
  <owner>pwa-commercial@google.com</owner>
  <owner>src/chrome/browser/web_applications/isolated_web_apps/OWNERS</owner>
  <summary>
    Records whether the extraction of the Isolated Web App bundle from cache was
    successful or resulted in an error.
  </summary>
</histogram>

<histogram name="WebApp.Isolated.InstallError"
    enum="IsolatedWebAppInstallError" expires_after="2026-11-15">
  <owner>giovax@chromium.org</owner>
  <owner>pwa-commercial@google.com</owner>
  <owner>src/chrome/browser/web_applications/isolated_web_apps/OWNERS</owner>
  <summary>
    Records the exact error that occurred during the installation of an Isolated
    Web App. The error is logged together with WebApp.Isolated.InstallSuccess in
    case an error occurs.
  </summary>
</histogram>

<histogram name="WebApp.Isolated.InstallFromCache" enum="BooleanSuccess"
    expires_after="2027-07-30">
  <owner>irfedorova@google.com</owner>
  <owner>pwa-commercial@google.com</owner>
  <owner>src/chrome/browser/web_applications/isolated_web_apps/OWNERS</owner>
  <summary>
    Records whether the installation of an Isolated Web App from cache was
    successful or resulted in an error.
  </summary>
</histogram>

<histogram name="WebApp.Isolated.InstallSuccess" enum="BooleanSuccess"
    expires_after="2026-10-25">
  <owner>giovax@chromium.org</owner>
  <owner>pwa-commercial@google.com</owner>
  <owner>src/chrome/browser/web_applications/isolated_web_apps/OWNERS</owner>
  <summary>
    Records whether the the installation of an Isolated Web App was successful
    or resulted in an error.
  </summary>
</histogram>

<histogram
    name="WebApp.Isolated.KeyDistributionComponent.BestEffortWaitOutcome"
    enum="IwaComponentBestEffortWaitOutcome" expires_after="2027-06-22">
  <owner>greengrape@google.com</owner>
  <owner>iwa-team@google.com</owner>
  <summary>
    Records the outcome of the &quot;best effort&quot; wait for the latest
    downloaded version of the IWA Key Distribution component.

    This is recorded at most once per Chrome session and provides some insight
    whether the on-demand component update feature actually led to a meaningful
    result and successfully bumped the (potentially) preloaded version to the
    latest one available on the server.
  </summary>
</histogram>

<histogram
    name="WebApp.Isolated.KeyDistributionComponent.KeyRotationBundleIdentityCheck"
    enum="KeyRotationBundleIdentityCheckResult" expires_after="2027-05-27">
  <owner>rferens@google.com</owner>
  <owner>iwa-team@google.com</owner>
  <summary>
    Records the outcome of matching public keys in the signature list of a
    Signed Web Bundle against the key rotation information provided by the Key
    Distribution Component.

    This is recorded during validation of a Signed Web Bundle against key
    rotation info.
  </summary>
</histogram>

<histogram
    name="WebApp.Isolated.KeyDistributionComponent.KeyRotationInfoSource"
    enum="KeyDistributionComponentSource" expires_after="2027-01-17">
  <owner>greengrape@google.com</owner>
  <owner>iwa-team@google.com</owner>
  <summary>
    Key rotation data for Isolated Web Apps (i.e. which custom key a particular
    app bundle must be signed with to be accepted) comes from the Iwa Key
    Distribution component which is managed by the Chrome component updater.

    This metric records the currently loaded data source for calls to
    IwaKeyDistributionInfoProvider::GetKeyRotationInfo() -- whether there's no
    component loaded at all, whether the component is preloaded with Chrome
    distribution or whether it's properly downloaded from Omaha servers.

    This is normally called during installation/updates as well as before
    launching the app.
  </summary>
</histogram>

<histogram
    name="WebApp.Isolated.KeyDistributionComponent.ManagedInstallAllowed"
    enum="BooleanAllowed" expires_after="2027-03-01">
  <owner>rferens@google.com</owner>
  <owner>iwa-team@google.com</owner>
  <summary>
    This metric records if the checked app is present in the managed allowlist.
    The metric is recorded on
    IwaKeyDistributionInfoProvider::IsManagedInstallPermitted() call, when the
    policy is processed.
  </summary>
</histogram>

<histogram
    name="WebApp.Isolated.KeyDistributionComponent.ManagedInstallCheckInfoSource"
    enum="KeyDistributionComponentSource" expires_after="2027-03-01">
  <owner>rferens@google.com</owner>
  <owner>iwa-team@google.com</owner>
  <summary>
    Allowlist data for Isolated Web Apps (i.e. which app can be
    installed/updated) comes from the Iwa Key Distribution component which is
    managed by the Chrome component updater.

    This metric records the currently loaded data source for calls to
    IwaKeyDistributionInfoProvider::IsManagedInstallPermitted() -- whether
    there's no component loaded at all, whether the component is preloaded with
    Chrome distribution or whether it's properly downloaded from Omaha servers.

    This is normally called when the policy is processed.
  </summary>
</histogram>

<histogram name="WebApp.Isolated.KeyDistributionComponent.ManagedUpdateAllowed"
    enum="BooleanAllowed" expires_after="2027-03-01">
  <owner>rferens@google.com</owner>
  <owner>iwa-team@google.com</owner>
  <summary>
    This metric records if the checked app is present in the managed allowlist.
    The metric is recorded on
    IwaKeyDistributionInfoProvider::IsManagedUpdatePermitted() call, when the
    update manager checks if apps require updates.
  </summary>
</histogram>

<histogram
    name="WebApp.Isolated.KeyDistributionComponent.ManagedUpdateCheckInfoSource"
    enum="KeyDistributionComponentSource" expires_after="2027-03-01">
  <owner>rferens@google.com</owner>
  <owner>iwa-team@google.com</owner>
  <summary>
    Allowlist data for Isolated Web Apps (i.e. which app can be
    installed/updated) comes from the Iwa Key Distribution component which is
    managed by the Chrome component updater.

    This metric records the currently loaded data source for calls to
    IwaKeyDistributionInfoProvider::IsManagedUpdatePermitted() -- whether
    there's no component loaded at all, whether the component is preloaded with
    Chrome distribution or whether it's properly downloaded from Omaha servers.

    This is called when the update manager check if apps require updates.
  </summary>
</histogram>

<histogram name="WebApp.Isolated.KeyDistributionComponent.UpdateError"
    enum="IwaComponentUpdateError" expires_after="2026-12-01">
  <owner>greengrape@google.com</owner>
  <owner>iwa-team@google.com</owner>
  <summary>
    Key rotation data for Isolated Web Apps (i.e. which custom key a particular
    app bundle must be signed with to be accepted) comes from the Iwa Key
    Distribution component which is managed by the Chrome component updater.

    This metric records the different types of errors that might occur during
    the processing of the fresh component data delivered by the Chrome component
    updater. The preloaded version can only be loaded on Chrome startup, and the
    downloaded version will be pulled in if there's an update on the Omaha side
    as part of the regular check that takes place every ~5 hours.
  </summary>
</histogram>

<histogram name="WebApp.Isolated.KeyDistributionComponent.UpdateSource"
    enum="IwaComponentUpdateSource" expires_after="2027-01-17">
  <owner>greengrape@google.com</owner>
  <owner>iwa-team@google.com</owner>
  <summary>
    Key rotation data for Isolated Web Apps (i.e. which custom key a particular
    app bundle must be signed with to be accepted) comes from the Iwa Key
    Distribution component which is managed by the Chrome component updater.

    If the processing of the component data is successful, records whether this
    component is preloaded (i.e. comes with Chrome) or downloaded from Omaha
    servers. The preloaded version can only be loaded on Chrome startup, and the
    downloaded version will be pulled in if there's an update on the Omaha side
    as part of the regular check that takes place every ~5 hours.
  </summary>
</histogram>

<histogram name="WebApp.Isolated.NonAllowlistedAppInstallationRejected"
    enum="ManagedSessionType" expires_after="2026-11-22">
  <owner>rferens@google.com</owner>
  <owner>iwa-team@google.com</owner>
  <summary>
    Records the session type (i.e., Managed User Session, MGS, or Kiosk) for
    each rejected Isolated Web App (IWA) installation attempt. An installation
    is rejected if the IWA's bundle ID is not found in the allowlist, which is
    maintained by the KeyDistribution component and delivered by the component
    updater.
  </summary>
</histogram>

<histogram name="WebApp.Isolated.OrphanedBundlesCleanupJobError"
    enum="IsolatedWebAppCleanupOrphanedIWAsError" expires_after="2027-02-09">
  <owner>giovax@chromium.org</owner>
  <owner>pwa-commercial@google.com</owner>
  <owner>src/chrome/browser/web_applications/isolated_web_apps/OWNERS</owner>
  <summary>
    Records the exact error that occurred during the execution of the
    OrphanedBundlesCleanupCommand. This command is run on session start and
    after a failed IWA install, to remove the folders of IWAs that are not
    installed. The error is logged together with
    WebApp.Isolated.OrphanedBundlesCleanupJobSuccess in case an error occurs.
  </summary>
</histogram>

<histogram name="WebApp.Isolated.OrphanedBundlesCleanupJobSuccess"
    enum="BooleanValid" expires_after="2027-02-09">
  <owner>giovax@chromium.org</owner>
  <owner>pwa-commercial@google.com</owner>
  <owner>src/chrome/browser/web_applications/isolated_web_apps/OWNERS</owner>
  <summary>
    Records whether the OrphanedBundlesCleanupCommand was successful or resulted
    in an error. This command is run on session start and after a failed IWA
    install, to remove the folders of IWAs that are not installed.
  </summary>
</histogram>

<histogram name="WebApp.Isolated.ReadResponseHeadError"
    enum="IsolatedWebAppReadResponseHeadError" expires_after="2026-10-04">
  <owner>giovax@chromium.org</owner>
  <owner>pwa-commercial@google.com</owner>
  <owner>src/chrome/browser/web_applications/isolated_web_apps/OWNERS</owner>
  <summary>
    Records the exact error that occurred during reading of a response head for
    a request to an Isolated Web App via the isolated-app: scheme. The error is
    logged together with WebApp.Isolated.ReadResponseHeadSuccess in case when an
    error occurs. Warning: this histogram was expired from 2024-05-08 to
    2024-06-12; data may be missing.
  </summary>
</histogram>

<histogram name="WebApp.Isolated.ReadResponseHeadSuccess" enum="BooleanSuccess"
    expires_after="2026-10-04">
  <owner>giovax@chromium.org</owner>
  <owner>pwa-commercial@google.com</owner>
  <owner>src/chrome/browser/web_applications/isolated_web_apps/OWNERS</owner>
  <summary>
    Records whether reading the response head for a request to an Isolated Web
    App via the isolated-app: scheme was successful or resulted in an error. As
    a prerequisite for this metric to be logged, the Isolated Web App's
    integrity block and metadata must have passed validation and its signatures
    must have been verified successfully. This metric is then logged for any
    resources loading for the Isolated Web App, so any usage could trigger this
    metric. Warning: this histogram was expired from 2024-05-08 to 2024-06-12;
    data may be missing.
  </summary>
</histogram>

<histogram name="WebApp.Isolated.RemoveObsoleteBundleVersionsError"
    enum="IsolatedWebAppRemoveObsoleteBundleVersionsError"
    expires_after="2027-07-30">
  <owner>irfedorova@chromium.org</owner>
  <owner>pwa-commercial@google.com</owner>
  <owner>src/chrome/browser/web_applications/isolated_web_apps/OWNERS</owner>
  <summary>
    Records the exact error that occurred during the removing of the Isolated
    Web App obsolete bundle versions from cache. The error is logged together
    with WebApp.Isolated.RemoveObsoleteBundleVersionsSuccess in case an error
    occurs.
  </summary>
</histogram>

<histogram name="WebApp.Isolated.RemoveObsoleteBundleVersionsSuccess"
    enum="BooleanSuccess" expires_after="2027-07-30">
  <owner>irfedorova@chromium.org</owner>
  <owner>pwa-commercial@google.com</owner>
  <owner>src/chrome/browser/web_applications/isolated_web_apps/OWNERS</owner>
  <summary>
    Records whether the removing of the Isolated Web App obsolete bundle
    versions from cache was successful or resulted in an error.
  </summary>
</histogram>

<histogram name="WebApp.Isolated.ResponseReaderCacheState"
    enum="IsolatedWebAppResponseReaderCacheState" expires_after="2026-10-25">
  <owner>giovax@chromium.org</owner>
  <owner>pwa-commercial@google.com</owner>
  <owner>src/chrome/browser/web_applications/isolated_web_apps/OWNERS</owner>
  <summary>
    This histogram is logged whenever an HTTP request to read a response from a
    Signed Web Bundle used for Isolated Web Apps is made through the
    isolated-app: scheme and handled by the corresponding URLLoader. This
    happens both during installation of an Isolated Web App, and when users
    browse an installed Isolated Web App. The histogram records whether a cached
    reader was used to read the response. A cached reader is able to directly
    read a response from the Signed Web Bundle, whereas an uncached reader first
    needs to parse the Signed Web Bundle's Integrity Block and metadata, and
    possibly verify signatures.
  </summary>
</histogram>

<histogram name="WebApp.Isolated.SignatureVerificationDuration" units="ms"
    expires_after="2026-10-04">
  <owner>giovax@chromium.org</owner>
  <owner>pwa-commercial@google.com</owner>
  <owner>src/chrome/browser/web_applications/isolated_web_apps/OWNERS</owner>
  <summary>
    Records how long it takes to verify signatures of Signed Web Bundles used
    for Isolated Web Apps every time their signatures are verified. Signatures
    are verified during installation (all platforms) and when an Isolated Web
    App is first accessed during a Chrome session (non-ChromeOS platforms only).
  </summary>
</histogram>

<histogram name="WebApp.Isolated.SignatureVerificationFileLength" units="MiB"
    expires_after="2026-11-01">
  <owner>giovax@chromium.org</owner>
  <owner>pwa-commercial@google.com</owner>
  <owner>src/chrome/browser/web_applications/isolated_web_apps/OWNERS</owner>
  <summary>
    Records the file length of Signed Web Bundles used for Isolated Web Apps
    every time their signatures are verified. Signatures are verified during
    installation (all platforms) and when an Isolated Web App is first accessed
    during a Chrome session (non-ChromeOS platforms only).
  </summary>
</histogram>

<histogram name="WebApp.Isolated.SwbnFileUsabilityError"
    enum="IsolatedWebAppSwbnFileUsabilityError" expires_after="2027-02-09">
  <owner>giovax@chromium.org</owner>
  <owner>pwa-commercial@google.com</owner>
  <owner>src/chrome/browser/web_applications/isolated_web_apps/OWNERS</owner>
  <summary>
    Records the exact error why a Signed Web Bundle is unusable. In particular
    integrity block or metadata parsing errors are recorded here. The error is
    logged together with WebApp.Isolated.SwbnFileUsabilitySuccess when an error
    occurs. Warning: this histogram was expired from 2024-05-08 to 2024-06-12;
    data may be missing.
  </summary>
</histogram>

<histogram name="WebApp.Isolated.SwbnFileUsabilitySuccess" enum="BooleanValid"
    expires_after="2027-02-09">
  <owner>giovax@chromium.org</owner>
  <owner>pwa-commercial@google.com</owner>
  <owner>src/chrome/browser/web_applications/isolated_web_apps/OWNERS</owner>
  <summary>
    Records whether a Signed Web Bundle file is usable. To be usable the file's
    integrity block and metadata should be read, parsed and validated
    successfully. This is logged every time the integrity block and metadata of
    an Isolated Web App are parsed, which happens whenever the reader for an
    Isolated Web App is not yet cached. Readers are evicted from the cache after
    approximately 10 minutes of not reading any responses from their
    corresponding Signed Web Bundle. Isolated Web Apps are parsed for any
    resources loading for the web app, so any usage could trigger this UMA.
    Warning: this histogram was expired from 2024-05-08 to 2024-06-12; data may
    be missing.
  </summary>
</histogram>

<histogram name="WebApp.Isolated.UpdateError" enum="IsolatedWebAppUpdateError"
    expires_after="2026-12-27">
  <owner>giovax@chromium.org</owner>
  <owner>pwa-commercial@google.com</owner>
  <owner>src/chrome/browser/web_applications/isolated_web_apps/OWNERS</owner>
  <summary>
    Records the exact error that occurred during the update of an Isolated Web
    App. The update process happens at 2 different times: browser launch and
    every 5 hours. Admin installed IWAs are also checked everytime the policy
    value changes. Additional details can be found at go/iwa-managed-updates.
    The error is logged together with WebApp.Isolated.UpdateSuccess in case an
    error occurs.
  </summary>
</histogram>

<histogram name="WebApp.Isolated.UpdateManifest.HttpResponseOrErrorCode"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2027-02-03">
  <owner>bhaskarsharma@google.com</owner>
  <owner>pwa-commercial@google.com</owner>
  <owner>src/chrome/browser/web_applications/isolated_web_apps/OWNERS</owner>
  <summary>
    Records the outcome of the update manifest download for IWA updates. Values
    are either the HTTP status code from the server's response or the network
    error code if the request failed to elicit an HTTP response.
  </summary>
</histogram>

<histogram name="WebApp.Isolated.UpdateSuccess" enum="BooleanSuccess"
    expires_after="2026-12-27">
  <owner>giovax@chromium.org</owner>
  <owner>pwa-commercial@google.com</owner>
  <owner>src/chrome/browser/web_applications/isolated_web_apps/OWNERS</owner>
  <summary>
    Records whether the the update of an Isolated Web App was successful or
    resulted in an error. The update process happens at 2 different times:
    browser launch and every 5 hours. Admin installed IWAs are also checked
    everytime the policy value changes. Additional details can be found at
    go/iwa-managed-updates.
  </summary>
</histogram>

<histogram name="WebApp.LaunchContainer" enum="AppLaunchContainer"
    expires_after="2026-11-15">
  <owner>phillis@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the container used for a web app launch, when the app is launched
    (eg. via UI surfaces or intents). Not recorded when the web app is navigated
    to via URL.
  </summary>
</histogram>

<histogram name="WebApp.Launcher.LaunchResult"
    enum="WebAppLauncherLaunchResult" expires_after="2026-03-22">
  <owner>davidbienvenu@chromium.org</owner>
  <owner>jessemckenna@google.com</owner>
  <summary>
    Obsolete as of 03-2026. The result of a Progressive Web App (PWA) launcher's
    attempt to launch Chrome. Windows-only.
  </summary>
</histogram>

<histogram name="WebApp.LaunchSource" enum="LaunchSource"
    expires_after="2026-12-20">
  <owner>phillis@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    The number of times web apps are launched, grouped by apps::LaunchSource.
    The equivalent histogram on Android is called Launch.HomeScreenSource.
  </summary>
</histogram>

<histogram name="WebApp.LaunchUrlIsInScope" enum="LaunchUrlInScopeResult"
    expires_after="2027-01-15">
  <owner>japhet@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>Whether the given launch url is in the web app's scope.</summary>
</histogram>

<histogram name="WebApp.Manifest.ForOpaqueOrigin" enum="Boolean"
    expires_after="2027-05-11">
  <owner>japhet@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records when the browser process receives a non-empty manifest from the
    renderer, but the browser believes the current document origin in the
    renderer is opaque (and therefore should never have a manifest).
  </summary>
</histogram>

<histogram name="WebApp.ManifestIconDownloader.ChromeUrl.Result"
    enum="ManifestIconDownloaderResult" expires_after="2027-04-05">
  <owner>dibyapal@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the result of icons being downloaded from the manifest for various
    reasons but only for urls that begin with the &quot;chrome&quot; scheme.
    This is recorded when an user triggers an install from the omnibox or from
    the three dot menu, when the installability of the site is measured by
    fetching icons (on desktop platforms) or screenshots (all platforms,
    including Android). This is also measured for installation of the payments
    app, as well as when the splash image is being downloaded while creating a
    shortcut on Android.
  </summary>
</histogram>

<histogram name="WebApp.ManifestIconDownloader.Result"
    enum="ManifestIconDownloaderResult" expires_after="2027-04-05">
  <owner>dibyapal@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the result of icons being downloaded from the manifest for various
    reasons, like when an user triggers an install from the omnibox or from the
    three dot menu, when the installability of the site is measured by fetching
    icons (on desktop platforms) or screenshots (all platforms, including
    Android). This is also measured for installation of the payments app, as
    well as when the splash image is being downloaded while creating a shortcut
    on Android.
  </summary>
</histogram>

<histogram name="WebApp.Media.SystemMediaControls"
    enum="WebAppSystemMediaControlsEvent" expires_after="2027-09-10">
  <owner>dmurph@chromium.org</owner>
  <owner>stahon@microsoft.com</owner>
  <owner>steimel@chromium.org</owner>
  <summary>
    Records events when Progressive Web Apps (PWAs) play audio as well as when
    PWA specific SystemMediaControls are interacted with in the operating
    system. This can be to play, pause, skip and other similar actions available
    from the OS. This histogram is only used when instanced PWA system media
    controls is enabled. The control events (like next) are only fired if the
    request comes from system media controls (and the OS) not when the media is
    directly interacted.
  </summary>
</histogram>

<histogram name="WebApp.Migration.ApplyResult"
    enum="WebAppApplyManifestMigrationResult" expires_after="2027-01-27">
  <owner>dibyapal@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the result of applying the final step of an app migration, where the
    source app is removed, and the migrated app is fully installed with OS
    integration. The migration is triggered only if the user confirms the
    changes through the web app identity update dialog. This operation will
    result in the web app's origin being updated, with name and icon also being
    updated if needed.
  </summary>
</histogram>

<histogram name="WebApp.Migrations.DefaultDisplayModeToPlatform" units="apps"
    expires_after="2026-12-19">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the number of web apps whose user display mode for the current
    platform was missing and was populated during the version 1 to 2 database
    migration. The value is derived from the other platform's setting or
    defaults to STANDALONE. Recorded on profile initialization if the migration
    runs.
  </summary>
</histogram>

<histogram name="WebApp.Migrations.DeprecatedLaunchHandlerToClientMode"
    units="count" expires_after="2026-10-25">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the number of web apps whose launch handler data was migrated from
    the deprecated route_to/navigate_existing_client fields to the client_mode
    field during database migration v2 to v3. Migration occurs once per user
    profile that existed before database version 3 was introduced. It occurs on
    database open, which happens on profile startup.
  </summary>
</histogram>

<histogram name="WebApp.Migrations.DisplayModeOverrideToDisplayOverrides"
    units="count" expires_after="2026-12-19">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the number of web apps whose display_mode_override field was
    migrated to the new display_overrides field during database migration v5 to
    v6. Migration occurs once per user profile that existed before database
    version 6 was introduced. It occurs on database open, which happens on
    profile startup.
  </summary>
</histogram>

<histogram name="WebApp.Migrations.InstallSourceAddUserInstalled" units="apps"
    expires_after="2026-12-19">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the number of web apps whose install source was migrated during the
    version 0 to 1 database migration. This migration ensures apps previously
    marked only as kSync are also marked as kUserInstalled, and removes the
    kSync source if sync is disabled. Recorded on profile initialization if the
    migration runs.
  </summary>
</histogram>

<histogram name="WebApp.Migrations.PartiallyInstalledAppsToCorrectState"
    units="apps" expires_after="2026-12-19">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the number of web apps whose install_state was corrected during the
    version 1 to 2 database migration. This migration changes the state from
    INSTALLED_WITH_OS_INTEGRATION to INSTALLED_WITHOUT_OS_INTEGRATION if the app
    lacked necessary OS integration state data (like shortcuts). Recorded on
    profile initialization if the migration runs.
  </summary>
</histogram>

<histogram name="WebApp.Migrations.PendingInfoWasIgnoredMigrated" units="count"
    expires_after="2027-02-14">
  <owner>dibyapal@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the number of web apps whose ignore state in pending manifest update
    information was not set during database migration v3 to v4. Migration occurs
    once per user profile that existed before database version 4 was introduced.
    It occurs on database open, which happens on profile startup.
  </summary>
</histogram>

<histogram name="WebApp.Migrations.PendingUpdateInfoIconDataCorrupted"
    units="count" expires_after="2027-01-10">
  <owner>dibyapal@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the number of web apps whose icon states for stored pending updates
    were found to be corrupted during database migration v4 to v5. Migration
    occurs once per user profile that existed before database version 5 was
    introduced. It occurs on database open, which happens on profile startup.
  </summary>
</histogram>

<histogram name="WebApp.Migrations.RelativeManifestIdFragmentRemoved"
    units="count" expires_after="2027-04-18">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the number of web apps whose relative_manifest_id field in the sync
    proto contained a fragment ('#...') which was removed during database
    migration v2 to v3. This indicates data correction. Migration occurs once
    per user profile that existed before database version 3 was introduced. It
    occurs on database open, which happens on profile startup.
  </summary>
</histogram>

<histogram name="WebApp.Migrations.RelativeManifestIdPopulatedOrFixed"
    units="count" expires_after="2026-10-25">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the number of web apps whose relative_manifest_id field in the sync
    proto was either missing and populated, or present but incorrect (e.g., had
    a fragment) and fixed during database migration v2 to v3. Migration occurs
    once per user profile that existed before database version 3 was introduced.
    It occurs on database open, which happens on profile startup.
  </summary>
</histogram>

<histogram name="WebApp.Migrations.ScopeRefQueryRemoved" units="count"
    expires_after="2026-12-27">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the number of web apps whose scope field contained a query ('?') or
    fragment ('#') component which was removed during database migration v2 to
    v3. Migration occurs once per user profile that existed before database
    version 3 was introduced. It occurs on database open, which happens on
    profile startup.
  </summary>
</histogram>

<histogram name="WebApp.Migrations.ShortcutAppsToDiy2" units="count"
    expires_after="2026-12-19">
  <owner>msiem@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the number of installed shortcuts that have been migrated to DIY
    apps. This is recorded on when the migration occurs, which happens when
    migrating from database version 1 to 2. Migration occurs during
    initialization of the Profile object when the web application system starts,
    which can happen either at chrome startup or when the user switches
    profiles. After migration, this does not happen again.
  </summary>
</histogram>

<histogram name="WebApp.MlInstall.DialogResponse"
    enum="WebAppMlInstallResponse" expires_after="2027-02-09">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the user's response to an install dialog, but only if the dialog was
    triggered by the ML promotion prediction system, or if the dialog was
    already showing when the ML prediction system returned a result. Note that
    in the second case, the ML prediction could have been anything, but in the
    first case, the prediction is always to show the installation UX. The ML
    prediction always happens after a page is loaded, relevant UKM metrics are
    gathered, and 3 seconds have gone past. If the result is 'blocked by
    guardrails', then that can only occur if there wasn't install UX showing
    when ML finished the prediction, and the programatic guardrails applied.
    This is reported irrespective of the ML result.
  </summary>
</histogram>

<histogram name="WebApp.MlInstall.InstallSource" enum="WebappInstallSource"
    expires_after="2027-09-10">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Recorded when a result occurs on an installation dialog that was either
    triggered via ML or was showing through another means when ML returned a
    classification result for the web contents.
  </summary>
</histogram>

<histogram name="WebApp.MLInstallPromo.UserResponse"
    enum="WebAppMlInstallResponse" expires_after="2027-04-25">
  <owner>dibyapal@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Similar to WebApp.MlInstall.DialogResponse, but measures the user response
    only if ML triggered the install dialog for PWAs. This is a subset of the
    information that will be sent to the Segmentation system for training, and
    is useful in understanding the exact outputs of the ML model.
  </summary>
</histogram>

<histogram name="Webapp.NavigationCapturing.FinalDisplay.Result"
    enum="NavigationCapturingDisplayMode" expires_after="2027-01-17">
  <owner>dibyapal@chromium.org</owner>
  <owner>desktop-pwas-team@google.com</owner>
  <summary>
    Records the final container of navigation capturing compared to the PWA's
    display mode once capturing has happened. Recorded once per navigation (post
    redirections) iff the navigation is handled by the web app system.
  </summary>
</histogram>

<histogram name="Webapp.NavigationCapturing.LaunchParamsConsumedTime"
    units="ms" expires_after="2026-12-06">
  <owner>dibyapal@chromium.org</owner>
  <owner>desktop-pwas-team@google.com</owner>
  <summary>
    Records the time it takes the browser process to start using the navigation
    capturing logic all the way to finally having the launch params for that
    navigation enqueued (if any), regardless of whether a navigation happened or
    not (like for apps with launch handler mode of focus-existing). This is not
    measured on reloads.
  </summary>
</histogram>

<histogram
    name="Webapp.NavigationCapturing.LaunchParamsConsumedTime.{DidNavigate}"
    units="ms" expires_after="2026-12-06">
  <owner>dibyapal@chromium.org</owner>
  <owner>desktop-pwas-team@google.com</owner>
  <summary>
    Records the time it takes the browser process to start using the navigation
    capturing logic all the way to finally having the launch params for that
    navigation enqueued (if any). This is fairly nuanced, and does not
    &quot;actually&quot; measure the entire time it takes for the navigation to
    happen, starting from link click all the way to navigation commit. This is
    recorded for all types of navigations if the navigation was captured and
    launch queues were enqueued, including ones that might arise out of
    reparenting into an app container. This is not persisted across reloads.
    Measurement is divided across whether navigation happened or not in the
    container the launch handlers are enqueued in.
  </summary>
  <token key="DidNavigate">
    <variant name="WithNavigation"
        summary="launch handlers were enqueued for an app container where a
                 new navigation happened"/>
    <variant name="WithoutNavigation"
        summary="launch handlers were enqueued for an existing app container
                 with no new navigation"/>
  </token>
</histogram>

<histogram name="Webapp.NavigationCapturing.Redirection.FinalResult"
    enum="NavigationCapturingRedirectionResult" expires_after="2027-01-03">
  <owner>dibyapal@chromium.org</owner>
  <owner>desktop-pwas-team@google.com</owner>
  <summary>
    Recorded the outcome of navigation capturing by the web app system whenever
    a navigation redirects.
  </summary>
</histogram>

<histogram name="Webapp.NavigationCapturing.Result"
    enum="NavigationCapturingResult" expires_after="2026-12-27">
  <owner>dibyapal@chromium.org</owner>
  <owner>desktop-pwas-team@google.com</owner>
  <summary>
    Recorded whenever a new navigation is triggered via a link click which is
    user modified (middle/shift) or a left click to determine if the web app
    system captured that navigation, and if so, what the chosen outcome was of
    capturing. This is measured regardless of whether a redirection happens for
    the navigation or not.
  </summary>
</histogram>

<histogram name="WebApp.NewCraftedAppInstalled.ByUser" enum="BooleanSuccess"
    expires_after="2027-02-09">
  <owner>dibyapal@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the result of an app installation flow for a site that is promotable
    and installable, that is triggered manually by the user. This is measured
    when the user completes the full installation flow, by opening the dialog
    from either the omnibox icon or the three dot menu option for installing the
    site, and performing an action on it.
  </summary>
</histogram>

<histogram name="WebApp.NewDiyAppInstalled.ByUser" enum="BooleanSuccess"
    expires_after="2027-04-25">
  <owner>dibyapal@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the result of a DIY app installation flow that is triggered manually
    by the user. This is measured when the user visits the three dot menu and
    clicks on `Install Page as App`.
  </summary>
</histogram>

<histogram name="WebApp.OpenMode" enum="WebAppOpenMode" expires_after="never">
<!-- expires-never: The dPWA team uses this from time to time to see how web
      apps are opened. davidbienvenu@ -->

  <owner>davidbienvenu@chromium.org</owner>
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Recorded when Chrome is launched to open a Web App; e.g., with --app-id.
    Metric describes how the web app opened; e.g., in a standalone window or in
    a tab. Previously recorded in Launch.Modes.
  </summary>
</histogram>

<histogram name="WebApp.OsSettingsUninstallRegistration.Result"
    enum="BooleanSuccess" expires_after="2027-07-13">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the result of registering a PWA with the OS's app management
    surface, which is used to offer uninstallation. This currently is only
    implemented on Windows, and this causes the app to appear in the control
    panel's list of installed applications. This is triggered during
    installations or updates. Updates can occur when the app's name has been
    changed, or when the system has determined that the user can uninstall this
    app. For example, if this app was installed by the user and policy (so the
    user cannot uninstall it, due to policy), but then the policy is removed.
    The app is now uninstallable by the user, so this will be registered with
    the OS.
  </summary>
</histogram>

<histogram name="WebApp.OsSettingsUninstallUnregistration.Result"
    enum="BooleanSuccess" expires_after="2027-06-30">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the result of unregistering a PWA with the OS's app management
    surface, which is used to offer uninstallation. This currently is only
    implemented on Windows, and this causes the app to no longer appear in the
    control panel's list of installed applications. This is triggered during
    uninstallations or updates. Updates can occur when the app's name has been
    changed, or when the system has determined that the user cannot uninstall
    this app. For example, if this app was installed by the user (which is
    uninstallable), but then it is force-installed by policy. The app is no
    longer uninstallable by the user, so this will be unregistered with the OS.
  </summary>
</histogram>

<histogram name="WebApp.OsSettingsUninstallUnregistration.WinOSResult"
    enum="WinRegistryErrorCode" expires_after="2027-08-02">
  <owner>dibyapal@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the windows result code for OS settings uninstallation
    unregistration when an app is being uninstalled, so that the app no longer
    appears on the control panel's list of installed applications. This is
    triggered during uninstallations or updates. Updates can occur when the
    app's name has been changed, or when the system has determined that the user
    cannot uninstall this app. For example, if this app was installed by the
    user (which is uninstallable), but then it is force-installed by policy. The
    app is no longer uninstallable by the user, so this will be unregistered
    with the OS.
  </summary>
</histogram>

<histogram name="WebApp.PendingUpdateData.ReadResult"
    enum="WebAppUpdateDataReadResult" expires_after="2026-11-12">
  <owner>dibyapal@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the result of reading pending update information to be shown on the
    app update dialog if there is a pending update for the app. This is recorded
    whenever the user clicks on the three dot menu and clicks on &quot;Review
    App Update&quot;.
  </summary>
</histogram>

<histogram name="WebApp.PredictableUpdateDialog.Result"
    enum="WebAppIdentityUpdateResult" expires_after="2027-02-07">
  <owner>dibyapal@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the result of the predictable app update dialog closing, either as
    an explicit user action on the dialog itself, or through other behavior of
    the system, like the browser window closing or the app being uninstalled.
  </summary>
</histogram>

<histogram name="WebApp.Preinstalled.AppToReplaceStillDefaultInstalledCount"
    units="apps" expires_after="2027-06-13">
  <owner>alancutter@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Warning: this histogram was expired from 2023-12-01 to 2026-07; data may be
    missing.

    Preinstalled web app configs can specify a set of apps to uninstall after
    the preinstalled web app is installed.

    This records how many apps that are meant to be uninstalled are still
    default installed; see https://crbug.com/1266234.

    This gets recorded at start up after preinstalled web apps configs have been
    applied.
  </summary>
</histogram>

<histogram name="WebApp.Preinstalled.AppToReplaceStillInstalledCount"
    units="apps" expires_after="2027-06-13">
  <owner>alancutter@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Warning: this histogram was expired from 2024-02-04 to 2026-07; data may be
    missing.

    Preinstalled web app configs can specify a set of apps to uninstall after
    the preinstalled web app is installed.

    This records how many apps that are meant to be uninstalled are still
    installed. This could occur due to manual installation by the user or Chrome
    app sync, see https://crbug.com/1266234.

    This gets recorded at start up after preinstalled web apps configs have been
    applied.
  </summary>
</histogram>

<histogram name="WebApp.Preinstalled.AppToReplaceStillInstalledInShelfCount"
    units="apps" expires_after="2027-06-13">
  <owner>alancutter@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Warning: this histogram was expired from 2023-12-01 to 2026-07; data may be
    missing.

    Preinstalled web app configs can specify a set of apps to uninstall after
    the preinstalled web app is installed.

    This records how many apps that are meant to be uninstalled are still
    installed and present in the Chrome OS shelf; see https://crbug.com/1266234.

    This gets recorded at start up after preinstalled web apps configs have been
    applied.
  </summary>
</histogram>

<histogram
    name="WebApp.Preinstalled.CalculatorForceMigration.ChromeAppAndWebAppInstalled"
    enum="BooleanSuccess" expires_after="2026-11-15">
  <owner>alancutter@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records whether the Calculator Chrome app is installed and the Calculator
    web app is preinstalled on the user's system. This is recorded at start up
    for ChromeOS only.
  </summary>
</histogram>

<histogram
    name="WebApp.Preinstalled.CalculatorForceMigration.ChromeAppNoWebAppInstalled"
    enum="BooleanSuccess" expires_after="2026-11-15">
  <owner>alancutter@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records whether the Calculator Chrome app is installed but the Calculator
    web app is not preinstalled on the user's system. This is recorded at start
    up for ChromeOS only.
  </summary>
</histogram>

<histogram
    name="WebApp.Preinstalled.CalculatorForceMigration.MigrationTriggered"
    enum="BooleanSuccess" expires_after="2026-11-15">
  <owner>alancutter@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records whether the Calculator Chrome app is present and needs migrating to
    the Calculator web app. This is recorded at start up for ChromeOS only.
  </summary>
</histogram>

<histogram name="WebApp.Preinstalled.CalculatorForceMigration.WebAppInstalled"
    enum="BooleanSuccess" expires_after="2026-11-15">
  <owner>alancutter@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records whether the Calculator web app is preinstalled on the user's system.
    This is recorded at start up for ChromeOS only.
  </summary>
</histogram>

<histogram name="WebApp.Preinstalled.ChromeAppMigrationNeeded"
    enum="BooleanSuccess" expires_after="2026-11-15">
  <owner>alancutter@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records whether an installed Chrome app is present and needs migrating to a
    corresponding preinstalled web app. This is recorded at start up for
    ChromeOS only.
  </summary>
</histogram>

<histogram name="WebApp.Preinstalled.ConfigErrorCount" units="apps"
    expires_after="2027-06-13">
  <owner>alancutter@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Warning: this histogram was expired from 2023-12-01 to 2026-07; data may be
    missing.

    Records how many preinstalled web app config files failed to parse as valid
    JSON with valid fields. See preinstalled_web_app_utils.cc ParseConfig().
    This is recorded at start up.
  </summary>
</histogram>

<histogram name="WebApp.Preinstalled.CorruptUserUninstallPrefsCount"
    units="apps" expires_after="2026-12-01">
  <owner>alancutter@chromium.org</owner>
  <owner>dibyapal@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records how many preinstalled web app configs have an entry in
    UserUninstalledPreinstalledWebAppPrefs while the associated web app is still
    installed by default. This state is an error state caused by:
    https://crbug.com/1359205 This is recorded at start up.
  </summary>
</histogram>

<histogram name="WebApp.Preinstalled.DisabledCount" units="apps"
    expires_after="2027-06-13">
  <owner>alancutter@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Warning: this histogram was expired from 2023-12-01 to 2026-07; data may be
    missing.

    Records how many preinstalled web apps configs were disabled for the device.
    This is recorded at start up.
  </summary>
</histogram>

<histogram name="WebApp.Preinstalled.DisabledReason"
    enum="PreinstalledAppDisabledReason" expires_after="2027-06-13">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Warning: this histogram was expired from 2023-12-01 to 2026-07; data may be
    missing.

    Records the reason a preinstalled installation was disabled. This is
    recorded at startup for every app in the preinstalled apps list, before it
    is sent to the ExternallyManagedAppManger for synchronization.
  </summary>
</histogram>

<histogram name="WebApp.Preinstalled.EnabledCount" units="apps"
    expires_after="2027-06-13">
  <owner>alancutter@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Warning: this histogram was expired from 2023-12-01 to 2026-07; data may be
    missing.

    Records how many preinstalled web apps configs were enabled for the device.
    This is recorded at start up.
  </summary>
</histogram>

<histogram name="WebApp.Preinstalled.InstallCount" units="apps"
    expires_after="2027-06-07">
  <owner>joelhockey@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records how many preinstalled web app installations were attempted during
    synchronization at startup. This is the size of install_results in the
    SynchronizeInstalledApps() callback.
  </summary>
</histogram>

<histogram name="WebApp.Preinstalled.UninstallAndReplaceCount" units="apps"
    expires_after="2027-06-13">
  <owner>alancutter@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Warning: this histogram was expired from 2023-12-01 to 2026-07; data may be
    missing.

    Records how many preinstalled web app installations uninstalled and replaced
    an old default app (web app or Chrome app). This corresponds to the
    &quot;uninstall_and_replace&quot; field in preinstalled web app configs.
  </summary>
</histogram>

<histogram name="WebApp.Preinstalled.UninstallAppRemovedCount" units="apps"
    expires_after="2027-06-07">
  <owner>joelhockey@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records how many of the preinstalled web app uninstalls attempted during
    synchronization at startup removed the app since it had no other install
    sources. This is the number of items set to kAppRemoved in uninstall_results
    in the SynchronizeInstalledApps() callback.
  </summary>
</histogram>

<histogram name="WebApp.Preinstalled.UninstallSourceRemovedCount" units="apps"
    expires_after="2027-06-07">
  <owner>joelhockey@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records how many of the preinstalled web app uninstalls attempted during
    synchronization at startup removed a single install source but left the app
    installed since other sources remained. This is the number of items set to
    kInstallSourceRemoved in uninstall_results in the SynchronizeInstalledApps()
    callback.
  </summary>
</histogram>

<histogram name="WebApp.Preinstalled.UninstallTotalCount" units="apps"
    expires_after="2027-06-07">
  <owner>joelhockey@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the total of how many preinstalled web app uninstalls were attempted
    during synchronization at startup. This is the total size of
    uninstall_results in the SynchronizeInstalledApps() callback.
  </summary>
</histogram>

<histogram name="WebApp.Preinstalled.UpdateOnStartup"
    enum="FetchManifestAndUpdateResult" expires_after="2026-10-24">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the result of the periodic update check for pre-installed web apps
    on browser startup. This is triggered at most once a week per app to ensure
    default apps can receive important updates, like origin migrations.
    Currently there is only one app that is checked.
  </summary>
</histogram>

<histogram name="WebApp.ProtocolHandlerPicker.Action"
    enum="ProtocolHandlerPickerAction" expires_after="2027-05-01">
  <owner>greengrape@google.com</owner>
  <owner>iwa-team@google.com</owner>
  <summary>
    Records the action taken by the protocol handler picker routine -- either
    show a dialog listing web apps capable of handling a particular protocol
    link (say, spotify://) or launch the preferred app directly (if any). Only
    relevant on ChromeOS.
  </summary>
</histogram>

<histogram name="WebApp.ProtocolHandlerPicker.DialogClosedReason"
    enum="ProtocolHandlerPickerDialogClosedReason" expires_after="2027-05-01">
  <owner>greengrape@google.com</owner>
  <owner>iwa-team@google.com</owner>
  <summary>
    Records the reason why the protocol handler picker dialog (shown to display
    web apps capable of handling a particular protocol link, say, spotify://)
    was closed. Only relevant on ChromeOS.
  </summary>
</histogram>

<histogram name="WebApp.ProtocolHandlerPicker.RememberSelection" enum="Boolean"
    expires_after="2027-05-01">
  <owner>greengrape@google.com</owner>
  <owner>iwa-team@google.com</owner>
  <summary>
    Records whether the &quot;always open link in this app&quot; checkbox was
    ticked by the user in the protocol handler picker dialog. Only relevant on
    ChromeOS.
  </summary>
</histogram>

<histogram name="WebApp.ProtocolHandlerPicker.TabClosed" enum="Boolean"
    expires_after="2027-05-01">
  <owner>greengrape@google.com</owner>
  <owner>iwa-team@google.com</owner>
  <summary>
    Records whether the protocol handler picker routine closed the current tab;
    this normally happens when protocol link is opened via window.open() with
    target=_blank. Only relevant on ChromeOS.
  </summary>
</histogram>

<histogram name="WebApp.ProtocolHandlers.Registration.Result"
    enum="BooleanSuccess" expires_after="2026-12-11">
  <owner>dibyapal@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the result of registering protocol handlers for PWAs. This is
    triggered during OS integration synchronization whenever new protocol
    handlers need to be registered for a recently installed app, when an user
    allows an app as a protocol handler from chrome://settings/handlers or
    during a manifest update process when the app previously did not have any
    protocol handlers defined for it.
  </summary>
</histogram>

<histogram name="WebApp.ProtocolHandlers.Unregistration.Result"
    enum="BooleanSuccess" expires_after="2027-09-10">
  <owner>dibyapal@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the result of unregistering protocol handlers for PWAs. This is
    triggered during OS integration synchronization whenever an app is being
    uninstalled, when a manifest update removes the approved protocol handlers
    from an app or when an user has disallowed the app from its protocol
    handlers from chrome://settings/handlers.
  </summary>
</histogram>

<histogram name="WebApp.ProtocolHandlers.Update.Result" enum="BooleanSuccess"
    expires_after="2027-09-10">
  <owner>dibyapal@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the result of updating protocol handlers for PWAs. This is triggered
    during OS integration synchronization whenever the protocol handlers for an
    existing app needs to be updated as part of the manifest update process or
    user approval changes from chrome://settings/handlers.
  </summary>
</histogram>

<histogram name="WebApp.ResolvePendingMigrationInfoCommand.UpdatesApplied"
    units="count" expires_after="2027-03-11">
  <owner>mek@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Counts the pending migration information entries updated by
    ResolveWebAppPendingMigrationInfoCommand. This command maintains consistent
    web app migration information, ensuring source and target apps correctly
    reflect each other's migration status. The command is scheduled on Chrome
    startup and upon installation of a new app, when a user visits a site with
    new or changed manifest migration information, particularly if it relates to
    an installed app and the metric is recorded on the completion of this
    command.
  </summary>
</histogram>

<histogram name="WebApp.RunOnOsLogin.CommandCompletionState"
    enum="RunOnOSLoginCommandCompletionState" expires_after="2027-07-15">
  <owner>dibyapal@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the completion state for Run On OS Login commands being scheduled.
    The command can be scheduled when the user changes the Run on OS login
    setting and/or when a policy is applied, and the completion state is
    recorded after the command either executes succesfully or fails prematurely.
  </summary>
</histogram>

<histogram name="WebApp.RunOnOsLogin.Registration.Result" enum="BooleanSuccess"
    expires_after="2026-11-09">
  <owner>dibyapal@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the result of registering Run On OS Login with the OS. This is
    triggered during OS integration whenever an app is being installed or the
    run on OS login state is being updated by the user from various UI surfaces
    like the chrome://apps context menu or from the app settings page for an
    app.
  </summary>
</histogram>

<histogram name="WebApp.RunOnOsLogin.Unregistration.Result"
    enum="BooleanSuccess" expires_after="2027-07-07">
  <owner>dibyapal@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the result of unregistering Run On OS Login with the OS. This is
    triggered during OS integration whenever an app is being uninstalled or the
    user is modifying the app preferences to not have it run on startup from the
    chrome://apps context menu or app settings page.
  </summary>
</histogram>

<histogram name="WebApp.Shortcuts.Creation.Result"
    enum="ShortcutsCreationResult" expires_after="2027-01-31">
  <owner>phillis@chromium.org</owner>
  <owner>dmurph@chromium.org</owner>
  <summary>Records the result of shortcut creation for PWA.</summary>
</histogram>

<histogram name="WebApp.Shortcuts.Delete.Result" enum="BooleanSuccess"
    expires_after="2027-07-26">
  <owner>dmurph@google.com</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    The result of deleting shortcuts for an installed PWA. Shortcuts are usually
    the icon in the operating system signifying the app or extension as an OS
    entity (e.g. on Mac, it's the .app file). Deleting shortcuts occurs when an
    app is uninstalled, which can be triggered by the user uninstalling the app,
    or by other 'app management' sources uninstalling an app (e.g. organization
    policy).
  </summary>
</histogram>

<histogram name="WebApp.Shortcuts.Update.Result" enum="BooleanSuccess"
    expires_after="2027-01-31">
  <owner>camdenking@google.com</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    The result of updating shortcuts for an installed PWA. Shortcuts are usually
    the icon in the operating system signifying the app or extension as an OS
    entity (e.g. on Mac, it's the .app file). Updating shortcuts occurs when an
    app is updated through the manifest update mechanism, when the Mac
    architecture changes, the shortcut version number has been updated, and when
    the user denies use of protocol handlers or file handlers, which occurs on
    launch of those respective features.

    Before 2024/06 on macOS some successes were incorrectly counted as failures.
  </summary>
</histogram>

<histogram name="WebApp.ShortcutsMenu.Win.Results"
    enum="ShortcutsMenuWinRegistrationResult" expires_after="2027-08-11">
  <owner>dibyapal@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the different results (both failure and success) that contributes to
    shortcuts menu registration on Windows.
  </summary>
</histogram>

<histogram name="WebApp.ShortcutsMenuBitmapAndItemCount.Results"
    enum="ShortcutsMenuIconAndDataDifference" expires_after="2027-07-13">
  <owner>dibyapal@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the difference in result between the shortcuts menu icons downloaded
    compared to the shortcuts menu item information stored in the web
    applications/ DB for that web app. This is measured during OS integration
    registration, unregistration or update during the Configuration phase of the
    sub managers. This is not measured when the app is not installed, or if
    there are no shortcuts menu items infos in the DB.
  </summary>
</histogram>

<histogram name="WebApp.ShortcutsMenuRegistration.Result" enum="BooleanSuccess"
    expires_after="2027-07-21">
  <owner>dibyapal@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>Records the result of shortcuts menu registration for PWAs.</summary>
</histogram>

<histogram name="WebApp.ShortcutsMenuUnregistered.Result" enum="BooleanSuccess"
    expires_after="2027-07-21">
  <owner>dibyapal@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the result of shortcuts menu unregistration for PWAs.
  </summary>
</histogram>

<histogram name="Webapp.Site.Intents.IntentPickerIconEvent"
    enum="IntentPickerIconEvent" expires_after="2026-11-30">
  <owner>dibyapal@chromium.org</owner>
  <owner>cpwa-team@google.com</owner>
  <summary>
    Records events associated with the intent picker icon in the omnibox.
    Recorded when the icon is shown or interacted with on Windows, Mac and Linux
    only.
  </summary>
</histogram>

<histogram name="WebApp.Sync.CorruptSyncEntity"
    enum="WebAppManifestIdParseResult" expires_after="2027-04-25">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records a sync data corruption that was detected after the storage key was
    parsed. This is detected on startup (if sync is already connected), when
    signing in to sync, or when sync sends changes to Chrome while it's already
    running and signed in.
  </summary>
</histogram>

<histogram name="WebApp.Sync.InvalidEntity" enum="WebAppStorageKeyParseResult"
    expires_after="2027-04-25">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records invalid sync data that was detected, and completely ignored /
    excluded from the WebAppSyncBridge logic. This is recorded potentially
    multiple times during startup (if sync is already connected), when signing
    in to sync, or when sync sends changes to Chrome while it's already running
    and signed in.
  </summary>
</histogram>

<histogram name="Webapp.SyncInitiatedUninstallResult" enum="BooleanSuccess"
    expires_after="2027-06-13">
  <owner>alancutter@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records uninstallation result for sync initiated uninstalls in the new
    USS-based web applications system.

    Warning: this histogram was expired from 2022-04-24 through M106, data may
    be missing.
  </summary>
</histogram>

<histogram name="Webapp.SystemApps.FreshInstallDuration" units="ms"
    expires_after="2027-01-17">
  <owner>renkens@google.com</owner>
  <owner>lt-web-apps-team@google.com</owner>
  <summary>
    Records the time taken to perform a fresh install of all system web apps. It
    measures the time from when we dispatch a call to install them, until we get
    all the installation results. This intentionally excludes the scenario where
    we don't request to install all the apps for consistency. Recorded in
    milliseconds, from 1 millisecond to 3 minutes.
  </summary>
</histogram>

<histogram name="Webapp.SystemApps.IconsAreHealthyInSession"
    enum="BooleanSuccess" expires_after="2026-12-08">
  <owner>renkens@google.com</owner>
  <owner>lt-web-apps-team@google.com</owner>
  <summary>
    Records whether system web app icons are healthy for each user session that
    has system web apps installed. Failure indicates that at least one app has
    missing or fallback icons.
  </summary>
</histogram>

<histogram name="Webapp.SystemApps.IconsFixedOnReinstall" enum="BooleanSuccess"
    expires_after="2026-12-08">
  <owner>renkens@google.com</owner>
  <owner>lt-web-apps-team@google.com</owner>
  <summary>
    Records whether a reinstall fixes previously broken system web app icons.
    This is recorded during icon check after a reinstall (when icons were broken
    in the last session).
  </summary>
</histogram>

<histogram name="WebApp.TotalIconsMemory.DownloadedForUpdate" units="MB"
    expires_after="2027-09-29">
  <owner>dibyapal@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Measures the total sizes of icons downloaded as part of the manifest update
    process when triggered for web apps, for both the old and the new
    predictable algorithm. This is not a measure of the network resources used
    while downloading, as that is affected by various factors like whether the
    image is served from the cache or not, or whether the image was compressed
    or not. But, since the goal of predictable app updating is to reduce the
    number of icons being fetched, this is still a reliable measurement.
  </summary>
</histogram>

<histogram name="WebApp.TrustedIcons.ReadResult" enum="BooleanSuccess"
    expires_after="2027-01-17">
  <owner>dibyapal@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Measures the result of reading trusted icons from the disk, whenever there
    is a need to fetch the app's icon to be shown on UX surfaces. A value of
    false indicates that the reading happened from the fallback path. This is
    measured in a variety of cases, like while loading chrome://apps. This is
    not measured if the trusted icon feature is disabled.
  </summary>
</histogram>

<histogram name="WebApp.Uninstall.NonSyncIncompleteCount"
    units="Partially uninstalled webapps" expires_after="2027-06-13">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Warning: this histogram was expired from 2024-03-17 to 2026-07; data may be
    missing.

    Records the number of incomplete uninstalls that were found on startup.
    These web apps are immediately scheduled for uninstall again. This does NOT
    include webapps that uninstalled from sync - any incomplete uninstalls from
    sync cannot be counted.
  </summary>
</histogram>

<histogram name="WebApp.Uninstall.Result" enum="BooleanSuccess"
    expires_after="never">
<!-- expires-never: The dPWA team uses this in chirp alerts to ensure
      uninstallation doesn't start failing. dmurph@ -->

  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records if uninstallation was successful. Uninstall can occur from the user,
    enterprise policy, device policy, or chrome sync.
  </summary>
</histogram>

<histogram name="Webapp.UninstallDialogAction"
    enum="WebappUninstallDialogAction" expires_after="2026-12-08">
  <owner>benwells@chromium.org</owner>
  <owner>dominickn@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the user response to the dialog shown when uninstalling a web app.

    Warning: this histogram was expired from 2022-05-22 through M106, data may
    be missing.
  </summary>
</histogram>

<histogram name="WebApp.Update.ApplyPendingManifestUpdateResult"
    enum="WebAppApplyPendingManifestUpdateResult" expires_after="2027-01-17">
  <owner>msiem@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the result of web app manifest updating a security sensitive field
    (name and icons). These fields are stored as a pending update info through
    the manifest silent update command. Manifest updates for pending update
    infos are triggered only if the user confirms the changes through the web
    app update dialog. This operation can result in either or both the app name
    or icons updating.
  </summary>
</histogram>

<histogram name="Webapp.Update.ManifestSilentUpdateCheckResult"
    enum="WebAppManifestSilentUpdateCheckResult" expires_after="2027-01-17">
  <owner>msiem@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the result of web app manifest silently updating during page
    navigations. Manifest updates are triggered on every page load of an app.
    Note that &quot;App up to date&quot; is returned if there is no new manifest
    (no changes to current). This operation can result in non-security sensitive
    (not name and icon) fields of an installed web app to be updated. Updates to
    security sensitive fields (name and icon) are saved as pending updates for
    the user to confirm the changes.
  </summary>
</histogram>

<histogram name="WebApp.UpdateDialog.MigrateForced.UserAction"
    enum="WebAppIdentityUpdateResult" expires_after="2027-03-11">
  <owner>mek@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the user action taken on seeing the PWA migration dialog,
    specifically when the developer has specified the migration should be
    'forced'. This blocking dialog is shown to the user immediately when they
    launch the app.
  </summary>
</histogram>

<histogram name="WebApp.UpdateDialog.MigrateSuggested.UserAction"
    enum="WebAppIdentityUpdateResult" expires_after="2027-03-11">
  <owner>mek@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the user action taken on seeing the PWA migration dialog,
    specifically when the developer has specified the migration should be
    'suggested'. This dialog is shown to the user after the select the 'update'
    menu item in the 3-dot menu of an installed PWA window.
  </summary>
</histogram>

<histogram name="WebApp.UpdateReviewDialog.TriggerToShowTime" units="ms"
    expires_after="2027-01-24">
  <owner>dibyapal@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the time taken in milliseconds for the user to click on the 3-dot
    menu option for reviewing an app update to the update dialog actually
    showing up. Useful for measuring the latency of certain things like icon
    reading from disk as well as icon masking.
  </summary>
</histogram>

<histogram name="WebApp.ValidatedOriginAssociations.Updated"
    enum="UpdateValidatedOriginAssociationsResult" expires_after="2027-06-01">
  <owner>dibyapal@google.com</owner>
  <owner>vkrot@google.com</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the outcome of validating a web app's scope extensions and migration
    sources. Logged results indicate if the validation succeeded, left
    unvalidated items, was skipped because it was unneeded, or was throttled by
    the daily network check limit. The command is triggered on every launch of
    an Isolated Web App.
  </summary>
</histogram>

<histogram name="Webapp.WebAppOriginAssociationFetchResult"
    enum="WebAppOriginAssociationFetchResult" expires_after="2027-03-05">
  <owner>mek@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the result of web app origin association file fetch when url
    handlers are present. Happens when PWA is installed or updated.
  </summary>
</histogram>

<histogram name="Webapp.WebAppOriginAssociationParseResult"
    enum="WebAppOriginAssociationParseResult" expires_after="2027-03-05">
  <owner>mek@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the result of web app origin association file parsing. Happens after
    an web app origin association file is fetched.
  </summary>
</histogram>

<histogram name="Webapp.WebAppUrlLoaderPrepareForLoadResult"
    enum="WebAppUrlLoaderResult" expires_after="2027-03-01">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the result of WebAppUrlLoader::PrepareForLoad(). This is called
    before a command attempts to load a url in the WebAppProvider system, which
    can occur during installation, update, sync install, or other actions that
    (usually) use a background web contents. This metric is NOT recorded if the
    WebAppUrlLoader is destroyed during the network fetch.
  </summary>
</histogram>

<histogram name="Webapp.WebAppUrlLoaderResult" enum="WebAppUrlLoaderResult"
    expires_after="2027-03-01">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the result of WebAppUrlLoader::LoadUrl(). This is called whenever a
    command attempts to load a url in the WebAppProvider system, which can occur
    during installation, update, sync install, or other actions that (usually)
    use a background web contents. This metric is NOT recorded if the
    WebAppUrlLoader is destroyed during the network fetch.
  </summary>
</histogram>

<!-- TODO(crbug.com/477993292): Reevaluate/clean up web install telemetry after Origin Trials -->

<histogram name="WebApp.WebInstallApi.InstallType" enum="WebInstallServiceType"
    expires_after="2026-12-16">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <owner>liahiscock@microsoft.com</owner>
  <owner>kristinlee@microsoft.com</owner>
  <summary>
    Records the type of install flow that was initiated by navigator.install().
    There are two possible flows - installing the user's current page, or
    installing another page in the background. This is triggered by running
    navigator.install() via JS on a page.
  </summary>
</histogram>

<histogram name="WebApp.WebInstallApi.Result" enum="WebInstallServiceResult"
    expires_after="2026-12-16">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <owner>liahiscock@microsoft.com</owner>
  <owner>kristinlee@microsoft.com</owner>
  <summary>
    Records the results of an install flow triggered by running
    navigator.install() via JS on a page.
  </summary>
</histogram>

<histogram name="WebApp.WebInstallElement.InstallType"
    enum="WebInstallServiceType" expires_after="2027-09-22">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <owner>liahiscock@microsoft.com</owner>
  <owner>kristinlee@microsoft.com</owner>
  <summary>
    Records the type of install flow that was initiated by the &lt;install&gt;
    element. There are two possible flows - installing the user's current page,
    or installing another page in the background. This is triggered by a user
    clicking or otherwise activating the element on a page.
  </summary>
</histogram>

<histogram name="WebApp.WebInstallElement.Result"
    enum="WebInstallServiceResult" expires_after="2027-09-22">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <owner>liahiscock@microsoft.com</owner>
  <owner>kristinlee@microsoft.com</owner>
  <summary>
    Records the results of an install flow triggered by a user clicking or
    otherwise activating the web install element, &lt;install&gt;, on a page.
  </summary>
</histogram>

<histogram name="WebApp.WebInstallService.{EntryPoint}.InstallType"
    enum="WebInstallServiceType" expires_after="2027-09-22">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <owner>liahiscock@microsoft.com</owner>
  <owner>kristinlee@microsoft.com</owner>
  <summary>
    Records the type of install flow that was initiated from {EntryPoint}. There
    are two possible flows - installing the user's current page, or installing
    another page.
  </summary>
  <token key="EntryPoint" variants="WebInstallEntryPoint"/>
</histogram>

<histogram name="WebApp.WebInstallService.{EntryPoint}.Result"
    enum="WebInstallServiceResult" expires_after="2027-09-22">
  <owner>dmurph@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <owner>liahiscock@microsoft.com</owner>
  <owner>kristinlee@microsoft.com</owner>
  <summary>
    Records the results of an install flow that was initiated from {EntryPoint}.
  </summary>
  <token key="EntryPoint" variants="WebInstallEntryPoint"/>
</histogram>

<histogram name="WebAppProto.Parse.Result" enum="WebAppProtoParseResult"
    expires_after="2026-11-10">
  <owner>dibyapal@chromium.org</owner>
  <owner>pwa-team@google.com</owner>
  <summary>
    Records the result of parsing a web app from a protobuf object into an
    object stored on memory. Recorded whenever web apps are loaded on system
    startup from the disk, or when web apps are synced on startup.
  </summary>
</histogram>

</histograms>

</histogram-configuration>
