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

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: 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
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..04ec651d483f431371b92942f887d3e9a6dcd804
--- /dev/null
+++ b/chrome/browser/ui/tabs/tab_strip_model_stats_recorder.h
@@ -0,0 +1,33 @@
+// 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 "chrome/browser/ui/browser_list_observer.h"
+#include "chrome/browser/ui/tabs/tab_strip_model_observer.h"
+
+namespace content {
+class WebContents;
+}
+
+namespace chrome {
sky 2015/08/11 15:27:42 Don't use chrome namespace. If you want motivation
kouhei (in TOK) 2015/08/12 04:38:29 Done.
+
+// 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 BrowserListObserver,
sky 2015/08/11 15:27:42 Combine this with chrome/browser/ui/ash/metrics/ch
kouhei (in TOK) 2015/08/12 04:38:28 I'm not sure what is the best solution here. I fo
+ public TabStripModelObserver {
+ public:
+ TabStripModelStatsRecorder();
+ ~TabStripModelStatsRecorder() override;
+
+ // chrome::BrowserListObserver implementation.
sky 2015/08/11 15:27:42 Make this private, add DISALLOW_COPY_AND_ASSIGN.
kouhei (in TOK) 2015/08/12 04:38:28 Done.
+ void OnBrowserAdded(Browser* browser) override;
+ void OnBrowserRemoved(Browser* browser) override;
+};
+
+} // namespace chrome
+
+#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') | chrome/chrome_browser_ui.gypi » ('J')

Powered by Google App Engine
This is Rietveld 408576698