File tree Expand file tree Collapse file tree 3 files changed +22
-2
lines changed
cobalt/browser/user_agent Expand file tree Collapse file tree 3 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,11 @@ std::string SbSysInfo::Brand() {
7878 __system_property_get (" ro.product.brand" , brand_str);
7979 return std::string (brand_str);
8080}
81+
82+ std::string SbSysInfo::OSFriendlyName () {
83+ return " AOSP" ;
84+ }
85+
8186#elif BUILDFLAG(IS_STARBOARD)
8287std::string SbSysInfo::OriginalDesignManufacturer () {
8388 return GetSystemPropertyString (kSbSystemPropertySystemIntegratorName );
@@ -95,6 +100,10 @@ std::string SbSysInfo::Brand() {
95100 return GetSystemPropertyString (kSbSystemPropertyBrandName );
96101}
97102
103+ std::string SbSysInfo::OSFriendlyName () {
104+ return GetSystemPropertyString (kSbSystemPropertyFriendlyName );
105+ }
106+
98107#elif BUILDFLAG(IS_IOS_TVOS)
99108std::string SbSysInfo::OriginalDesignManufacturer () {
100109 // Cobalt 25: https://github.com/youtube/cobalt/blob/62c2380b7eb0da5889a387c4b9be283656a8575d/starboard/shared/uikit/system_get_property.mm#L126
@@ -152,6 +161,10 @@ std::string SbSysInfo::Brand() {
152161 return " Apple" ;
153162}
154163
164+ std::string SbSysInfo::OSFriendlyName () {
165+ SB_NOTIMPLEMENTED ();
166+ }
167+
155168#endif // BUILDFLAG(IS_ANDROID)
156169
157170} // namespace starboard
Original file line number Diff line number Diff line change @@ -31,9 +31,11 @@ class BASE_EXPORT SbSysInfo {
3131 static std::string ModelYear ();
3232
3333 static std::string Brand ();
34+
35+ static std::string OSFriendlyName ();
3436};
3537
3638} // namespace starboard
3739} // namespace base
3840
39- #endif // BASE_SYSTEM_SYS_INFO_STARBOARD_H_
41+ #endif // BASE_SYSTEM_SYS_INFO_STARBOARD_H_
Original file line number Diff line number Diff line change @@ -190,7 +190,12 @@ void UserAgentPlatformInfo::InitializePlatformDependentFieldsAndroid() {
190190}
191191#elif BUILDFLAG(IS_STARBOARD)
192192void UserAgentPlatformInfo::InitializePlatformDependentFieldsStarboard () {
193- const std::string os_name = base::SysInfo::OperatingSystemName ();
193+ std::string os_name = base::SysInfo::OperatingSystemName ();
194+ const std::string os_friendly_name =
195+ base::starboard::SbSysInfo::OSFriendlyName ();
196+ if (!os_friendly_name.empty ()) {
197+ os_name = os_friendly_name + " ; " + os_name;
198+ }
194199 const std::string os_version = base::SysInfo::OperatingSystemVersion ();
195200 set_os_name_and_version (
196201 base::StringPrintf (" %s %s" , os_name.c_str (), os_version.c_str ()));
You can’t perform that action at this time.
0 commit comments