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( |