Commit c87cdc98 authored by Etienne Bergeron's avatar Etienne Bergeron Committed by Commit Bot

Add user action to traces under UI category

This CL is adding a trace event for each user RecordComputedAction
(see base/metrics/user_metrics.cc). This is helping to understand the
user interaction.

These events are activated under the "UI" tracing category.

R=asvitkine@chromium.org, oysteine@chromium.org

Change-Id: I180372c97293ce4da1d290e70f065d54da23bb2f
Reviewed-on: https://chromium-review.googlesource.com/c/1327218Reviewed-by: default avataroysteine <oysteine@chromium.org>
Reviewed-by: default avatarAlexei Svitkine <asvitkine@chromium.org>
Commit-Queue: Etienne Bergeron <etienneb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608047}
parent 802201cb
......@@ -13,6 +13,7 @@
#include "base/location.h"
#include "base/macros.h"
#include "base/threading/thread_checker.h"
#include "base/trace_event/trace_event.h"
namespace base {
namespace {
......@@ -29,6 +30,7 @@ void RecordAction(const UserMetricsAction& action) {
}
void RecordComputedAction(const std::string& action) {
TRACE_EVENT_INSTANT1("ui", "UserEvent", TRACE_EVENT_SCOPE_GLOBAL, "action", action);
if (!g_task_runner.Get()) {
DCHECK(g_callbacks.Get().empty());
return;
......
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