// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "content/common/features.h" #include "base/feature_list.h" #include "base/metrics/field_trial_params.h" namespace features { // Please keep features in alphabetical order. // Enables content-initiated, main frame navigations to data URLs. // TODO(meacer): Remove when the deprecation is complete. // https://www.chromestatus.com/feature/5669602927312896 BASE_FEATURE(kAllowContentInitiatedDataUrlNavigations, "AllowContentInitiatedDataUrlNavigations", base::FEATURE_DISABLED_BY_DEFAULT); // Allows Blink to request fonts from the Android Downloadable Fonts API through // the service implemented on the Java side. BASE_FEATURE(kAndroidDownloadableFontsMatching, "AndroidDownloadableFontsMatching", base::FEATURE_ENABLED_BY_DEFAULT); // Adds OOPIF support for android drag and drop. BASE_FEATURE(kAndroidDragDropOopif, "AndroidDragDropOopif", base::FEATURE_ENABLED_BY_DEFAULT); // Enables controlling the time to live for pages in the BackForwardCache. // The time to live is defined by the param 'time_to_live_seconds'; if this // param is not specified then this feature is ignored and the default is used. BASE_FEATURE(kBackForwardCacheTimeToLiveControl, "BackForwardCacheTimeToLiveControl", base::FEATURE_DISABLED_BY_DEFAULT); // When enabled, the browser will schedule before unload tasks that continue // navigation network responses in a kHigh priority queue. // TODO(b/281094330): Run experiment on ChromeOS. Experiment was not run on // ChromeOS due to try bot issue. #if BUILDFLAG(IS_CHROMEOS) BASE_FEATURE(kBeforeUnloadBrowserResponseQueue, "BeforeUnloadBrowserResponseQueue", base::FEATURE_DISABLED_BY_DEFAULT); #else BASE_FEATURE(kBeforeUnloadBrowserResponseQueue, "BeforeUnloadBrowserResponseQueue", base::FEATURE_ENABLED_BY_DEFAULT); #endif // When this feature is enabled, requests to localhost initiated from non-secure // contexts in the `unknown` IP address space are blocked. // // See also: // - kBlockInsecurePrivateNetworkRequests BASE_FEATURE(kBlockInsecurePrivateNetworkRequestsFromUnknown, "BlockInsecurePrivateNetworkRequestsFromUnknown", base::FEATURE_DISABLED_BY_DEFAULT); #if BUILDFLAG(IS_ANDROID) // Whether to hide paste popup on GestureScrollBegin or GestureScrollUpdate. BASE_FEATURE(kHidePastePopupOnGSB, "HidePastePopupOnGSB", base::FEATURE_ENABLED_BY_DEFAULT); #endif // If enabled, changes to the zoom level are temporary and are forgotten when // the tab is closed. If disabled, changes to the zoom level persist, as though // the user affected them through the browser's UX. BASE_FEATURE(kCapturedSurfaceControlTemporaryZoom, "CapturedSurfaceControlTemporaryZoom", base::FEATURE_ENABLED_BY_DEFAULT); // If Canvas2D Image Chromium is allowed, this feature controls whether it is // enabled. #if BUILDFLAG(IS_APPLE) BASE_FEATURE(kCanvas2DImageChromium, "Canvas2DImageChromium", base::FEATURE_ENABLED_BY_DEFAULT); #else BASE_FEATURE(kCanvas2DImageChromium, "Canvas2DImageChromium", base::FEATURE_DISABLED_BY_DEFAULT); #endif // When enabled, code cache does not use a browsing_data filter for deletions. BASE_FEATURE(kCodeCacheDeletionWithoutFilter, "CodeCacheDeletionWithoutFilter", base::FEATURE_ENABLED_BY_DEFAULT); // Turn on enforcements based on tracking the list of committed origins in // ChildProcessSecurityPolicy::CanAccessMaybeOpaqueOrigin(). Note that this only // controls whether or not the new security checks take effect; when this is // off, the security check is still performed and compared to the legacy jail // and citadel check to collect data about possible mismatches. Requires // CommittedOriginTracking to also be turned on to take effect. See // https://crbug.com/40148776. BASE_FEATURE(kCommittedOriginEnforcements, "CommittedOriginEnforcements", base::FEATURE_DISABLED_BY_DEFAULT); // Turn on the tracking of origins committed in each renderer process in // ChildProcessSecurityPolicy. This is required for committed origin // enforcements, which is gated behind kCommittedOriginEnforcements. // Temporarily disabled while investigating https://crbug.com/377793089. BASE_FEATURE(kCommittedOriginTracking, "CommittedOriginTracking", base::FEATURE_DISABLED_BY_DEFAULT); // Enables support for the `Critical-CH` response header. // https://github.com/WICG/client-hints-infrastructure/blob/master/reliability.md#critical-ch BASE_FEATURE(kCriticalClientHint, "CriticalClientHint", base::FEATURE_ENABLED_BY_DEFAULT); // Enable document policy negotiation mechanism. BASE_FEATURE(kDocumentPolicyNegotiation, "DocumentPolicyNegotiation", base::FEATURE_DISABLED_BY_DEFAULT); // Requires documents embedded via