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

Unified Diff: chrome/browser/ui/ash/metrics/user_metrics_recorder_proxy.h

Issue 1124153007: Added the Ash.Tab.TimeBetweenSwitchToExistingTabUserActions histogram to track time between tab swit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed UserMetricsRecorderProxy from ash. Created 5 years, 7 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/ash/metrics/user_metrics_recorder_proxy.h
diff --git a/chrome/browser/ui/ash/metrics/user_metrics_recorder_proxy.h b/chrome/browser/ui/ash/metrics/user_metrics_recorder_proxy.h
new file mode 100644
index 0000000000000000000000000000000000000000..32bc89b3ccab1b88c9f66ccb278e7f33d1e06e82
--- /dev/null
+++ b/chrome/browser/ui/ash/metrics/user_metrics_recorder_proxy.h
@@ -0,0 +1,46 @@
+// 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_ASH_METRICS_USER_METRICS_RECORDER_PROXY_H_
+#define CHROME_BROWSER_UI_ASH_METRICS_USER_METRICS_RECORDER_PROXY_H_
+
+#include <string>
Alexei Svitkine (slow) 2015/05/15 19:19:56 Is this include needed?
bruthig 2015/05/15 19:36:21 Removed.
+
+#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;
+} // namespace content
+
+namespace ash {
+
+// A bridge proxy between chrome/browser events and ash::UserMetricsRecorder.
+class UserMetricsRecorderProxy : public chrome::BrowserListObserver,
+ public TabStripModelObserver {
+ public:
+ UserMetricsRecorderProxy();
+ ~UserMetricsRecorderProxy() override;
+
+ // chrome::BroswerListObserver:
+ void OnBrowserAdded(Browser* browser) override;
+ void OnBrowserRemoved(Browser* browser) override;
+
+ // TabStripModelObserver:
+ void ActiveTabChanged(content::WebContents* old_contents,
+ content::WebContents* new_contents,
+ int index,
+ int reason) override;
+
+ private:
+ // Called when a new tab becomes active due to a user gesture.
tdanderson 2015/05/15 19:23:09 nit: using the term "new tab" could be confusing s
bruthig 2015/05/15 19:36:21 Done.
+ void OnTabSwitchedByUserGesture();
+
+ DISALLOW_COPY_AND_ASSIGN(UserMetricsRecorderProxy);
+};
+
+} // namespace ash
+
+#endif // CHROME_BROWSER_UI_ASH_METRICS_USER_METRICS_RECORDER_PROXY_H_

Powered by Google App Engine
This is Rietveld 408576698