summaryrefslogtreecommitdiffstats
path: root/components/app_modal/javascript_dialog_manager.h
diff options
context:
space:
mode:
authorjoenotcharles <joenotcharles@chromium.org>2016-02-08 17:50:44 -0800
committerCommit bot <commit-bot@chromium.org>2016-02-09 01:51:42 +0000
commit850904a0f10197a0ee95f182bfdb18ea838872a4 (patch)
tree0ac547b9977733c4ae7a154e7abf278cbfe046ef /components/app_modal/javascript_dialog_manager.h
parent68cb1ac807ef0a317eae6494da2db94376f03b1b (diff)
downloadchromium_src-850904a0f10197a0ee95f182bfdb18ea838872a4.zip
chromium_src-850904a0f10197a0ee95f182bfdb18ea838872a4.tar.gz
chromium_src-850904a0f10197a0ee95f182bfdb18ea838872a4.tar.bz2
Add UMA histograms to track very brief or frequent tabs and JS dialogs.
Review URL: https://codereview.chromium.org/1638013002 Cr-Commit-Position: refs/heads/master@{#374262}
Diffstat (limited to 'components/app_modal/javascript_dialog_manager.h')
-rw-r--r--components/app_modal/javascript_dialog_manager.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/components/app_modal/javascript_dialog_manager.h b/components/app_modal/javascript_dialog_manager.h
index b204aaf8..9d70bd3 100644
--- a/components/app_modal/javascript_dialog_manager.h
+++ b/components/app_modal/javascript_dialog_manager.h
@@ -8,6 +8,7 @@
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/singleton.h"
+#include "base/time/time.h"
#include "components/app_modal/javascript_app_modal_dialog.h"
#include "content/public/browser/javascript_dialog_manager.h"
@@ -80,6 +81,11 @@ class JavaScriptDialogManager : public content::JavaScriptDialogManager {
scoped_ptr<JavaScriptNativeDialogFactory> native_dialog_factory_;
scoped_ptr<JavaScriptDialogExtensionsClient> extensions_client_;
+ // Record a single create and close timestamp to track the time between
+ // dialogs. (Since Javascript dialogs are modal, this is even accurate!)
+ base::TimeTicks last_close_time_;
+ base::TimeTicks last_creation_time_;
+
DISALLOW_COPY_AND_ASSIGN(JavaScriptDialogManager);
};