diff options
| author | joenotcharles <joenotcharles@chromium.org> | 2016-02-08 17:50:44 -0800 |
|---|---|---|
| committer | Commit bot <commit-bot@chromium.org> | 2016-02-09 01:51:42 +0000 |
| commit | 850904a0f10197a0ee95f182bfdb18ea838872a4 (patch) | |
| tree | 0ac547b9977733c4ae7a154e7abf278cbfe046ef /components/app_modal/javascript_dialog_manager.h | |
| parent | 68cb1ac807ef0a317eae6494da2db94376f03b1b (diff) | |
| download | chromium_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.h | 6 |
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); }; |
