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

Unified Diff: chrome/browser/ui/exclusive_access/exclusive_access_controller_base.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/exclusive_access_controller_base.cc
diff --git a/chrome/browser/ui/exclusive_access/exclusive_access_controller_base.cc b/chrome/browser/ui/exclusive_access/exclusive_access_controller_base.cc
index 3559f376a678aa8b5671f2a8e86a92ff8d2964b1..37c9dae5775309820416d6285c87536b122a9b7c 100644
--- a/chrome/browser/ui/exclusive_access/exclusive_access_controller_base.cc
+++ b/chrome/browser/ui/exclusive_access/exclusive_access_controller_base.cc
@@ -16,8 +16,7 @@ using content::WebContents;
ExclusiveAccessControllerBase::ExclusiveAccessControllerBase(
ExclusiveAccessManager* manager)
- : manager_(manager), tab_with_exclusive_access_(nullptr) {
-}
+ : manager_(manager) {}
ExclusiveAccessControllerBase::~ExclusiveAccessControllerBase() {
}
@@ -66,6 +65,19 @@ void ExclusiveAccessControllerBase::Observe(
ExitExclusiveAccessIfNecessary();
}
+void ExclusiveAccessControllerBase::RecordBubbleReshownUMA() {
+ ++bubble_reshow_count_;
+}
+
+void ExclusiveAccessControllerBase::RecordExitingUMA() {
+ // Record the number of bubble reshows during this session. Only if simplified
+ // fullscreen is enabled.
+ if (ExclusiveAccessManager::IsSimplifiedFullscreenUIEnabled())
+ RecordBubbleReshowsHistogram(bubble_reshow_count_);
+
+ bubble_reshow_count_ = 0;
+}
+
void ExclusiveAccessControllerBase::SetTabWithExclusiveAccess(
WebContents* tab) {
// Tab should never be replaced with another tab, or

Powered by Google App Engine
This is Rietveld 408576698