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

Side by Side Diff: ash/metrics/task_switch_metrics_recorder.cc

Issue 1165003010: Revert r333104: "Added UMA statistics for changing the active window via click or touch events." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 #include "ash/metrics/task_switch_metrics_recorder.h" 5 #include "ash/metrics/task_switch_metrics_recorder.h"
6 6
7 #include "ash/metrics/task_switch_time_tracker.h" 7 #include "ash/metrics/task_switch_time_tracker.h"
8 8
9 namespace ash { 9 namespace ash {
10 10
11 namespace { 11 namespace {
12 12
13 const char kDesktopHistogramName[] =
14 "Ash.Desktop.TimeBetweenNavigateToTaskSwitches";
15
16 const char kShelfHistogramName[] = 13 const char kShelfHistogramName[] =
17 "Ash.Shelf.TimeBetweenNavigateToTaskSwitches"; 14 "Ash.Shelf.TimeBetweenNavigateToTaskSwitches";
18 15
19 const char kTabStripHistogramName[] = 16 const char kTabStripHistogramName[] =
20 "Ash.Tab.TimeBetweenSwitchToExistingTabUserActions"; 17 "Ash.Tab.TimeBetweenSwitchToExistingTabUserActions";
21 18
22 const char kAcceleratorWindowCycleHistogramName[] = 19 const char kAcceleratorWindowCycleHistogramName[] =
23 "Ash.WindowCycleController.TimeBetweenTaskSwitches"; 20 "Ash.WindowCycleController.TimeBetweenTaskSwitches";
24 21
25 const char kAppListHistogramName[] = "Ash.AppList.TimeBetweenTaskSwitches"; 22 const char kAppListHistogramName[] = "Ash.AppList.TimeBetweenTaskSwitches";
26 23
27 const char kOverviewModeHistogramName[] = 24 const char kOverviewModeHistogramName[] =
28 "Ash.WindowSelector.TimeBetweenActiveWindowChanges"; 25 "Ash.WindowSelector.TimeBetweenActiveWindowChanges";
29 26
30 // Returns the histogram name for the given |task_switch_source|. 27 // Returns the histogram name for the given |task_switch_source|.
31 const char* GetHistogramName( 28 const char* GetHistogramName(
32 TaskSwitchMetricsRecorder::TaskSwitchSource task_switch_source) { 29 TaskSwitchMetricsRecorder::TaskSwitchSource task_switch_source) {
33 switch (task_switch_source) { 30 switch (task_switch_source) {
34 case TaskSwitchMetricsRecorder::kAppList: 31 case TaskSwitchMetricsRecorder::kAppList:
35 return kAppListHistogramName; 32 return kAppListHistogramName;
36 case TaskSwitchMetricsRecorder::kDesktop:
37 return kDesktopHistogramName;
38 case TaskSwitchMetricsRecorder::kOverviewMode: 33 case TaskSwitchMetricsRecorder::kOverviewMode:
39 return kOverviewModeHistogramName; 34 return kOverviewModeHistogramName;
40 case TaskSwitchMetricsRecorder::kShelf: 35 case TaskSwitchMetricsRecorder::kShelf:
41 return kShelfHistogramName; 36 return kShelfHistogramName;
42 case TaskSwitchMetricsRecorder::kTabStrip: 37 case TaskSwitchMetricsRecorder::kTabStrip:
43 return kTabStripHistogramName; 38 return kTabStripHistogramName;
44 case TaskSwitchMetricsRecorder::kWindowCycleController: 39 case TaskSwitchMetricsRecorder::kWindowCycleController:
45 return kAcceleratorWindowCycleHistogramName; 40 return kAcceleratorWindowCycleHistogramName;
46 } 41 }
47 NOTREACHED(); 42 NOTREACHED();
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 75
81 const char* histogram_name = GetHistogramName(task_switch_source); 76 const char* histogram_name = GetHistogramName(task_switch_source);
82 DCHECK(histogram_name); 77 DCHECK(histogram_name);
83 78
84 histogram_map_.add( 79 histogram_map_.add(
85 task_switch_source, 80 task_switch_source,
86 make_scoped_ptr(new TaskSwitchTimeTracker(histogram_name))); 81 make_scoped_ptr(new TaskSwitchTimeTracker(histogram_name)));
87 } 82 }
88 83
89 } // namespace ash 84 } // namespace ash
OLDNEW
« no previous file with comments | « ash/metrics/task_switch_metrics_recorder.h ('k') | ash/metrics/task_switch_metrics_recorder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698