power_button_menu_metrics_type.cc 980 B

1234567891011121314151617181920212223242526272829303132
  1. // Copyright 2018 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "ash/system/power/power_button_menu_metrics_type.h"
  5. #include "base/metrics/histogram_macros.h"
  6. namespace ash {
  7. constexpr char kPowerButtonMenuActionHistogram[] =
  8. "Power.PowerButtonMenuAction";
  9. constexpr char kPressInLaptopModeHistogram[] =
  10. "Power.PowerButtonPressInLaptopMode";
  11. constexpr char kPressInTabletModeHistogram[] =
  12. "Power.PowerButtonPressInTabletMode";
  13. void RecordMenuActionHistogram(PowerButtonMenuActionType type) {
  14. UMA_HISTOGRAM_ENUMERATION(kPowerButtonMenuActionHistogram, type);
  15. }
  16. void RecordPressInLaptopModeHistogram(PowerButtonPressType type) {
  17. UMA_HISTOGRAM_ENUMERATION(kPressInLaptopModeHistogram, type);
  18. }
  19. void RecordPressInTabletModeHistogram(PowerButtonPressType type) {
  20. UMA_HISTOGRAM_ENUMERATION(kPressInTabletModeHistogram, type);
  21. }
  22. } // namespace ash