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

Unified Diff: ash/metrics/task_switch_metrics_recorder.h

Issue 1148723006: Added Ash.TimeBetweenTaskSwitches to record time deltas between all recorded task switches. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | ash/metrics/task_switch_metrics_recorder.cc » ('j') | tools/metrics/histograms/histograms.xml » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/metrics/task_switch_metrics_recorder.h
diff --git a/ash/metrics/task_switch_metrics_recorder.h b/ash/metrics/task_switch_metrics_recorder.h
index b2103be01d7a27a036cec32b1feaf9123f57db25..aafc9f10258a2aacd72ab59358ffb533315c1057 100644
--- a/ash/metrics/task_switch_metrics_recorder.h
+++ b/ash/metrics/task_switch_metrics_recorder.h
@@ -22,6 +22,9 @@ class ASH_EXPORT TaskSwitchMetricsRecorder {
// Enumeration of the different user interfaces that could be the source of
// a task switch. Note this is not necessarily comprehensive of all sources.
enum TaskSwitchSource {
+ // Task switches between any two other sources. NOTE: This value should NOT
tdanderson 2015/06/02 15:56:12 nit: suggested reword: "Task switches caused by an
bruthig 2015/06/04 18:54:25 Done.
+ // be used outside of this class.
+ kAny,
// Task switches from selecting items in the app list.
kAppList,
// Task switches caused by selecting a window from overview mode which is
@@ -48,9 +51,16 @@ class ASH_EXPORT TaskSwitchMetricsRecorder {
//
// Will add an entry to |histogram_map_| when called for the first time for
// each |task_switch_source| value.
+ //
+ // NOTE: A |task_switch_source| value of TaskSwitchSource::kAny should not be
+ // used and behavior is undefined if it is.
tdanderson 2015/06/02 15:56:12 Include in the documentation of OnTaskSwitch() tha
bruthig 2015/06/04 18:54:26 Done.
void OnTaskSwitch(TaskSwitchSource task_switch_source);
private:
+ // Internal Implementation of OnTaskSwitch(TaskSwitchSource) that will accept
tdanderson 2015/06/02 15:56:11 nit: lower-case i on implementation.
bruthig 2015/06/04 18:54:26 Done.
+ // the TaskSwitchSource::kAny value.
+ void OnTaskSwitchInternal(TaskSwitchSource task_switch_source);
+
// Returns the TaskSwitchTimeTracker associated with the specified
// |task_switch_source|. May return nullptr if mapping does not exist yet.
TaskSwitchTimeTracker* FindTaskSwitchTimeTracker(
« no previous file with comments | « no previous file | ash/metrics/task_switch_metrics_recorder.cc » ('j') | tools/metrics/histograms/histograms.xml » ('J')

Powered by Google App Engine
This is Rietveld 408576698