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

Unified Diff: chrome/browser/ui/exclusive_access/exclusive_access_manager.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_manager.cc
diff --git a/chrome/browser/ui/exclusive_access/exclusive_access_manager.cc b/chrome/browser/ui/exclusive_access/exclusive_access_manager.cc
index 8537e5b19eeb2b95c93247004ac2028634ee8e9e..1e06f868d7aaac6cc40b6c6aaa721ad34a26cf44 100644
--- a/chrome/browser/ui/exclusive_access/exclusive_access_manager.cc
+++ b/chrome/browser/ui/exclusive_access/exclusive_access_manager.cc
@@ -150,3 +150,38 @@ void ExclusiveAccessManager::ExitExclusiveAccess() {
fullscreen_controller_.ExitExclusiveAccessToPreviousState();
mouse_lock_controller_.LostMouseLock();
}
+
+void ExclusiveAccessManager::RecordBubbleReshownUMA(
+ ExclusiveAccessBubbleType type) {
+ // Figure out whether each of fullscreen, mouselock is in effect.
+ bool fullscreen = false;
+ bool mouselock = false;
+ switch (type) {
+ case EXCLUSIVE_ACCESS_BUBBLE_TYPE_NONE:
+ case EXCLUSIVE_ACCESS_BUBBLE_TYPE_MOUSELOCK_BUTTONS:
+ // None in effect.
+ break;
+ case EXCLUSIVE_ACCESS_BUBBLE_TYPE_FULLSCREEN_BUTTONS:
+ case EXCLUSIVE_ACCESS_BUBBLE_TYPE_FULLSCREEN_EXIT_INSTRUCTION:
+ case EXCLUSIVE_ACCESS_BUBBLE_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION:
+ case EXCLUSIVE_ACCESS_BUBBLE_TYPE_EXTENSION_FULLSCREEN_EXIT_INSTRUCTION:
+ // Only fullscreen in effect.
+ fullscreen = true;
+ break;
+ case EXCLUSIVE_ACCESS_BUBBLE_TYPE_MOUSELOCK_EXIT_INSTRUCTION:
+ // Only mouselock in effect.
+ mouselock = true;
+ break;
+ case EXCLUSIVE_ACCESS_BUBBLE_TYPE_FULLSCREEN_MOUSELOCK_BUTTONS:
+ case EXCLUSIVE_ACCESS_BUBBLE_TYPE_FULLSCREEN_MOUSELOCK_EXIT_INSTRUCTION:
+ // Both in effect.
+ fullscreen = true;
+ mouselock = true;
+ break;
+ }
+
+ if (fullscreen)
+ fullscreen_controller_.RecordBubbleReshownUMA();
+ if (mouselock)
+ mouse_lock_controller_.RecordBubbleReshownUMA();
+}

Powered by Google App Engine
This is Rietveld 408576698