Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(709)

Unified Diff: third_party/WebKit/Source/modules/media_controls/MediaControlsOrientationLockDelegate.cpp

Issue 2936413002: [Media Controls] Add UMA for rotate-to-fullscreen feature (Closed)
Patch Set: Add description Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/media_controls/MediaControlsRotateToFullscreenDelegate.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/media_controls/MediaControlsOrientationLockDelegate.cpp
diff --git a/third_party/WebKit/Source/modules/media_controls/MediaControlsOrientationLockDelegate.cpp b/third_party/WebKit/Source/modules/media_controls/MediaControlsOrientationLockDelegate.cpp
index bc5ab11aac7fbfd432ed0b52a8d9039772c4e4b3..e15b5d0677a0c694813d99fede1f608a9e9983a1 100644
--- a/third_party/WebKit/Source/modules/media_controls/MediaControlsOrientationLockDelegate.cpp
+++ b/third_party/WebKit/Source/modules/media_controls/MediaControlsOrientationLockDelegate.cpp
@@ -72,6 +72,13 @@ void RecordLockResult(LockResultMetrics metrics) {
lock_result_histogram.Count(static_cast<int>(metrics));
}
+void RecordAutoRotateEnabled(bool enabled) {
+ DEFINE_STATIC_LOCAL(
+ BooleanHistogram, auto_rotate_histogram,
+ ("Media.Video.FullscreenOrientationLock.AutoRotateEnabled"));
+ auto_rotate_histogram.Count(enabled);
+}
+
// WebLockOrientationCallback implementation that will not react to a success
// nor a failure.
class DummyScreenOrientationCallback : public WebLockOrientationCallback {
@@ -210,6 +217,8 @@ void MediaControlsOrientationLockDelegate::GotIsAutoRotateEnabledByUser(
bool enabled) {
monitor_.reset();
+ RecordAutoRotateEnabled(enabled);
+
if (!enabled) {
// Since the user has locked their screen orientation, prevent
// MediaControlsRotateToFullscreenDelegate from exiting fullscreen by not
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/media_controls/MediaControlsRotateToFullscreenDelegate.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698