Commit 4573dbe4 authored by Jonghyun Ahn's avatar Jonghyun Ahn Committed by Commit Bot

[CLEANUP] Cleanup code now that OperatingSystemVersion reports the ChromeOS...

[CLEANUP] Cleanup code now that OperatingSystemVersion reports the ChromeOS release version rather than the
kernel version.

This change was made in https://chromium-review.googlesource.com/c/chromium/src/+/1132530.

Any references fetching OperatingSystemVersion using OperatingSystemVersionNumbers were audited
via https://cs.chromium.org/search/?q=%22::OperatingSystemVersionNumbers(%22&type=cs.

Change-Id: I5484c56d12a6d2f374abffe51af1c49e44353ef6
Reviewed-on: https://chromium-review.googlesource.com/c/1147435
Commit-Queue: Jong Ahn <jongahn@google.com>
Reviewed-by: default avatarAlbert J. Wong <ajwong@chromium.org>
Reviewed-by: default avatarMitsuru Oshima <oshima@chromium.org>
Reviewed-by: default avatarAlexei Svitkine <asvitkine@chromium.org>
Cr-Commit-Position: refs/heads/master@{#597650}
parent 14d1927d
......@@ -178,7 +178,7 @@ std::string SysInfo::OperatingSystemName() {
}
#endif
#if !defined(OS_MACOSX) && !defined(OS_ANDROID) && !(OS_CHROMEOS)
#if !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
// static
std::string SysInfo::OperatingSystemVersion() {
struct utsname info;
......
......@@ -192,13 +192,7 @@ std::unique_ptr<AppSession> CreateAppSession() {
}
base::Version GetPlatformVersion() {
int32_t major_version;
int32_t minor_version;
int32_t bugfix_version;
base::SysInfo::OperatingSystemVersionNumbers(&major_version, &minor_version,
&bugfix_version);
return base::Version(base::StringPrintf("%d.%d.%d", major_version,
minor_version, bugfix_version));
return base::Version(base::SysInfo::OperatingSystemVersion());
}
// Converts a flag constant to actual command line switch value.
......
......@@ -735,18 +735,12 @@ void AssistantManagerServiceImpl::PostInitAssistant(
std::string AssistantManagerServiceImpl::BuildUserAgent(
const std::string& arc_version) const {
int32_t os_major_version = 0;
int32_t os_minor_version = 0;
int32_t os_bugfix_version = 0;
base::SysInfo::OperatingSystemVersionNumbers(
&os_major_version, &os_minor_version, &os_bugfix_version);
std::string user_agent;
base::StringAppendF(&user_agent,
"Mozilla/5.0 (X11; CrOS %s %d.%d.%d; %s) "
"Mozilla/5.0 (X11; CrOS %s %s; %s) "
"AppleWebKit/%d.%d (KHTML, like Gecko)",
base::SysInfo::OperatingSystemArchitecture().c_str(),
os_major_version, os_minor_version, os_bugfix_version,
base::SysInfo::OperatingSystemVersion().c_str(),
base::SysInfo::GetLsbReleaseBoard().c_str(),
WEBKIT_VERSION_MAJOR, WEBKIT_VERSION_MINOR);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment