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 kAppBannerManager = 4,
23 kDomDistillerViewerSource = 5,
24 kDomDistiller_SelfDeletingRequestDelegate = 6,
25 kOomInterventionTabHelper = 7,
27 kChromePasswordManagerClient_BindCredentialManager = 9,
28 kPermissionRequestManager = 10,
29 // Modal dialog such as form resubmittion or http password dialog is shown for
32 // Support for extensions is added in stages (see crbug.com/1110891), each
34 // - kExtensions: All extensions are blocklisted.
35 // - kExtensionMessaging: Extensions using messaging APIs are blocklisted.
36 // - kExtensionMessagingForOpenPort: Extensions using long-lived connections
37 // that don't close the connection before attempting to cache the frame are
39 // - kExtensionSentMessageToCachedFrame: Extensions using long-lived
40 // connections that attempt to send a message to a frame while it is cached
41 // (inactive) are blocklisted.
43 kExtensionMessaging = 13,
44 kExtensionMessagingForOpenPort = 14,
45 kExtensionSentMessageToCachedFrame = 15,
46 // New reasons should be accompanied by a comment as to why BackForwardCache
47 // cannot be used in this case and a link to a bug to fix that if it is
49 // Any updates here should be reflected in tools/metrics/histograms/enums.xml
52 } // namespace back_forward_cache
54 #endif // COMPONENTS_BACK_FORWARD_CACHE_DISABLED_REASON_ID_H_