Commit dee522e4 authored by Bailey Berro's avatar Bailey Berro Committed by Chromium LUCI CQ

Rename TelemetryLog::GetContents

Bug: 1128204
Change-Id: I8801ebb4f65f5b867f084b5a55fbf4b81b13213c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2634061
Auto-Submit: Bailey Berro <baileyberro@chromium.org>
Reviewed-by: default avatarZentaro Kavanagh <zentaro@chromium.org>
Commit-Queue: Bailey Berro <baileyberro@chromium.org>
Cr-Commit-Position: refs/heads/master@{#844947}
parent dfbf6720
...@@ -82,7 +82,7 @@ void TelemetryLog::UpdateCpuUsage(mojom::CpuUsagePtr latest_cpu_usage) { ...@@ -82,7 +82,7 @@ void TelemetryLog::UpdateCpuUsage(mojom::CpuUsagePtr latest_cpu_usage) {
latest_cpu_usage_ = std::move(latest_cpu_usage); latest_cpu_usage_ = std::move(latest_cpu_usage);
} }
std::string TelemetryLog::GetTelemetryLog() const { std::string TelemetryLog::GetContents() const {
std::stringstream output; std::stringstream output;
if (latest_system_info_) { if (latest_system_info_) {
output << kSystemInfoSectionName << kNewline << kSystemInfoBoardNameTitle output << kSystemInfoSectionName << kNewline << kSystemInfoBoardNameTitle
......
...@@ -28,7 +28,7 @@ class TelemetryLog { ...@@ -28,7 +28,7 @@ class TelemetryLog {
void UpdateCpuUsage(mojom::CpuUsagePtr latest_cpu_usage); void UpdateCpuUsage(mojom::CpuUsagePtr latest_cpu_usage);
// Returns the telemetry log as a string. // Returns the telemetry log as a string.
std::string GetTelemetryLog() const; std::string GetContents() const;
private: private:
mojom::SystemInfoPtr latest_system_info_; mojom::SystemInfoPtr latest_system_info_;
......
...@@ -69,7 +69,7 @@ TEST_F(TelemetryLogTest, DetailedLogContents) { ...@@ -69,7 +69,7 @@ TEST_F(TelemetryLogTest, DetailedLogContents) {
log.UpdateSystemInfo(test_info.Clone()); log.UpdateSystemInfo(test_info.Clone());
const std::string log_as_string = log.GetTelemetryLog(); const std::string log_as_string = log.GetContents();
const std::vector<std::string> log_lines = GetLogLines(log_as_string); const std::vector<std::string> log_lines = GetLogLines(log_as_string);
// Expect one title line and 8 content lines. // Expect one title line and 8 content lines.
...@@ -116,7 +116,7 @@ TEST_F(TelemetryLogTest, ChangeContents) { ...@@ -116,7 +116,7 @@ TEST_F(TelemetryLogTest, ChangeContents) {
log.UpdateSystemInfo(test_info.Clone()); log.UpdateSystemInfo(test_info.Clone());
const std::string log_as_string = log.GetTelemetryLog(); const std::string log_as_string = log.GetContents();
const std::vector<std::string> log_lines = GetLogLines(log_as_string); const std::vector<std::string> log_lines = GetLogLines(log_as_string);
EXPECT_EQ("Board Name: new board_name", log_lines[1]); EXPECT_EQ("Board Name: new board_name", log_lines[1]);
......
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