Disable network Early Hints

This commit is contained in:
Carmelo Messina
2023-08-23 17:17:40 +02:00
parent 7d655716c5
commit a86fc06ee6
+14 -2
View File
@@ -2,7 +2,7 @@ From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Thu, 22 Jul 2021 23:10:52 +0200
Subject: Client hints overrides
Disable critical client hints
Disable critical client hints and network early hints
Use Google Chrome branding for client hints
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
@@ -11,12 +11,13 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
content/browser/client_hints/client_hints.cc | 3 ++-
content/browser/loader/navigation_url_loader_impl.cc | 5 +++++
content/public/common/content_features.cc | 4 ++--
net/http/http_network_transaction.cc | 1 +
services/network/public/cpp/client_hints.cc | 1 +
services/network/public/cpp/features.cc | 2 +-
third_party/blink/common/client_hints/client_hints.cc | 1 +
.../blink/common/client_hints/enabled_client_hints.cc | 4 +++-
.../blink/renderer/platform/runtime_enabled_features.json5 | 4 ++--
9 files changed, 18 insertions(+), 10 deletions(-)
10 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/components/embedder_support/user_agent_utils.cc b/components/embedder_support/user_agent_utils.cc
--- a/components/embedder_support/user_agent_utils.cc
@@ -74,6 +75,17 @@ diff --git a/content/public/common/content_features.cc b/content/public/common/c
// Enable debugging the issue crbug.com/1201355
BASE_FEATURE(kDebugHistoryInterventionNoUserActivation,
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -110,6 +110,7 @@ void SetProxyInfoInReponse(const ProxyInfo& proxy_info,
// Returns true when Early Hints are allowed on the given protocol.
bool EarlyHintsAreAllowedOn(HttpResponseInfo::ConnectionInfo connection_info) {
+ if ((true)) return false;
switch (connection_info) {
case HttpResponseInfo::ConnectionInfo::CONNECTION_INFO_HTTP0_9:
case HttpResponseInfo::ConnectionInfo::CONNECTION_INFO_HTTP1_0:
diff --git a/services/network/public/cpp/client_hints.cc b/services/network/public/cpp/client_hints.cc
--- a/services/network/public/cpp/client_hints.cc
+++ b/services/network/public/cpp/client_hints.cc