clipboard_nudge_constants.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. // Copyright 2020 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_NUDGE_CONSTANTS_H_
  5. #define ASH_CLIPBOARD_CLIPBOARD_NUDGE_CONSTANTS_H_
  6. #include "base/time/time.h"
  7. namespace ash {
  8. enum ClipboardNudgeType {
  9. // Onboarding nudge. Shows when a user copy and pastes repeatedly within a
  10. // time frame.
  11. kOnboardingNudge = 0,
  12. // Shows when the keyboard shortcut for clipboard is pressed with no items
  13. // in the history.
  14. kZeroStateNudge = 1,
  15. // Blue new feature badge for clipboard history's context menu option.
  16. kNewFeatureBadge = 2,
  17. // Shows the keyboard shortcut for clipboard history in the screenshot
  18. // notification nudge.
  19. kScreenshotNotificationNudge = 3,
  20. };
  21. const char kOnboardingNudge_ShowCount[] =
  22. "Ash.ClipboardHistory.Nudges.OnboardingNudge.ShownCount";
  23. const char kOnboardingNudge_OpenTime[] =
  24. "Ash.ClipboardHistory.Nudges.OnboardingNudge.ToFeatureOpenTime";
  25. const char kOnboardingNudge_PasteTime[] =
  26. "Ash.ClipboardHistory.Nudges.OnboardingNudge.ToFeaturePasteTime";
  27. const char kZeroStateNudge_ShowCount[] =
  28. "Ash.ClipboardHistory.Nudges.ZeroStateNudge.ShownCount";
  29. const char kZeroStateNudge_OpenTime[] =
  30. "Ash.ClipboardHistory.Nudges.ZeroStateNudge.ToFeatureOpenTime";
  31. const char kZeroStateNudge_PasteTime[] =
  32. "Ash.ClipboardHistory.Nudges.ZeroStateNudge.ToFeaturePasteTime";
  33. const char kNewBadge_ShowCount[] =
  34. "Ash.ClipboardHistory.Nudges.NewFeatureBadge.ShownCount";
  35. const char kNewBadge_OpenTime[] =
  36. "Ash.ClipboardHistory.Nudges.NewFeatureBadge.ToFeatureOpenTime";
  37. const char kNewBadge_PasteTime[] =
  38. "Ash.ClipboardHistory.Nudges.NewFeatureBadge.ToFeaturePasteTime";
  39. const char kScreenshotNotification_ShowCount[] =
  40. "Ash.ClipboardHistory.Nudges.ScreenshotNotificationNudge.ShownCount";
  41. const char kScreenshotNotification_OpenTime[] =
  42. "Ash.ClipboardHistory.Nudges.ScreenshotNotificationNudge.ToFeatureOpenTime";
  43. const char kScreenshotNotification_PasteTime[] =
  44. "Ash.ClipboardHistory.Nudges.ScreenshotNotificationNudge."
  45. "ToFeaturePasteTime";
  46. constexpr int kNotificationLimit = 3;
  47. constexpr int kContextMenuBadgeShowLimit = 3;
  48. constexpr base::TimeDelta kMinInterval = base::Days(1);
  49. constexpr base::TimeDelta kMaxTimeBetweenPaste = base::Minutes(10);
  50. } // namespace ash
  51. #endif // ASH_CLIPBOARD_CLIPBOARD_NUDGE_CONSTANTS_H_