Commit f5fc8971 authored by Wei Li's avatar Wei Li Committed by Commit Bot

UIDevTools: Add UMA metrics to record usage

Use user action metric UI_DevTools_Connect to record each time a
connection to UI DevTools server is established. The frequency of
such connections would help us gauge the usage of the UI DevTools.

BUG=746562

Change-Id: Icd54da4f23b3cc0268113de48931a803af53632c
Reviewed-on: https://chromium-review.googlesource.com/c/1299007
Commit-Queue: Wei Li <weili@chromium.org>
Reviewed-by: default avatarSadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: default avatarMark Pearson <mpearson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#603629}
parent 1bb2a50f
......@@ -11,6 +11,8 @@
#include "base/command_line.h"
#include "base/format_macros.h"
#include "base/message_loop/message_loop.h"
#include "base/metrics/user_metrics.h"
#include "base/metrics/user_metrics_action.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "base/values.h"
......@@ -156,7 +158,7 @@ void UiDevToolsServer::MakeServer(
// HttpServer::Delegate Implementation
void UiDevToolsServer::OnConnect(int connection_id) {
NOTIMPLEMENTED();
base::RecordAction(base::UserMetricsAction("UI_DevTools_Connect"));
}
void UiDevToolsServer::OnHttpRequest(
......
......@@ -19858,6 +19858,14 @@ should be able to be added at any place in this file.
</description>
</action>
<action name="UI_DevTools_Connect">
<owner>weili@chromium.org</owner>
<description>
Records when a user connects to a UI DevTools HTTP server, i.e., by clicking
on the 'inspect' link on chrome://inspect/#other.
</description>
</action>
<action name="Underline">
<owner>Please list the metric's owners. Add more owner tags as needed.</owner>
<description>Please enter the description of this user action.</description>
......
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