57 lines
2.5 KiB
Diff
57 lines
2.5 KiB
Diff
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
|
Date: Mon, 10 Feb 2020 23:13:13 +0100
|
|
Subject: Guard for user-agent reduction
|
|
|
|
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
|
---
|
|
components/embedder_support/user_agent_utils.cc | 5 +++++
|
|
.../renderer/platform/runtime_enabled_features.json5 | 8 ++++----
|
|
2 files changed, 9 insertions(+), 4 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
|
|
+++ b/components/embedder_support/user_agent_utils.cc
|
|
@@ -841,6 +841,7 @@ std::string BuildUserAgentFromProduct(const std::string& product) {
|
|
}
|
|
|
|
std::string BuildModelInfo() {
|
|
+ if ((true)) return std::string();
|
|
#if BUILDFLAG(IS_ANDROID)
|
|
// Model information is not exposed on Android desktop.
|
|
if (base::android::device_info::is_desktop()) {
|
|
@@ -883,6 +884,10 @@ std::string GetAndroidOSInfo(
|
|
IncludeAndroidModel include_android_model) {
|
|
std::string android_info_str;
|
|
|
|
+ // Do not send information about the device.
|
|
+ include_android_model = IncludeAndroidModel::Exclude;
|
|
+ include_android_build_number = IncludeAndroidBuildNumber::Exclude;
|
|
+
|
|
// Send information about the device.
|
|
bool semicolon_inserted = false;
|
|
if (include_android_model == IncludeAndroidModel::Include) {
|
|
diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5
|
|
--- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
|
|
+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
|
|
@@ -4627,15 +4627,15 @@
|
|
// If enabled, the platform version in User-Agent Data will be removed.
|
|
// This feature is limited to Linux only.
|
|
{
|
|
- name: "ReduceUserAgentDataLinuxPlatformVersion",
|
|
- status: {"Linux": "stable"},
|
|
+ name: "ReduceUserAgentDataLinuxPlatformVersion", // keep enabled
|
|
+ status: {"Linux": "stable"}, // in bromite
|
|
},
|
|
// If enabled, the minor version of the User-Agent string will be reduced.
|
|
// This User-Agent Reduction feature has been enabled starting from M101,
|
|
// but we still keep this flag for future phase tests.
|
|
{
|
|
- name: "ReduceUserAgentMinorVersion",
|
|
- status: "stable",
|
|
+ name: "ReduceUserAgentMinorVersion", // keep enabled
|
|
+ status: "stable", // in bromite
|
|
},
|
|
{
|
|
public: true,
|
|
--
|