Commit 6e682107 authored by Francois Beaufort's avatar Francois Beaufort Committed by Commit Bot

Track how many times a video capture device is accessed simultaneously.

This CL tracks the number of times a video capture device is accessed
simultaneously to understand if Chrome should add some restrictions
around simultaneous camera access.

Test: Go to chrome://histrograms/Media.VideoCapture.NumberOfClients
and access camera device from several tabs.

Change-Id: I1a4bb4020ff13bd1ddc54a59094379115e2f65e5
Bug: 1134077
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2440514
Commit-Queue: François Beaufort <beaufort.francois@gmail.com>
Reviewed-by: default avatarGuido Urdaneta <guidou@chromium.org>
Reviewed-by: default avatarBrian White <bcwhite@chromium.org>
Cr-Commit-Position: refs/heads/master@{#814600}
parent aff4dacf
...@@ -333,6 +333,8 @@ void VideoCaptureController::AddClient( ...@@ -333,6 +333,8 @@ void VideoCaptureController::AddClient(
// client. // client.
if (state_ != blink::VIDEO_CAPTURE_STATE_ERROR) { if (state_ != blink::VIDEO_CAPTURE_STATE_ERROR) {
controller_clients_.push_back(std::move(client)); controller_clients_.push_back(std::move(client));
base::UmaHistogramCounts100("Media.VideoCapture.NumberOfClients",
controller_clients_.size());
} }
} }
......
...@@ -3626,6 +3626,16 @@ reviews. Googlers can read more about this at go/gwsq-gerrit. ...@@ -3626,6 +3626,16 @@ reviews. Googlers can read more about this at go/gwsq-gerrit.
</summary> </summary>
</histogram> </histogram>
<histogram name="Media.VideoCapture.NumberOfClients" units="units"
expires_after="M95">
<owner>fbeaufort@chromium.org</owner>
<owner>guidou@chromium.org</owner>
<summary>
Number of times a video capture device is accessed simultaneously. Recorded
when video capturing starts.
</summary>
</histogram>
<histogram name="Media.VideoCapture.Width" units="pixels" expires_after="M82"> <histogram name="Media.VideoCapture.Width" units="pixels" expires_after="M82">
<owner>mcasas@chromium.org</owner> <owner>mcasas@chromium.org</owner>
<summary> <summary>
......
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