blob: 9ee8bf539094ef6216a790cafb78b328a64c2e72 [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
44 void ReportUpdateAttemptMetrics(
45 SystemState* system_state,
46 int attempt_number,
47 PayloadType payload_type,
48 base::TimeDelta duration,
49 base::TimeDelta duration_uptime,
50 int64_t payload_size,
51 int64_t payload_bytes_downloaded,
52 int64_t payload_download_speed_bps,
53 DownloadSource download_source,
54 metrics::AttemptResult attempt_result,
55 ErrorCode internal_error_code,
56 metrics::DownloadErrorCode payload_download_error_code,
57 metrics::ConnectionType connection_type) override;
58
59 void ReportAbnormallyTerminatedUpdateAttemptMetrics() override {}
60
61 void ReportSuccessfulUpdateMetrics(
62 int attempt_count,
63 int updates_abandoned_count,
64 PayloadType payload_type,
65 int64_t payload_size,
66 int64_t num_bytes_downloaded[kNumDownloadSources],
67 int download_overhead_percentage,
68 base::TimeDelta total_duration,
69 int reboot_count,
70 int url_switch_count) override {}
71
72 void ReportCertificateCheckMetrics(ServerToCheck server_to_check,
73 CertificateCheckResult result) override {}
74
75 void ReportFailedUpdateCount(int target_attempt) override {}
76
77 void ReportTimeToReboot(int time_to_reboot_minutes) override {}
78
79 void ReportInstallDateProvisioningSource(int source, int max) override {}
80
81 private:
82 DISALLOW_COPY_AND_ASSIGN(MetricsReporterAndroid);
83};
84
85} // namespace chromeos_update_engine
86
87#endif // UPDATE_ENGINE_METRICS_REPORTER_ANDROID_H_