Upload upstream chromium 108.0.5359.1
[platform/framework/web/chromium-efl.git] / components / back_forward_cache / disabled_reason_id.h
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.
4
5 #ifndef COMPONENTS_BACK_FORWARD_CACHE_DISABLED_REASON_ID_H_
6 #define COMPONENTS_BACK_FORWARD_CACHE_DISABLED_REASON_ID_H_
7
8 #include <cstdint>
9
10 namespace back_forward_cache {
11
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).
18   kUnknown = 0,
19   kPopupBlockerTabHelper = 1,
20   kSafeBrowsingTriggeredPopupBlocker = 2,
21   kSafeBrowsingThreatDetails = 3,
22   kAppBannerManager = 4,
23   kDomDistillerViewerSource = 5,
24   kDomDistiller_SelfDeletingRequestDelegate = 6,
25   kOomInterventionTabHelper = 7,
26   kOfflinePage = 8,
27   kChromePasswordManagerClient_BindCredentialManager = 9,
28   kPermissionRequestManager = 10,
29   // Modal dialog such as form resubmittion or http password dialog is shown for
30   // the page.
31   kModalDialog = 11,
32   // Support for extensions is added in stages (see crbug.com/1110891), each
33   // with its own enum.
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
38   //   blocklisted.
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.
42   kExtensions = 12,
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
48   // fixable.
49   // Any updates here should be reflected in tools/metrics/histograms/enums.xml
50 };
51
52 }  // namespace back_forward_cache
53
54 #endif  // COMPONENTS_BACK_FORWARD_CACHE_DISABLED_REASON_ID_H_