55 lines
1.6 KiB
Diff
55 lines
1.6 KiB
Diff
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
|
Date: Wed, 21 Mar 2018 14:15:28 +0100
|
|
Subject: User Agent: anonymize
|
|
|
|
Remove device name and build id
|
|
---
|
|
content/common/user_agent.cc | 25 ++-----------------------
|
|
1 file changed, 2 insertions(+), 23 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
|
|
@@ -79,26 +79,6 @@ std::string BuildOSCpuInfo() {
|
|
|
|
#if defined(OS_ANDROID)
|
|
std::string android_version_str = base::SysInfo::OperatingSystemVersion();
|
|
-
|
|
- std::string android_info_str;
|
|
-
|
|
- // Send information about the device.
|
|
- bool semicolon_inserted = false;
|
|
- std::string android_build_codename = base::SysInfo::GetAndroidBuildCodename();
|
|
- std::string android_device_name = base::SysInfo::HardwareModelName();
|
|
- if ("REL" == android_build_codename && android_device_name.size() > 0) {
|
|
- android_info_str += "; " + android_device_name;
|
|
- semicolon_inserted = true;
|
|
- }
|
|
-
|
|
- // Append the build ID.
|
|
- std::string android_build_id = base::SysInfo::GetAndroidBuildID();
|
|
- if (android_build_id.size() > 0) {
|
|
- if (!semicolon_inserted) {
|
|
- android_info_str += ";";
|
|
- }
|
|
- android_info_str += " Build/" + android_build_id;
|
|
- }
|
|
#endif
|
|
|
|
base::StringAppendF(
|
|
@@ -121,9 +101,8 @@ std::string BuildOSCpuInfo() {
|
|
os_minor_version,
|
|
os_bugfix_version
|
|
#elif defined(OS_ANDROID)
|
|
- "Android %s%s",
|
|
- android_version_str.c_str(),
|
|
- android_info_str.c_str()
|
|
+ "Android %s",
|
|
+ android_version_str.c_str()
|
|
#else
|
|
"%s %s",
|
|
unixinfo.sysname, // e.g. Linux
|
|
--
|
|
2.7.4
|
|
|