Commit 27992d9e authored by Sophey Dong's avatar Sophey Dong Committed by Commit Bot

[SharingHub] Add metrics for favicon generation in preview.

Bug: 1141583
Change-Id: I4ae4990ccafec8585aa91000b69a0f99ba06fed5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2493123Reviewed-by: default avatarKyle Milka <kmilka@chromium.org>
Reviewed-by: default avatarRobert Kaplow <rkaplow@chromium.org>
Commit-Queue: Sophey Dong <sophey@chromium.org>
Cr-Commit-Position: refs/heads/master@{#820240}
parent 9ff1fb36
......@@ -264,6 +264,7 @@ class ShareSheetBottomSheetContent implements BottomSheetContent, OnItemClickLis
if (icon == null) {
setDefaultIconForPreview(
AppCompatResources.getDrawable(mContext, R.drawable.generic_favicon));
RecordUserAction.record("SharingHubAndroid.GenericFaviconShown");
} else {
int size = mContext.getResources().getDimensionPixelSize(
R.dimen.sharing_hub_preview_inner_icon_size);
......@@ -271,6 +272,7 @@ class ShareSheetBottomSheetContent implements BottomSheetContent, OnItemClickLis
ImageView imageView = this.getContentView().findViewById(R.id.image_preview);
imageView.setImageBitmap(scaledIcon);
centerIcon(imageView);
RecordUserAction.record("SharingHubAndroid.LinkFaviconShown");
}
}
......
......@@ -21153,6 +21153,23 @@ should be able to be added at any place in this file.
</description>
</action>
<action name="SharingHubAndroid.GenericFaviconShown">
<owner>sophey@chromium.org</owner>
<owner>src/components/send_tab_to_self/OWNERS</owner>
<description>
The generic favicon was shown in the sharing hub preview. This means the
link's favicon was not available.
</description>
</action>
<action name="SharingHubAndroid.LinkFaviconShown">
<owner>sophey@chromium.org</owner>
<owner>src/components/send_tab_to_self/OWNERS</owner>
<description>
The link's favicon was shown in the sharing hub preview.
</description>
</action>
<action name="SharingHubAndroid.LinkToTextSelected">
<owner>gayane@chromium.org</owner>
<owner>src/components/send_tab_to_self/OWNERS</owner>
......
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