added another useful method for removing client hints
This commit is contained in:
parent
bac5d44fa6
commit
2c3e9c272b
1 changed files with 13 additions and 1 deletions
|
@ -5,6 +5,7 @@ Subject: Disable ClientHints and Override UA client hint for model
|
|||
Hard-code model to SAMSUNG SM-G960U
|
||||
---
|
||||
chrome/browser/prefs/browser_prefs.cc | 2 +-
|
||||
content/browser/client_hints/client_hints.cc | 1 +
|
||||
content/common/user_agent.cc | 7 +------
|
||||
content/public/common/content_features.cc | 2 +-
|
||||
services/network/public/cpp/client_hints.cc | 1 +
|
||||
|
@ -12,7 +13,7 @@ Hard-code model to SAMSUNG SM-G960U
|
|||
third_party/blink/common/client_hints/client_hints.cc | 1 +
|
||||
.../blink/common/client_hints/enabled_client_hints.cc | 5 ++++-
|
||||
third_party/blink/common/features.cc | 4 ++--
|
||||
8 files changed, 12 insertions(+), 12 deletions(-)
|
||||
9 files changed, 13 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
|
||||
--- a/chrome/browser/prefs/browser_prefs.cc
|
||||
|
@ -26,6 +27,17 @@ diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browse
|
|||
|
||||
registry->RegisterBooleanPref(kCloudPolicyOverridesPlatformPolicy, false);
|
||||
|
||||
diff --git a/content/browser/client_hints/client_hints.cc b/content/browser/client_hints/client_hints.cc
|
||||
--- a/content/browser/client_hints/client_hints.cc
|
||||
+++ b/content/browser/client_hints/client_hints.cc
|
||||
@@ -421,6 +421,7 @@ void AddPrefersColorSchemeHeader(net::HttpRequestHeaders* headers,
|
||||
}
|
||||
|
||||
bool IsValidURLForClientHints(const GURL& url) {
|
||||
+ if ((true)) return false;
|
||||
if (!url.is_valid() || !url.SchemeIsHTTPOrHTTPS() ||
|
||||
(url.SchemeIs(url::kHttpScheme) && !net::IsLocalhost(url)))
|
||||
return false;
|
||||
diff --git a/content/common/user_agent.cc b/content/common/user_agent.cc
|
||||
--- a/content/common/user_agent.cc
|
||||
+++ b/content/common/user_agent.cc
|
||||
|
|
Loading…
Add table
Reference in a new issue