Commit 3f7635bc authored by Trent Begin's avatar Trent Begin Committed by Commit Bot

cros_healthd_probe: add OS version to SystemInfo telemetry

This change syncs the mojom file in cros_healthd with the newly added OS
version structures. This structure is not currently used anywhere in
Chrome. This change also modifies a comment wrapping to make the files
the same.

Bug: chromium:1123998
Change-Id: I1ae5599807c72bd4826c456588c88668aaf03508
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2406597
Commit-Queue: Trent Begin <tbegin@chromium.org>
Reviewed-by: default avatarOleh Lamzin <lamzin@google.com>
Reviewed-by: default avatarMaksim Ivanov <emaxx@chromium.org>
Reviewed-by: default avatarPaul Moy <pmoy@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#807074}
parent 601c5f93
...@@ -152,6 +152,10 @@ constexpr char kFakeBoardName[] = "BoardName"; ...@@ -152,6 +152,10 @@ constexpr char kFakeBoardName[] = "BoardName";
constexpr char kFakeBoardVersion[] = "rev1234"; constexpr char kFakeBoardVersion[] = "rev1234";
constexpr uint64_t kFakeChassisType = 9; constexpr uint64_t kFakeChassisType = 9;
constexpr char kFakeProductName[] = "ProductName"; constexpr char kFakeProductName[] = "ProductName";
constexpr char kFakeVersionMilestone[] = "87";
constexpr char kFakeVersionBuildNumber[] = "13544";
constexpr char kFakeVersionPatchNumber[] = "59.0";
constexpr char kFakeVersionReleaseChannel[] = "stable-channel";
// CPU test values: // CPU test values:
constexpr uint32_t kFakeNumTotalThreads = 8; constexpr uint32_t kFakeNumTotalThreads = 8;
constexpr char kFakeModelName[] = "fake_cpu_model_name"; constexpr char kFakeModelName[] = "fake_cpu_model_name";
...@@ -517,7 +521,10 @@ cros_healthd::SystemResultPtr CreateSystemResult() { ...@@ -517,7 +521,10 @@ cros_healthd::SystemResultPtr CreateSystemResult() {
kFakeFirstPowerDate, kFakeManufactureDate, kFakeSkuNumber, kFakeFirstPowerDate, kFakeManufactureDate, kFakeSkuNumber,
kFakeMarketingName, kFakeBiosVersion, kFakeBoardName, kFakeMarketingName, kFakeBiosVersion, kFakeBoardName,
kFakeBoardVersion, cros_healthd::UInt64Value::New(kFakeChassisType), kFakeBoardVersion, cros_healthd::UInt64Value::New(kFakeChassisType),
kFakeProductName)); kFakeProductName,
cros_healthd::OsVersion::New(
kFakeVersionMilestone, kFakeVersionBuildNumber,
kFakeVersionPatchNumber, kFakeVersionReleaseChannel)));
} }
std::vector<cros_healthd::CpuCStateInfoPtr> CreateCStateInfo() { std::vector<cros_healthd::CpuCStateInfoPtr> CreateCStateInfo() {
......
...@@ -154,8 +154,15 @@ void TelemetryExtensionUiBrowserTest::SetUpOnMainThread() { ...@@ -154,8 +154,15 @@ void TelemetryExtensionUiBrowserTest::SetUpOnMainThread() {
NonRemovableBlockDeviceResult::NewBlockDeviceInfo(std::move(infos)); NonRemovableBlockDeviceResult::NewBlockDeviceInfo(std::move(infos));
} }
{ {
auto os_version = chromeos::cros_healthd::mojom::OsVersion::New();
os_version->release_milestone = "87";
os_version->build_number = "13544";
os_version->patch_number = "59.0";
os_version->release_channel = "stable-channel";
auto system_info = chromeos::cros_healthd::mojom::SystemInfo::New(); auto system_info = chromeos::cros_healthd::mojom::SystemInfo::New();
system_info->product_sku_number = "sku-18"; system_info->product_sku_number = "sku-18";
system_info->os_version = std::move(os_version);
telemetry_info->system_result = telemetry_info->system_result =
chromeos::cros_healthd::mojom::SystemResult::NewSystemInfo( chromeos::cros_healthd::mojom::SystemResult::NewSystemInfo(
......
...@@ -432,6 +432,20 @@ union SystemResult { ...@@ -432,6 +432,20 @@ union SystemResult {
ProbeError error; ProbeError error;
}; };
// Structure containing information about the operating system version of the
// device. This structure decomposes a full version string into its parts:
// (87.13544.59.0).
struct OsVersion {
// The OS version release milestone (87).
string release_milestone;
// The OS version build number (13544).
string build_number;
// The OS version patch number (59.0).
string patch_number;
// The OS release channel (stable-channel).
string release_channel;
};
// System Information. // System Information.
struct SystemInfo { struct SystemInfo {
// The date the device was first activated. // The date the device was first activated.
...@@ -456,6 +470,8 @@ struct SystemInfo { ...@@ -456,6 +470,8 @@ struct SystemInfo {
UInt64Value? chassis_type; UInt64Value? chassis_type;
// The product name (model) of the system. // The product name (model) of the system.
string? product_name; string? product_name;
// The OS version of the system.
OsVersion os_version;
}; };
// Network probe result. Can either be populated with the NetworkHealthSnapshot // Network probe result. Can either be populated with the NetworkHealthSnapshot
...@@ -504,8 +520,8 @@ struct TelemetryInfo { ...@@ -504,8 +520,8 @@ struct TelemetryInfo {
// Information about the device's Bluetooth adapters and devices. Only present // Information about the device's Bluetooth adapters and devices. Only present
// when kBluetooth was included in the categories input to ProbeTelemetryInfo. // when kBluetooth was included in the categories input to ProbeTelemetryInfo.
BluetoothResult? bluetooth_result; BluetoothResult? bluetooth_result;
// Information about the system from various sources. Only present when // Information about the system. Only present when kSystem was included in the
// kSystem was included in the categories input to ProbeTelemetryInfo. // categories input to ProbeTelemetryInfo.
SystemResult? system_result; SystemResult? system_result;
// Information about the networking devices and associated networks of the // Information about the networking devices and associated networks of the
// system. Only present when kNetwork was included in the categories input to // system. Only present when kNetwork was included in the categories input to
......
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