1 // Copyright 2021 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_BACK_FORWARD_CACHE_DISABLED_REASON_ID_H_
6 #define COMPONENTS_BACK_FORWARD_CACHE_DISABLED_REASON_ID_H_
10 namespace back_forward_cache {
12 // Reasons to disable BackForwardCache for this frame for chrome features.
13 enum class DisabledReasonId : uint16_t {
14 // These values are persisted to logs. Entries should not be renumbered and
15 // numeric values should never be reused. kMaxValue is not defined because
16 // this enum is not logged directly as an enum (see
17 // BackForwardCache::DisabledSource).
19 kPopupBlockerTabHelper = 1,
20 kSafeBrowsingTriggeredPopupBlocker = 2,
21 kSafeBrowsingThreatDetails = 3,
22 // Unblocked by https://crbug.com/1276864
23 // kAppBannerManager = 4,
24 kDomDistillerViewerSource = 5,
25 kDomDistiller_SelfDeletingRequestDelegate = 6,
26 kOomInterventionTabHelper = 7,
28 kChromePasswordManagerClient_BindCredentialManager = 9,
29 kPermissionRequestManager = 10,
30 // Modal dialog such as form resubmittion or http password dialog is shown for
33 // Support for extensions is added in stages (see crbug.com/1110891), each
35 // - kExtensions: All extensions are blocklisted.
36 // - kExtensionMessaging: Extensions using messaging APIs are blocklisted.
37 // - kExtensionMessagingForOpenPort: Extensions using long-lived connections
38 // that don't close the connection before attempting to cache the frame are
40 // - kExtensionSentMessageToCachedFrame: Extensions using long-lived
41 // connections that attempt to send a message to a frame while it is cached
42 // (inactive) are blocklisted.
44 kExtensionMessaging = 13,
45 kExtensionMessagingForOpenPort = 14,
46 kExtensionSentMessageToCachedFrame = 15,
47 // New reasons should be accompanied by a comment as to why BackForwardCache
48 // cannot be used in this case and a link to a bug to fix that if it is
50 // Any updates here should be reflected in tools/metrics/histograms/enums.xml
53 } // namespace back_forward_cache
55 #endif // COMPONENTS_BACK_FORWARD_CACHE_DISABLED_REASON_ID_H_