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

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

Issue 1133123003: Added metrics to track the time between task switches done via the shelf. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added ASH_EXPORT to TaskSwitchTimeTracker. 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
« no previous file with comments | « ash/metrics/user_metrics_recorder.h ('k') | ash/test/task_switch_time_tracker_test_api.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/user_metrics_recorder.h" 5 #include "ash/metrics/user_metrics_recorder.h"
6 6
7 #include "ash/session/session_state_delegate.h" 7 #include "ash/session/session_state_delegate.h"
8 #include "ash/shelf/shelf_layout_manager.h" 8 #include "ash/shelf/shelf_layout_manager.h"
9 #include "ash/shelf/shelf_view.h" 9 #include "ash/shelf/shelf_view.h"
10 #include "ash/shelf/shelf_widget.h" 10 #include "ash/shelf/shelf_widget.h"
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 break; 224 break;
225 case ash::UMA_LAUNCHER_CLICK_ON_APP: 225 case ash::UMA_LAUNCHER_CLICK_ON_APP:
226 base::RecordAction(base::UserMetricsAction("Launcher_ClickOnApp")); 226 base::RecordAction(base::UserMetricsAction("Launcher_ClickOnApp"));
227 break; 227 break;
228 case ash::UMA_LAUNCHER_CLICK_ON_APPLIST_BUTTON: 228 case ash::UMA_LAUNCHER_CLICK_ON_APPLIST_BUTTON:
229 base::RecordAction( 229 base::RecordAction(
230 base::UserMetricsAction("Launcher_ClickOnApplistButton")); 230 base::UserMetricsAction("Launcher_ClickOnApplistButton"));
231 break; 231 break;
232 case ash::UMA_LAUNCHER_LAUNCH_TASK: 232 case ash::UMA_LAUNCHER_LAUNCH_TASK:
233 base::RecordAction(base::UserMetricsAction("Launcher_LaunchTask")); 233 base::RecordAction(base::UserMetricsAction("Launcher_LaunchTask"));
234 task_switch_metrics_recorder_.OnTaskSwitch(
235 TaskSwitchMetricsRecorder::kShelf);
234 break; 236 break;
235 case ash::UMA_LAUNCHER_MINIMIZE_TASK: 237 case ash::UMA_LAUNCHER_MINIMIZE_TASK:
236 base::RecordAction(base::UserMetricsAction("Launcher_MinimizeTask")); 238 base::RecordAction(base::UserMetricsAction("Launcher_MinimizeTask"));
237 break; 239 break;
238 case ash::UMA_LAUNCHER_SWITCH_TASK: 240 case ash::UMA_LAUNCHER_SWITCH_TASK:
239 base::RecordAction(base::UserMetricsAction("Launcher_SwitchTask")); 241 base::RecordAction(base::UserMetricsAction("Launcher_SwitchTask"));
242 task_switch_metrics_recorder_.OnTaskSwitch(
243 TaskSwitchMetricsRecorder::kShelf);
240 break; 244 break;
241 case UMA_MAXIMIZE_MODE_DISABLED: 245 case UMA_MAXIMIZE_MODE_DISABLED:
242 base::RecordAction(base::UserMetricsAction("Touchview_Disabled")); 246 base::RecordAction(base::UserMetricsAction("Touchview_Disabled"));
243 break; 247 break;
244 case UMA_MAXIMIZE_MODE_ENABLED: 248 case UMA_MAXIMIZE_MODE_ENABLED:
245 base::RecordAction(base::UserMetricsAction("Touchview_Enabled")); 249 base::RecordAction(base::UserMetricsAction("Touchview_Enabled"));
246 break; 250 break;
247 case UMA_MAXIMIZE_MODE_INITIALLY_DISABLED: 251 case UMA_MAXIMIZE_MODE_INITIALLY_DISABLED:
248 base::RecordAction( 252 base::RecordAction(
249 base::UserMetricsAction("Touchview_Initially_Disabled")); 253 base::UserMetricsAction("Touchview_Initially_Disabled"));
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 return IsUserActive() && !IsKioskModeActive(); 595 return IsUserActive() && !IsKioskModeActive();
592 } 596 }
593 597
594 void UserMetricsRecorder::StartTimer() { 598 void UserMetricsRecorder::StartTimer() {
595 timer_.Start(FROM_HERE, 599 timer_.Start(FROM_HERE,
596 base::TimeDelta::FromSeconds(kAshPeriodicMetricsTimeInSeconds), 600 base::TimeDelta::FromSeconds(kAshPeriodicMetricsTimeInSeconds),
597 this, &UserMetricsRecorder::RecordPeriodicMetrics); 601 this, &UserMetricsRecorder::RecordPeriodicMetrics);
598 } 602 }
599 603
600 } // namespace ash 604 } // namespace ash
OLDNEW
« no previous file with comments | « ash/metrics/user_metrics_recorder.h ('k') | ash/test/task_switch_time_tracker_test_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698