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

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

Issue 1286433004: Introduce TabStripModelStatsRecorder class to record tab interaction stats (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove {} / rebase Created 5 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/ui/tabs/tab_strip_model_stats_recorder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
new file mode 100644
index 0000000000000000000000000000000000000000..3032fd2bd2c1eb19b5daa3cb529448e50ce5e555
--- /dev/null
+++ b/chrome/browser/ui/tabs/tab_strip_model_stats_recorder.h
@@ -0,0 +1,34 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_STATS_RECORDER_H_
+#define CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_STATS_RECORDER_H_
+
+#include "base/macros.h"
+
+#include "chrome/browser/ui/browser_list_observer.h"
+#include "chrome/browser/ui/tabs/tab_strip_model_observer.h"
+
+namespace content {
+class WebContents;
+}
+
+// TabStripModelStatsRecorder records user tab interaction stats.
+// In particular, we record tab's lifetime and state transition probability to
+// study user interaction with background tabs. (crbug.com/517335)
+class TabStripModelStatsRecorder : public chrome::BrowserListObserver,
+ public TabStripModelObserver {
+ public:
+ TabStripModelStatsRecorder();
+ ~TabStripModelStatsRecorder() override;
+
+ private:
+ // chrome::BrowserListObserver implementation.
+ void OnBrowserAdded(Browser* browser) override;
+ void OnBrowserRemoved(Browser* browser) override;
+
+ DISALLOW_COPY_AND_ASSIGN(TabStripModelStatsRecorder);
+};
+
+#endif // CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_STATS_RECORDER_H_
« no previous file with comments | « no previous file | chrome/browser/ui/tabs/tab_strip_model_stats_recorder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698