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_android.cc b/metrics_reporter_android.cc
index ebfad0d..4a57918 100644
--- a/metrics_reporter_android.cc
+++ b/metrics_reporter_android.cc
@@ -36,13 +36,8 @@
base::TimeDelta /* duration */,
base::TimeDelta /* duration_uptime */,
int64_t /* payload_size */,
- int64_t /* payload_bytes_downloaded */,
- int64_t /* payload_download_speed_bps */,
- DownloadSource /* download_source */,
metrics::AttemptResult /* attempt_result */,
- ErrorCode error_code,
- metrics::DownloadErrorCode /* payload_download_error_code */,
- metrics::ConnectionType /* connection_type */) {
+ ErrorCode error_code) {
// No need to log histogram under sideload mode.
#ifndef _UE_SIDELOAD
android::metricslogger::LogHistogram(metrics::kMetricsUpdateEngineErrorCode,