Commit 18887aee authored by Gavin Williams's avatar Gavin Williams Committed by Chromium LUCI CQ

scanning: Add Scan app to DefaultAppLaunch metrics

Adds Scan app to the list of essential apps being tracked.

Bug: 1059779
Change-Id: I4042ac0e6d8c46516b4456f50eb56264984546b9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2575424Reviewed-by: default avatarDominick Ng <dominickn@chromium.org>
Reviewed-by: default avatarRobert Kaplow <rkaplow@chromium.org>
Commit-Queue: Gavin Williams <gavinwill@chromium.org>
Cr-Commit-Position: refs/heads/master@{#834732}
parent 155b41e0
......@@ -25,6 +25,8 @@ namespace {
// The default app's histogram name. This is used for logging so do
// not change the order of this enum.
// https://docs.google.com/document/d/1WJ-BjlVOM87ygIsdDBCyXxdKw3iS5EtNGm1fWiWhfIs
// If you're adding to this enum with the intention that it will be logged,
// update the DefaultAppName enum listing in tools/metrics/histograms/enums.xml.
enum class DefaultAppName {
kCalculator = 10,
kText = 11,
......@@ -58,10 +60,11 @@ enum class DefaultAppName {
// This is our test SWA. It's only installed in tests.
kMockSystemApp = 39,
kStadia = 40,
kScanningApp = 41,
// Add any new values above this one, and update kMaxValue to the highest
// enumerator value.
kMaxValue = kStadia,
kMaxValue = kScanningApp,
};
void RecordDefaultAppLaunch(DefaultAppName default_app_name,
......@@ -255,6 +258,10 @@ void RecordAppLaunch(const std::string& app_id,
RecordDefaultAppLaunch(DefaultAppName::kYouTubeMusic, launch_source);
else if (app_id == web_app::kStadiaAppId)
RecordDefaultAppLaunch(DefaultAppName::kStadia, launch_source);
#if BUILDFLAG(IS_CHROMEOS_ASH)
else if (app_id == web_app::kScanningAppId)
RecordDefaultAppLaunch(DefaultAppName::kScanningApp, launch_source);
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
// Above are default apps; below are built-in apps.
......
......@@ -71,6 +71,9 @@ constexpr char kOsSettingsAppId[] = "odknhmnlageboeamepcngndbggdpaobj";
// "https://books.google.com/ebooks/app"))
constexpr char kPlayBooksAppId[] = "jglfhlbohpgcbefmhdmpancnijacbbji";
// Generated as: web_app::GenerateAppIdFromURL(GURL("chrome://scanning/"))
constexpr char kScanningAppId[] = "cdkahakpgkdaoffdmfgnhgomkelkocfo";
// Generated as: web_app::GenerateAppIdFromURL(GURL(
// "chrome://settings/"))
constexpr char kSettingsAppId[] = "inogagmajamaleonmanpkpkkigmklfad";
......
......@@ -16418,6 +16418,7 @@ metrics consent we also won't be able to send UMA metrics. -->
<int value="37" label="YouTube"/>
<int value="38" label="YouTube Music"/>
<int value="40" label="Stadia"/>
<int value="41" label="ScanningApp"/>
</enum>
<enum name="DefaultBrowserAsyncAttemptResult">
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment