Skip to content

Commit cf9aae3

Browse files
author
Santosh Mahto
committed
Prepend starboard OS name in user-agent string
The current OS name in user-agent string is fetched using chromium code which just return "Linux". This misses the real OS name for starboard platform and result in YTS test failure. So OS name in user-agent string should include the starboard platform OS name. Bug: 475670748
1 parent 22ae31c commit cf9aae3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cobalt/browser/user_agent/user_agent_platform_info.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,9 @@ void UserAgentPlatformInfo::InitializePlatformDependentFieldsAndroid() {
190190
}
191191
#elif BUILDFLAG(IS_STARBOARD)
192192
void UserAgentPlatformInfo::InitializePlatformDependentFieldsStarboard() {
193-
const std::string os_name = base::SysInfo::OperatingSystemName();
193+
std::string os_name =
194+
starboard::GetSystemPropertyString(kSbSystemPropertyFriendlyName) + "; " +
195+
base::SysInfo::OperatingSystemName();
194196
const std::string os_version = base::SysInfo::OperatingSystemVersion();
195197
set_os_name_and_version(
196198
base::StringPrintf("%s %s", os_name.c_str(), os_version.c_str()));

0 commit comments

Comments
 (0)