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

Unified Diff: chrome/browser/ui/tabs/tab_strip_model_stats_recorder.h

Issue 1638013002: Add UMA histograms to track very brief or frequent tabs and JS dialogs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename histograms; ignore blocked JS dialogs Created 4 years, 11 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/tabs/tab_strip_model_stats_recorder.h
diff --git a/chrome/browser/ui/tabs/tab_strip_model_stats_recorder.h b/chrome/browser/ui/tabs/tab_strip_model_stats_recorder.h
index fbb980dc9f081d01fa98f9787e8cc862eb9562cf..060433e07eee859d16a8cb032e8f726e157d4834 100644
--- a/chrome/browser/ui/tabs/tab_strip_model_stats_recorder.h
+++ b/chrome/browser/ui/tabs/tab_strip_model_stats_recorder.h
@@ -8,6 +8,7 @@
#include <vector>
#include "base/macros.h"
+#include "base/time/time.h"
#include "chrome/browser/ui/browser_tab_strip_tracker.h"
#include "chrome/browser/ui/tabs/tab_strip_model_observer.h"
@@ -67,6 +68,12 @@ class TabStripModelStatsRecorder : public TabStripModelObserver {
BrowserTabStripTracker browser_tab_strip_tracker_;
+ // Record a single create and close timestamp to track the time between tab
+ // creation. (Tabs actually are not opened in a strict sequence so these
+ // timestamps are not accurate, but they'll suffice for an estimate.)
+ base::TimeTicks last_creation_time_;
+ base::TimeTicks last_close_time_;
+
DISALLOW_COPY_AND_ASSIGN(TabStripModelStatsRecorder);
};

Powered by Google App Engine
This is Rietveld 408576698