Commit 03e3aa54 authored by Joel Hockey's avatar Joel Hockey Committed by Chromium LUCI CQ

Log WEBUI_UNTRUSTED_CONTEXT extension functions

Log WEBUI_UNTRUSTED_CONTEXT extension functions such as the
terminalPrivate API used by chrome-untrusted://terminal with new UMA
Extensions.Functions.WebUIUntrustedCalls.

TBR=mlippautz@chromium.org

Bug: 1161001
Change-Id: I188a364c129605205662ab780ab273a894f268ee
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2599649
Commit-Queue: Joel Hockey <joelhockey@chromium.org>
Reviewed-by: default avatarGiovanni Ortuño Urquidi <ortuno@chromium.org>
Reviewed-by: default avatarDevlin <rdevlin.cronin@chromium.org>
Auto-Submit: Joel Hockey <joelhockey@chromium.org>
Cr-Commit-Position: refs/heads/master@{#839712}
parent af6570ea
......@@ -338,6 +338,10 @@ void ExtensionFunctionDispatcher::DispatchWithCallbackInternal(
if (function->source_context_type() == Feature::WEBUI_CONTEXT) {
base::UmaHistogramSparse("Extensions.Functions.WebUICalls",
function->histogram_value());
} else if (function->source_context_type() ==
Feature::WEBUI_UNTRUSTED_CONTEXT) {
base::UmaHistogramSparse("Extensions.Functions.WebUIUntrustedCalls",
function->histogram_value());
}
// Skip the quota, event page, activity logging stuff if there
......
......@@ -1751,7 +1751,8 @@ reviews. Googlers can read more about this at go/gwsq-gerrit.
<owner>extensions-core@chromium.org</owner>
<summary>
Recorded when a component extension calls an extension API. Recorded once
per function call. See also Extensions.Functions.WebUICalls and
per function call. See also Extensions.Functions.WebUICalls,
Extensions.Functions.WebUIUntrustedCalls, and
Extensions.Functions.ExtensionCalls.
</summary>
</histogram>
......@@ -1764,7 +1765,8 @@ reviews. Googlers can read more about this at go/gwsq-gerrit.
<owner>extensions-core@chromium.org</owner>
<summary>
Recorded when a non-component extension calls an extension API. Recorded
once per function call. See also Extensions.Functions.WebUICalls and
once per function call. See also Extensions.Functions.WebUICalls,
Extensions.Functions.WebUIUntrustedCalls, and
Extensions.Functions.ComponentExtensionCalls.
</summary>
</histogram>
......@@ -1878,7 +1880,22 @@ reviews. Googlers can read more about this at go/gwsq-gerrit.
<owner>extensions-core@chromium.org</owner>
<summary>
Recorded when a WebUI context calls an extension API. Recorded once per
function call. See also Extensions.Functions.ComponentExtensionCalls and
function call. See also Extensions.Functions.WebUIUntrustedCalls,
Extensions.Functions.ComponentExtensionCalls and
Extensions.Functions.ExtensionCalls.
</summary>
</histogram>
<histogram name="Extensions.Functions.WebUIUntrustedCalls"
enum="ExtensionFunctions" expires_after="never">
<!-- expires-never: Used for monitoring extension API usage. -->
<owner>rdevlin.cronin@chromium.org</owner>
<owner>extensions-core@chromium.org</owner>
<summary>
Recorded when a WebUI context calls an extension API. Recorded once per
function call. See also Extensions.Functions.WebUICalls,
Extensions.Functions.ComponentExtensionCalls and
Extensions.Functions.ExtensionCalls.
</summary>
</histogram>
......
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