disabled_reason_id.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. // Copyright 2021 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 COMPONENTS_BACK_FORWARD_CACHE_DISABLED_REASON_ID_H_
  5. #define COMPONENTS_BACK_FORWARD_CACHE_DISABLED_REASON_ID_H_
  6. #include <cstdint>
  7. namespace back_forward_cache {
  8. // Reasons to disable BackForwardCache for this frame for chrome features.
  9. enum class DisabledReasonId : uint16_t {
  10. // These values are persisted to logs. Entries should not be renumbered and
  11. // numeric values should never be reused. kMaxValue is not defined because
  12. // this enum is not logged directly as an enum (see
  13. // BackForwardCache::DisabledSource).
  14. kUnknown = 0,
  15. kPopupBlockerTabHelper = 1,
  16. kSafeBrowsingTriggeredPopupBlocker = 2,
  17. kSafeBrowsingThreatDetails = 3,
  18. kAppBannerManager = 4,
  19. kDomDistillerViewerSource = 5,
  20. kDomDistiller_SelfDeletingRequestDelegate = 6,
  21. kOomInterventionTabHelper = 7,
  22. kOfflinePage = 8,
  23. kChromePasswordManagerClient_BindCredentialManager = 9,
  24. kPermissionRequestManager = 10,
  25. // Modal dialog such as form resubmittion or http password dialog is shown for
  26. // the page.
  27. kModalDialog = 11,
  28. // Support for extensions is added in stages (see crbug.com/1110891), each
  29. // with its own enum.
  30. // - kExtensions: All extensions are blocklisted.
  31. // - kExtensionMessaging: Extensions using messaging APIs are blocklisted.
  32. // - kExtensionMessagingForOpenPort: Extensions using long-lived connections
  33. // that don't close the connection before attempting to cache the frame are
  34. // blocklisted.
  35. // - kExtensionSentMessageToCachedFrame: Extensions using long-lived
  36. // connections that attempt to send a message to a frame while it is cached
  37. // (inactive) are blocklisted.
  38. kExtensions = 12,
  39. kExtensionMessaging = 13,
  40. kExtensionMessagingForOpenPort = 14,
  41. kExtensionSentMessageToCachedFrame = 15,
  42. // New reasons should be accompanied by a comment as to why BackForwardCache
  43. // cannot be used in this case and a link to a bug to fix that if it is
  44. // fixable.
  45. // Any updates here should be reflected in tools/metrics/histograms/enums.xml
  46. };
  47. } // namespace back_forward_cache
  48. #endif // COMPONENTS_BACK_FORWARD_CACHE_DISABLED_REASON_ID_H_