blob: b83e651ffb730a61e14640ad07df24489132e0d9 [file] [log] [blame]
Tianjie Xu1b661142017-09-28 14:03:42 -07001//
2// Copyright (C) 2017 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
17#ifndef UPDATE_ENGINE_METRICS_REPORTER_ANDROID_H_
18#define UPDATE_ENGINE_METRICS_REPORTER_ANDROID_H_
19
20#include "update_engine/common/error_code.h"
21#include "update_engine/metrics_constants.h"
22#include "update_engine/metrics_reporter_interface.h"
23
24namespace chromeos_update_engine {
25
26class MetricsReporterAndroid : public MetricsReporterInterface {
27 public:
28 MetricsReporterAndroid() = default;
29
30 ~MetricsReporterAndroid() override = default;
31
32 void Initialize() override {}
33
34 void ReportRollbackMetrics(metrics::RollbackResult result) override {}
35
36 void ReportDailyMetrics(base::TimeDelta os_age) override {}
37
38 void ReportUpdateCheckMetrics(
39 SystemState* system_state,
40 metrics::CheckResult result,
41 metrics::CheckReaction reaction,
42 metrics::DownloadErrorCode download_error_code) override {}
43
Tianjie Xu1f93d092017-10-09 12:13:29 -070044 void ReportUpdateAttemptMetrics(SystemState* system_state,
45 int attempt_number,
46 PayloadType payload_type,
47 base::TimeDelta duration,
48 base::TimeDelta duration_uptime,
49 int64_t payload_size,
50 metrics::AttemptResult attempt_result,
51 ErrorCode internal_error_code) override;
52
53 void ReportUpdateAttemptDownloadMetrics(
Tianjie Xu1b661142017-09-28 14:03:42 -070054 int64_t payload_bytes_downloaded,
55 int64_t payload_download_speed_bps,
56 DownloadSource download_source,
Tianjie Xu1b661142017-09-28 14:03:42 -070057 metrics::DownloadErrorCode payload_download_error_code,
Tianjie Xu1f93d092017-10-09 12:13:29 -070058 metrics::ConnectionType connection_type) override {}
Tianjie Xu1b661142017-09-28 14:03:42 -070059
60 void ReportAbnormallyTerminatedUpdateAttemptMetrics() override {}
61
62 void ReportSuccessfulUpdateMetrics(
63 int attempt_count,
64 int updates_abandoned_count,
65 PayloadType payload_type,
66 int64_t payload_size,
67 int64_t num_bytes_downloaded[kNumDownloadSources],
68 int download_overhead_percentage,
69 base::TimeDelta total_duration,
70 int reboot_count,
71 int url_switch_count) override {}
72
73 void ReportCertificateCheckMetrics(ServerToCheck server_to_check,
74 CertificateCheckResult result) override {}
75
76 void ReportFailedUpdateCount(int target_attempt) override {}
77
78 void ReportTimeToReboot(int time_to_reboot_minutes) override {}
79
80 void ReportInstallDateProvisioningSource(int source, int max) override {}
81
82 private:
83 DISALLOW_COPY_AND_ASSIGN(MetricsReporterAndroid);
84};
85
86} // namespace chromeos_update_engine
87
88#endif // UPDATE_ENGINE_METRICS_REPORTER_ANDROID_H_