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

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

Issue 776093004: Add device policy to disallow shutdown (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: modifications suggested by stevenjb Created 6 years 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 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/shelf/shelf_layout_manager.h" 7 #include "ash/shelf/shelf_layout_manager.h"
8 #include "ash/shelf/shelf_view.h" 8 #include "ash/shelf/shelf_view.h"
9 #include "ash/shelf/shelf_widget.h" 9 #include "ash/shelf/shelf_widget.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 break; 52 break;
53 case ash::UMA_ACCEL_PREVWINDOW_F5: 53 case ash::UMA_ACCEL_PREVWINDOW_F5:
54 base::RecordAction(base::UserMetricsAction("Accel_PrevWindow_F5")); 54 base::RecordAction(base::UserMetricsAction("Accel_PrevWindow_F5"));
55 break; 55 break;
56 case ash::UMA_ACCEL_EXIT_FIRST_Q: 56 case ash::UMA_ACCEL_EXIT_FIRST_Q:
57 base::RecordAction(base::UserMetricsAction("Accel_Exit_First_Q")); 57 base::RecordAction(base::UserMetricsAction("Accel_Exit_First_Q"));
58 break; 58 break;
59 case ash::UMA_ACCEL_EXIT_SECOND_Q: 59 case ash::UMA_ACCEL_EXIT_SECOND_Q:
60 base::RecordAction(base::UserMetricsAction("Accel_Exit_Second_Q")); 60 base::RecordAction(base::UserMetricsAction("Accel_Exit_Second_Q"));
61 break; 61 break;
62 case ash::UMA_ACCEL_RESTART_POWER_BUTTON:
63 base::RecordAction(
64 base::UserMetricsAction("Accel_Restart_PowerButton"));
65 break;
62 case ash::UMA_ACCEL_SHUT_DOWN_POWER_BUTTON: 66 case ash::UMA_ACCEL_SHUT_DOWN_POWER_BUTTON:
63 base::RecordAction( 67 base::RecordAction(
64 base::UserMetricsAction("Accel_ShutDown_PowerButton")); 68 base::UserMetricsAction("Accel_ShutDown_PowerButton"));
65 break; 69 break;
66 case ash::UMA_CLOSE_THROUGH_CONTEXT_MENU: 70 case ash::UMA_CLOSE_THROUGH_CONTEXT_MENU:
67 base::RecordAction(base::UserMetricsAction("CloseFromContextMenu")); 71 base::RecordAction(base::UserMetricsAction("CloseFromContextMenu"));
68 break; 72 break;
69 case ash::UMA_DRAG_MAXIMIZE_LEFT: 73 case ash::UMA_DRAG_MAXIMIZE_LEFT:
70 base::RecordAction(base::UserMetricsAction("WindowDrag_MaximizeLeft")); 74 base::RecordAction(base::UserMetricsAction("WindowDrag_MaximizeLeft"));
71 break; 75 break;
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 active_window_state_type = ACTIVE_WINDOW_STATE_TYPE_OTHER; 434 active_window_state_type = ACTIVE_WINDOW_STATE_TYPE_OTHER;
431 break; 435 break;
432 } 436 }
433 } 437 }
434 UMA_HISTOGRAM_ENUMERATION("Ash.ActiveWindowShowTypeOverTime", 438 UMA_HISTOGRAM_ENUMERATION("Ash.ActiveWindowShowTypeOverTime",
435 active_window_state_type, 439 active_window_state_type,
436 ACTIVE_WINDOW_STATE_TYPE_COUNT); 440 ACTIVE_WINDOW_STATE_TYPE_COUNT);
437 } 441 }
438 442
439 } // namespace ash 443 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698