Chromium Code Reviews| 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..6cd5bd4a4b86eb4c4cfc766aea968ea8a20a5199 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,22 @@ 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.BubbleReshowsPerSession."; |
|
dominickn
2016/02/23 03:05:54
Nit: should this be a constant in the anonymous na
Matt Giuca
2016/02/23 04:37:01
Done.
|
| + histogram_name += HistogramSuffix(); |
| + 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 |