Split the ReportUpdateAttemptMetrics into two functions
Move out the report download metrics into a new function so that
ReportUpdateAttemptMetrics has a reasonable number of parameters.
Create mocks for these two functions also.
Test: unittest pass
Change-Id: Ib9fc33d282a448c7e2d19bb7e7c06619efc2a278
diff --git a/metrics_reporter_omaha.h b/metrics_reporter_omaha.h
index b209b13..c19fe86 100644
--- a/metrics_reporter_omaha.h
+++ b/metrics_reporter_omaha.h
@@ -105,18 +105,19 @@
metrics::CheckReaction reaction,
metrics::DownloadErrorCode download_error_code) override;
- void ReportUpdateAttemptMetrics(
- SystemState* system_state,
- int attempt_number,
- PayloadType payload_type,
- base::TimeDelta duration,
- base::TimeDelta duration_uptime,
- int64_t payload_size,
+ void ReportUpdateAttemptMetrics(SystemState* system_state,
+ int attempt_number,
+ PayloadType payload_type,
+ base::TimeDelta duration,
+ base::TimeDelta duration_uptime,
+ int64_t payload_size,
+ metrics::AttemptResult attempt_result,
+ ErrorCode internal_error_code) override;
+
+ void ReportUpdateAttemptDownloadMetrics(
int64_t payload_bytes_downloaded,
int64_t payload_download_speed_bps,
DownloadSource download_source,
- metrics::AttemptResult attempt_result,
- ErrorCode internal_error_code,
metrics::DownloadErrorCode payload_download_error_code,
metrics::ConnectionType connection_type) override;