Commit fe27ed66 authored by pdyson's avatar pdyson Committed by Commit bot

Log the creation of dialog boxes using DialogDelegateView and BubbleDialogDelegateView.

BUG=705331

Review-Url: https://codereview.chromium.org/2867683002
Cr-Commit-Position: refs/heads/master@{#471137}
parent 9601a9bb
...@@ -11909,6 +11909,14 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. ...@@ -11909,6 +11909,14 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
</summary> </summary>
</histogram> </histogram>
<histogram name="Dialog.Create" enum="BooleanCreated">
<owner>pdyson@chromium.org</owner>
<summary>
Counts the number times dialog boxes are created using a particular parent
class.
</summary>
</histogram>
<histogram name="Dialog.Creation" enum="DialogName"> <histogram name="Dialog.Creation" enum="DialogName">
<owner>pdyson@chromium.org</owner> <owner>pdyson@chromium.org</owner>
<summary> <summary>
...@@ -85471,6 +85479,18 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. ...@@ -85471,6 +85479,18 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
<affected-histogram name="DesktopIOSPromotion.VariationSigninReason"/> <affected-histogram name="DesktopIOSPromotion.VariationSigninReason"/>
</histogram_suffixes> </histogram_suffixes>
<histogram_suffixes name="DialogTypes" separator="." ordering="prefix">
<suffix name="DialogDelegateView"
label="Counts dialog boxes created using DialogDelegateView. These are
a subset of those created with DialogDelegate."/>
<suffix name="BubbleDialogDelegateView"
label="Counts dialog boxes created using BubbleDialogDelegateView.
These are a subset of those created with DialogDelegateView
(which, in turn, are a subset of those created with
DialogDelegate)."/>
<affected-histogram name="Dialog.Create"/>
</histogram_suffixes>
<histogram_suffixes name="DiskUsagePerUserCount" separator="."> <histogram_suffixes name="DiskUsagePerUserCount" separator=".">
<suffix name="1User" label="Only 1 user exists on device."/> <suffix name="1User" label="Only 1 user exists on device."/>
<suffix name="2Users" label="2 users exist on device."/> <suffix name="2Users" label="2 users exist on device."/>
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include "ui/views/bubble/bubble_dialog_delegate.h" #include "ui/views/bubble/bubble_dialog_delegate.h"
#include "base/metrics/histogram_macros.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "ui/accessibility/ax_node_data.h" #include "ui/accessibility/ax_node_data.h"
#include "ui/base/default_style.h" #include "ui/base/default_style.h"
...@@ -221,6 +222,7 @@ BubbleDialogDelegateView::BubbleDialogDelegateView(View* anchor_view, ...@@ -221,6 +222,7 @@ BubbleDialogDelegateView::BubbleDialogDelegateView(View* anchor_view,
if (anchor_view) if (anchor_view)
SetAnchorView(anchor_view); SetAnchorView(anchor_view);
UpdateColorsFromTheme(GetNativeTheme()); UpdateColorsFromTheme(GetNativeTheme());
UMA_HISTOGRAM_BOOLEAN("Dialog.BubbleDialogDelegateView.Create", true);
} }
gfx::Rect BubbleDialogDelegateView::GetBubbleBounds() { gfx::Rect BubbleDialogDelegateView::GetBubbleBounds() {
......
...@@ -243,6 +243,7 @@ ui::AXRole DialogDelegate::GetAccessibleWindowRole() const { ...@@ -243,6 +243,7 @@ ui::AXRole DialogDelegate::GetAccessibleWindowRole() const {
DialogDelegateView::DialogDelegateView() { DialogDelegateView::DialogDelegateView() {
// A WidgetDelegate should be deleted on DeleteDelegate. // A WidgetDelegate should be deleted on DeleteDelegate.
set_owned_by_client(); set_owned_by_client();
UMA_HISTOGRAM_BOOLEAN("Dialog.DialogDelegateView.Create", true);
} }
DialogDelegateView::~DialogDelegateView() {} DialogDelegateView::~DialogDelegateView() {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment