Commit 10b21b4a authored by Yutaka Hirano's avatar Yutaka Hirano Committed by Commit Bot

Collect the end-state of keepalive requests, with redirect count

Proposal: https://docs.google.com/document/d/1XYsa2W1zjWIvrpuAq7IA1wEGZIvbJLoiPF6rMob01Tg/edit

Bug: 1147816
Change-Id: I0c030b7ba142ceb72a4cc8a2425bad2118689f9a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2532016
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Auto-Submit: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: default avatarRobert Kaplow <rkaplow@chromium.org>
Reviewed-by: default avatarDominic Battré <battre@chromium.org>
Cr-Commit-Position: refs/heads/master@{#827776}
parent 36011949
......@@ -156,6 +156,7 @@ WebRequestProxyingURLLoaderFactory::InProgressRequest::~InProgressRequest() {
ukm::builders::Extensions_WebRequest_KeepaliveRequestFinished(
ukm_source_id_)
.SetState(state_)
.SetNumRedirects(num_redirects_)
.Record(ukm::UkmRecorder::Get());
}
}
......@@ -306,6 +307,7 @@ void WebRequestProxyingURLLoaderFactory::InProgressRequest::FollowRedirect(
}
}
++num_redirects_;
RestartInternal();
}
......
......@@ -197,6 +197,8 @@ class WebRequestProxyingURLLoaderFactory
// lifetime.
base::Optional<net::AuthCredentials> auth_credentials_;
int num_redirects_ = 0;
const bool for_cors_preflight_ = false;
// If |has_any_extra_headers_listeners_| is set to true, the request will be
......
......@@ -4297,6 +4297,19 @@ be describing additional metrics about the same event.
Whether and how keepalive requests are blocked. Recorded when a keepalive
request finishes.
</summary>
<metric name="NumRedirects">
<summary>
The number of redirects the request experienced. This is up to 21, as
specified at https://fetch.spec.whatwg.org/#http-redirect-fetch .
</summary>
<aggregation>
<history>
<statistics>
<enumeration/>
</statistics>
</history>
</aggregation>
</metric>
<metric name="State" enum="ExtensionInProgressRequestState">
<summary>
The final state of the request.
......
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