Commit ca8e668c authored by Lily Chen's avatar Lily Chen Committed by Commit Bot

Add UKM metrics logging for button clicked on the Page Info Bubble

Bug: 1018919
Change-Id: I7f8ab0ce175824bc65473d44e2d4774cc3d96f16
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1891335Reviewed-by: default avatarBalazs Engedy <engedy@chromium.org>
Reviewed-by: default avatarRobert Kaplow <rkaplow@chromium.org>
Commit-Queue: Lily Chen <chlily@chromium.org>
Cr-Commit-Position: refs/heads/master@{#711314}
parent 58174a8d
...@@ -69,6 +69,7 @@ ...@@ -69,6 +69,7 @@
#include "components/strings/grit/components_chromium_strings.h" #include "components/strings/grit/components_chromium_strings.h"
#include "components/strings/grit/components_strings.h" #include "components/strings/grit/components_strings.h"
#include "components/subresource_filter/core/browser/subresource_filter_features.h" #include "components/subresource_filter/core/browser/subresource_filter_features.h"
#include "components/ukm/content/source_url_recorder.h"
#include "components/url_formatter/elide_url.h" #include "components/url_formatter/elide_url.h"
#include "content/public/browser/browser_thread.h" #include "content/public/browser/browser_thread.h"
#include "content/public/common/content_switches.h" #include "content/public/common/content_switches.h"
...@@ -77,6 +78,8 @@ ...@@ -77,6 +78,8 @@
#include "net/cert/x509_certificate.h" #include "net/cert/x509_certificate.h"
#include "net/ssl/ssl_cipher_suite_names.h" #include "net/ssl/ssl_cipher_suite_names.h"
#include "net/ssl/ssl_connection_status_flags.h" #include "net/ssl/ssl_connection_status_flags.h"
#include "services/metrics/public/cpp/ukm_builders.h"
#include "services/metrics/public/cpp/ukm_recorder.h"
#include "third_party/boringssl/src/include/openssl/ssl.h" #include "third_party/boringssl/src/include/openssl/ssl.h"
#include "ui/base/l10n/l10n_util.h" #include "ui/base/l10n/l10n_util.h"
#include "url/origin.h" #include "url/origin.h"
...@@ -452,6 +455,13 @@ void PageInfo::RecordPageInfoAction(PageInfoAction action) { ...@@ -452,6 +455,13 @@ void PageInfo::RecordPageInfoAction(PageInfoAction action) {
UMA_HISTOGRAM_ENUMERATION("WebsiteSettings.Action", action, PAGE_INFO_COUNT); UMA_HISTOGRAM_ENUMERATION("WebsiteSettings.Action", action, PAGE_INFO_COUNT);
if (web_contents()) {
ukm::builders::PageInfoBubble(
ukm::GetSourceIdForWebContentsDocument(web_contents()))
.SetActionTaken(action)
.Record(ukm::UkmRecorder::Get());
}
base::UmaHistogramEnumeration( base::UmaHistogramEnumeration(
security_state::GetSafetyTipHistogramName( security_state::GetSafetyTipHistogramName(
"Security.SafetyTips.PageInfo.Action", safety_tip_info_.status), "Security.SafetyTips.PageInfo.Action", safety_tip_info_.status),
......
...@@ -5332,6 +5332,21 @@ be describing additional metrics about the same event. ...@@ -5332,6 +5332,21 @@ be describing additional metrics about the same event.
</metric> </metric>
</event> </event>
<event name="PageInfoBubble">
<owner>chlily@chromium.org</owner>
<summary>
Recorded when an action on the Page Info Bubble (aka Origin Info Bubble or
WebsiteSettings Bubble) is taken. May be recorded multiple times for a
single page visit.
</summary>
<metric name="ActionTaken" enum="WebsiteSettingsAction">
<summary>
Records an enum value representing which action on the Page Info Bubble
was taken.
</summary>
</metric>
</event>
<event name="PageLoad" singular="True"> <event name="PageLoad" singular="True">
<owner>bmcquade@chromium.org</owner> <owner>bmcquade@chromium.org</owner>
<summary> <summary>
......
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