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

Unified Diff: chrome/browser/ui/exclusive_access/fullscreen_controller.cc

Issue 1721633002: Added UMA collection for fullscreen / mouse lock bubble re-shows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved histogram recording into each subclass. (Fix DCHECK / incorrect histogram recording.) Created 4 years, 10 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
Index: chrome/browser/ui/exclusive_access/fullscreen_controller.cc
diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
index 95f0d40ea09f9fbcb43b350fadbdba96db594f98..1f223d7a8e3091ecf05917df4f94a7f5dc836a02 100644
--- a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
+++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
@@ -7,6 +7,7 @@
#include "base/bind.h"
#include "base/command_line.h"
#include "base/location.h"
+#include "base/metrics/histogram_macros.h"
#include "base/single_thread_task_runner.h"
#include "base/thread_task_runner_handle.h"
#include "build/build_config.h"
@@ -40,6 +41,13 @@ using base::UserMetricsAction;
using content::RenderViewHost;
using content::WebContents;
+namespace {
+
+const char kBubbleReshowsHistogramName[] =
+ "ExclusiveAccess.BubbleReshowsPerSession.Fullscreen";
+
+} // namespace
+
FullscreenController::FullscreenController(ExclusiveAccessManager* manager)
: ExclusiveAccessControllerBase(manager),
state_prior_to_tab_fullscreen_(STATE_INVALID),
@@ -420,6 +428,11 @@ void FullscreenController::NotifyTabExclusiveAccessLost() {
}
}
+void FullscreenController::RecordBubbleReshowsHistogram(
+ int bubble_reshow_count) {
+ UMA_HISTOGRAM_COUNTS_100(kBubbleReshowsHistogramName, bubble_reshow_count);
+}
+
void FullscreenController::ToggleFullscreenModeInternal(
FullscreenInternalOption option) {
#if defined(OS_WIN)
@@ -499,6 +512,7 @@ void FullscreenController::EnterFullscreenModeInternal(
}
void FullscreenController::ExitFullscreenModeInternal() {
+ RecordExitingUMA();
toggled_into_fullscreen_ = false;
#if defined(OS_MACOSX)
// Mac windows report a state change instantly, and so we must also clear

Powered by Google App Engine
This is Rietveld 408576698