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

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: 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..473ec78830e91e959752c0721c5438eef69c9165 100644
--- a/chrome/browser/ui/exclusive_access/exclusive_access_controller_base.cc
+++ b/chrome/browser/ui/exclusive_access/exclusive_access_controller_base.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/ui/exclusive_access/exclusive_access_controller_base.h"
+#include "base/metrics/histogram_macros.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/exclusive_access/exclusive_access_manager.h"
@@ -16,8 +17,7 @@ using content::WebContents;
ExclusiveAccessControllerBase::ExclusiveAccessControllerBase(
ExclusiveAccessManager* manager)
- : manager_(manager), tab_with_exclusive_access_(nullptr) {
-}
+ : manager_(manager) {}
ExclusiveAccessControllerBase::~ExclusiveAccessControllerBase() {
}
@@ -66,6 +66,23 @@ void ExclusiveAccessControllerBase::Observe(
ExitExclusiveAccessIfNecessary();
}
+void ExclusiveAccessControllerBase::BubbleReshown() {
+ ++bubble_reshow_count_;
+}
+
+void ExclusiveAccessControllerBase::Exiting() {
+ // Record the number of bubble reshows during this session. Only if simplified
+ // fullscreen is enabled.
+ if (ExclusiveAccessManager::IsSimplifiedFullscreenUIEnabled()) {
+ std::string histogram_name = "ExclusiveAccess.";
+ histogram_name += HistogramPrefix();
+ histogram_name += "BubbleReshowsPerSession";
dominickn 2016/02/23 00:05:27 Nit: Please rename this to ExclusiveAccess.BubbleR
Matt Giuca 2016/02/23 02:50:28 Done.
+ UMA_HISTOGRAM_COUNTS_100(histogram_name, 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