44 lines
1.6 KiB
Diff
44 lines
1.6 KiB
Diff
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
|
Date: Thu, 22 Jul 2021 23:10:52 +0200
|
|
Subject: Override UA client hint for model
|
|
|
|
Hard-code model to SAMSUNG SM-G960U
|
|
Disable permissions policy by default
|
|
---
|
|
content/common/user_agent.cc | 7 +------
|
|
content/public/common/content_features.cc | 2 +-
|
|
2 files changed, 2 insertions(+), 7 deletions(-)
|
|
|
|
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
|
|
@@ -282,12 +282,7 @@ std::string BuildUserAgentFromProduct(const std::string& product) {
|
|
|
|
std::string BuildModelInfo() {
|
|
std::string model;
|
|
-#if defined(OS_ANDROID)
|
|
- // Only send the model information if on the release build of Android,
|
|
- // matching user agent behaviour.
|
|
- if (base::SysInfo::GetAndroidBuildCodename() == "REL")
|
|
- model = base::SysInfo::HardwareModelName();
|
|
-#endif
|
|
+ model = "SAMSUNG SM-G960U";
|
|
return model;
|
|
}
|
|
|
|
diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc
|
|
--- a/content/public/common/content_features.cc
|
|
+++ b/content/public/common/content_features.cc
|
|
@@ -306,7 +306,7 @@ const base::Feature kExtraSafelistedRequestHeadersForOutOfBlinkCors{
|
|
|
|
// Controls whether Client Hints are guarded by Permissions Policy.
|
|
const base::Feature kFeaturePolicyForClientHints{
|
|
- "FeaturePolicyForClientHints", base::FEATURE_ENABLED_BY_DEFAULT};
|
|
+ "FeaturePolicyForClientHints", base::FEATURE_DISABLED_BY_DEFAULT};
|
|
|
|
// Enables the AccessHandle surface for File System Access API's Origin Private
|
|
// File System. Tracking bug: https://crbug.com/1218431.
|
|
--
|
|
2.17.1
|
|
|