0

Add a WebView experiment flag for PrefetchRedirects.

This is a soft requirement for a Finch rollout that includes WebView.
This is made easier if we migrate the feature declaration to
content_features.h, which is automatically processed into generated Java
code.

Bug: 1374389
Change-Id: I601bf782bb94f2ca0f14347437c20d8d8f800195
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5177811
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Adithya Srinivasan <adithyas@chromium.org>
Auto-Submit: Jeremy Roman <jbroman@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1244283}
This commit is contained in:
Jeremy Roman
2024-01-08 21:46:01 +00:00
committed by Chromium LUCI CQ
parent d035578369
commit 21a705a456
6 changed files with 13 additions and 9 deletions
android_webview/java/src/org/chromium/android_webview/common
content

@ -665,8 +665,9 @@ public final class ProductionSupportedFlagList {
"Enables showing the cancel dialog by calling preventDefault() "
+ "on beforeunload event."),
Flag.baseFeature(
BlinkFeatures.CLOSE_WATCHER,
"Enables the CloseWatcher JS API and integrates behavior with dialog and popover elements."),
BlinkFeatures.CLOSE_WATCHER,
"Enables the CloseWatcher JS API and integrates behavior with dialog and popover"
+ " elements."),
Flag.baseFeature(
ContentFeatures.QUEUE_NAVIGATIONS_WHILE_WAITING_FOR_COMMIT,
"If enabled, allows navigations to be queued when there is "
@ -697,6 +698,9 @@ public final class ProductionSupportedFlagList {
Flag.baseFeature(
ContentFeatures.PREFETCH_NEW_LIMITS,
"Enables new limits policy for SpeculationRules Prefetch."),
Flag.baseFeature(
ContentFeatures.PREFETCH_REDIRECTS,
"Enables following redirects during speculation rules prefetch."),
Flag.baseFeature(
BlinkFeatures.FORM_CONTROLS_VERTICAL_WRITING_MODE_SUPPORT,
"Enables support for CSS vertical writing mode on non-text-based form"

@ -17,6 +17,7 @@
#include "content/public/browser/global_routing_id.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/content_features.h"
#include "content/public/test/test_renderer_host.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "mojo/public/cpp/system/string_data_source.h"

@ -11,10 +11,6 @@ BASE_FEATURE(kPrefetchUseContentRefactor,
"PrefetchUseContentRefactor",
base::FEATURE_ENABLED_BY_DEFAULT);
BASE_FEATURE(kPrefetchRedirects,
"PrefetchRedirects",
base::FEATURE_DISABLED_BY_DEFAULT);
BASE_FEATURE(kPrefetchReusable,
"PrefetchReusable",
base::FEATURE_DISABLED_BY_DEFAULT);

@ -16,9 +16,6 @@ namespace features {
// chrome/browser/preloadingprefetch/prefetch_proxy/.
CONTENT_EXPORT BASE_DECLARE_FEATURE(kPrefetchUseContentRefactor);
// IF enabled, then redirects will be followed when prefetching.
CONTENT_EXPORT BASE_DECLARE_FEATURE(kPrefetchRedirects);
// If enabled, PrefetchContainer can be used for more than one navigation.
// https://crbug.com/1449360
CONTENT_EXPORT BASE_DECLARE_FEATURE(kPrefetchReusable);

@ -682,6 +682,11 @@ BASE_FEATURE(kPrefetchNewLimits,
"PrefetchNewLimits",
base::FEATURE_ENABLED_BY_DEFAULT);
// If enabled, then redirects will be followed when prefetching.
BASE_FEATURE(kPrefetchRedirects,
"PrefetchRedirects",
base::FEATURE_DISABLED_BY_DEFAULT);
// Enables exposure of ads APIs in the renderer: Attribution Reporting,
// FLEDGE, Topics, along with a number of other features actively in development
// within these APIs.

@ -168,6 +168,7 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kPepperCrossOriginRedirectRestriction);
CONTENT_EXPORT BASE_DECLARE_FEATURE(kPermissionElement);
CONTENT_EXPORT BASE_DECLARE_FEATURE(kPersistentOriginTrials);
CONTENT_EXPORT BASE_DECLARE_FEATURE(kPrefetchNewLimits);
CONTENT_EXPORT BASE_DECLARE_FEATURE(kPrefetchRedirects);
CONTENT_EXPORT BASE_DECLARE_FEATURE(kPrivacySandboxAdsAPIsOverride);
CONTENT_EXPORT BASE_DECLARE_FEATURE(kPrivateNetworkAccessForNavigations);
CONTENT_EXPORT BASE_DECLARE_FEATURE(kPrivateNetworkAccessForWorkers);