Commit 0342c626 authored by Mounir Lamouri's avatar Mounir Lamouri Committed by Commit Bot

Media Controls: remove Media.Video.FullscreenOrientationLock.LockResult histogram.

Bug: 975915
Change-Id: I94378d89139bc57bd755820e074fb3f110862049
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1691326Reviewed-by: default avatarSteven Holte <holte@chromium.org>
Commit-Queue: Mounir Lamouri <mlamouri@chromium.org>
Cr-Commit-Position: refs/heads/master@{#676596}
parent 3fb7e388
......@@ -50,16 +50,6 @@ enum class MetadataAvailabilityMetrics {
kMax = 3
};
// These values are used for histograms. Do not reorder.
enum class LockResultMetrics {
kAlreadyLocked = 0, // Frame already has a lock.
kPortrait = 1, // Locked to portrait.
kLandscape = 2, // Locked to landscape.
// Keep at the end.
kMax = 3
};
void RecordMetadataAvailability(MetadataAvailabilityMetrics metrics) {
DEFINE_STATIC_LOCAL(
EnumerationHistogram, metadata_histogram,
......@@ -68,13 +58,6 @@ void RecordMetadataAvailability(MetadataAvailabilityMetrics metrics) {
metadata_histogram.Count(static_cast<int>(metrics));
}
void RecordLockResult(LockResultMetrics metrics) {
DEFINE_STATIC_LOCAL(EnumerationHistogram, lock_result_histogram,
("Media.Video.FullscreenOrientationLock.LockResult",
static_cast<int>(LockResultMetrics::kMax)));
lock_result_histogram.Count(static_cast<int>(metrics));
}
void RecordAutoRotateEnabled(bool enabled) {
DEFINE_STATIC_LOCAL(
BooleanHistogram, auto_rotate_histogram,
......@@ -144,21 +127,14 @@ void MediaControlsOrientationLockDelegate::MaybeLockOrientation() {
auto* controller =
ScreenOrientationController::From(*GetDocument().GetFrame());
if (controller->MaybeHasActiveLock()) {
RecordLockResult(LockResultMetrics::kAlreadyLocked);
if (controller->MaybeHasActiveLock())
return;
}
locked_orientation_ = ComputeOrientationLock();
DCHECK_NE(locked_orientation_, kWebScreenOrientationLockDefault);
controller->lock(locked_orientation_,
std::make_unique<DummyScreenOrientationCallback>());
if (locked_orientation_ == kWebScreenOrientationLockLandscape)
RecordLockResult(LockResultMetrics::kLandscape);
else
RecordLockResult(LockResultMetrics::kPortrait);
MaybeListenToDeviceOrientation();
}
......
......@@ -59166,6 +59166,9 @@ uploading your change for review.
<histogram name="Media.Video.FullscreenOrientationLock.LockResult"
enum="VideoFullscreenOrientationLockResult" expires_after="M77">
<obsolete>
Removed from code as of 07/2019.
</obsolete>
<owner>mlamouri@chromium.org</owner>
<summary>
Result of the orientation lock attempt when a video enters fullscreen.
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