Commit d9391fb9 authored by Liviu Tinta's avatar Liviu Tinta Committed by Commit Bot

Add histogram for browser-verification status of user activation.

We are running a Finch trial and we would like to know how many times
the browser process fails to verify User Activation.

Bug: 1098466, 1098467
Change-Id: I28572dd8bf5eb600efa13732bd8f64a316f2d3ba
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2418974
Commit-Queue: Liviu Tinta <liviutinta@chromium.org>
Reviewed-by: default avatarSadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: default avatarMustaq Ahmed <mustaq@chromium.org>
Reviewed-by: default avatarAlexei Svitkine <asvitkine@chromium.org>
Cr-Commit-Position: refs/heads/master@{#811441}
parent 851e81fb
......@@ -13,6 +13,7 @@
#include "base/feature_list.h"
#include "base/lazy_instance.h"
#include "base/macros.h"
#include "base/metrics/histogram_functions.h"
#include "base/metrics/histogram_macros.h"
#include "base/stl_util.h"
#include "base/strings/string_util.h"
......@@ -656,8 +657,12 @@ bool FrameTreeNode::UpdateUserActivationState(
update_result = NotifyUserActivation(notification_type);
break;
case blink::mojom::UserActivationUpdateType::
kNotifyActivationPendingBrowserVerification:
if (VerifyUserActivation()) {
kNotifyActivationPendingBrowserVerification: {
const bool user_activation_verified = VerifyUserActivation();
// Add UMA metric for when browser user activation verification succeeds
base::UmaHistogramBoolean("Event.BrowserVerifiedUserActivation",
user_activation_verified);
if (user_activation_verified) {
update_result = NotifyUserActivation(
blink::mojom::UserActivationNotificationType::kNone);
update_type = blink::mojom::UserActivationUpdateType::kNotifyActivation;
......@@ -667,7 +672,7 @@ bool FrameTreeNode::UpdateUserActivationState(
// unrelated tests that inject event to renderer fail.
return false;
}
break;
} break;
case blink::mojom::UserActivationUpdateType::kClearActivation:
update_result = ClearUserActivation();
break;
......
......@@ -75,6 +75,18 @@ reviews. Googlers can read more about this at go/gwsq-gerrit.
</summary>
</histogram>
<histogram name="Event.BrowserVerifiedUserActivation" enum="BooleanSuccess"
expires_after="2020-12-31">
<owner>liviutinta@chromium.org</owner>
<owner>mustaq@chromium.org</owner>
<owner>input-dev@chromium.org</owner>
<summary>
Records whether Browser User Activation Verification is successful or not.
We are interested in how many times the Browser User Activation Verification
fails vs how many times it succeeds.
</summary>
</histogram>
<histogram name="Event.ClickNotFiredDueToDomManipulation" enum="BooleanHit"
expires_after="M82">
<owner>nzolghadr@chromium.org</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