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

Unified Diff: chrome/browser/ui/exclusive_access/exclusive_access_controller_base.h

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.h
diff --git a/chrome/browser/ui/exclusive_access/exclusive_access_controller_base.h b/chrome/browser/ui/exclusive_access/exclusive_access_controller_base.h
index 11e8e0d19d1fb207945f30716dfe012c7d315c9b..975c8c6f49ad2721586716581be308e8d78f92cb 100644
--- a/chrome/browser/ui/exclusive_access/exclusive_access_controller_base.h
+++ b/chrome/browser/ui/exclusive_access/exclusive_access_controller_base.h
@@ -65,6 +65,11 @@ class ExclusiveAccessControllerBase : public content::NotificationObserver {
const content::NotificationSource& source,
const content::NotificationDetails& details) override;
+ // For recording UMA.
+ void RecordBubbleReshownUMA();
+ // Called when the exclusive access session ends.
+ void RecordExitingUMA();
+
protected:
void SetTabWithExclusiveAccess(content::WebContents* tab);
@@ -77,6 +82,10 @@ class ExclusiveAccessControllerBase : public content::NotificationObserver {
// if necessary.
virtual void NotifyTabExclusiveAccessLost() = 0;
+ // Records the BubbleReshowsPerSession data to the appropriate histogram for
+ // this controller.
+ virtual void RecordBubbleReshowsHistogram(int bubble_reshow_count) = 0;
+
private:
void UpdateNotificationRegistrations();
@@ -84,7 +93,10 @@ class ExclusiveAccessControllerBase : public content::NotificationObserver {
content::NotificationRegistrar registrar_;
- content::WebContents* tab_with_exclusive_access_;
+ content::WebContents* tab_with_exclusive_access_ = nullptr;
+
+ // The number of bubble re-shows for the current session (reset upon exiting).
+ int bubble_reshow_count_ = 0;
DISALLOW_COPY_AND_ASSIGN(ExclusiveAccessControllerBase);
};

Powered by Google App Engine
This is Rietveld 408576698