clipboard_history_metrics.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // Copyright 2022 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. #ifndef ASH_CLIPBOARD_CLIPBOARD_HISTORY_METRICS_H_
  5. #define ASH_CLIPBOARD_CLIPBOARD_HISTORY_METRICS_H_
  6. namespace ash {
  7. // The different operations clipboard history sees. These values are written to
  8. // logs. New enum values can be added, but existing enums must never be
  9. // renumbered, deleted, or reused. Keep this up to date with the
  10. // `ClipboardHistoryOperation` enum in enums.xml.
  11. enum class ClipboardHistoryOperation {
  12. // Emitted when the user initiates a clipboard write.
  13. kCopy = 0,
  14. // Emitted when the user initiates a clipboard read.
  15. kPaste = 1,
  16. // Insert new types above this line.
  17. kMaxValue = kPaste
  18. };
  19. // The different ways a clipboard history list reorder can occur. These values
  20. // are written to logs. New enum values can be added, but existing enums must
  21. // never be renumbered, deleted, or reused. Keep this up to date with the
  22. // `ClipboardHistoryReorderType` enum in enums.xml.
  23. enum class ClipboardHistoryReorderType {
  24. // Emitted when the user copies an existing clipboard history item other than
  25. // the top item, causing the copied item to move to the top.
  26. kOnCopy = 0,
  27. // Emitted when the user pastes an existing clipboard history item other than
  28. // the top item, causing the pasted item to move to the top. This behavior is
  29. // gated by the `kClipboardHistoryReorder` flag.
  30. kOnPaste = 1,
  31. // Insert new types above this line.
  32. kMaxValue = kOnPaste
  33. };
  34. } // namespace ash
  35. #endif // ASH_CLIPBOARD_CLIPBOARD_HISTORY_METRICS_H_