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

Side by Side Diff: ash/metrics/task_switch_time_tracker.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: Fixed the branch that the diff was based on. 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ASH_METRICS_TASK_SWITCH_TIME_TRACKER_H_ 5 #ifndef ASH_METRICS_TASK_SWITCH_TIME_TRACKER_H_
6 #define ASH_METRICS_TASK_SWITCH_TIME_TRACKER_H_ 6 #define ASH_METRICS_TASK_SWITCH_TIME_TRACKER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 13
14 namespace base { 14 namespace base {
15 class HistogramBase; 15 class HistogramBase;
16 class TickClock; 16 class TickClock;
17 } 17 }
18 18
19 namespace ash { 19 namespace ash {
20 20
21 namespace test { 21 namespace test {
22 class TaskSwitchTimeTrackerTestAPI; 22 class ASH_EXPORT TaskSwitchTimeTrackerTestAPI;
23 } // namespace test 23 } // namespace test
24 24
25 // Tracks time deltas between task switches and records them in a histogram. 25 // Tracks time deltas between task switches and records them in a histogram.
26 class ASH_EXPORT TaskSwitchTimeTracker { 26 class ASH_EXPORT TaskSwitchTimeTracker {
27 public: 27 public:
28 // Create a TaskSwitchTimeTracker that will record data to the histogram with 28 // Create a TaskSwitchTimeTracker that will record data to the histogram with
29 // the given |histogram_name|. 29 // the given |histogram_name|.
30 explicit TaskSwitchTimeTracker(const std::string& histogram_name); 30 explicit TaskSwitchTimeTracker(const std::string& histogram_name);
31 31
32 ~TaskSwitchTimeTracker(); 32 ~TaskSwitchTimeTracker();
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 // The clock used to determine the |last_action_time_|. 69 // The clock used to determine the |last_action_time_|.
70 scoped_ptr<base::TickClock> tick_clock_; 70 scoped_ptr<base::TickClock> tick_clock_;
71 71
72 DISALLOW_COPY_AND_ASSIGN(TaskSwitchTimeTracker); 72 DISALLOW_COPY_AND_ASSIGN(TaskSwitchTimeTracker);
73 }; 73 };
74 74
75 } // namespace ash 75 } // namespace ash
76 76
77 #endif // ASH_METRICS_TASK_SWITCH_TIME_TRACKE_H_ 77 #endif // ASH_METRICS_TASK_SWITCH_TIME_TRACKE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698