OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This file defines a service that sends metrics logs to a server. | 5 // This file defines a service that sends metrics logs to a server. |
6 | 6 |
7 #ifndef COMPONENTS_METRICS_METRICS_REPORTING_SERVICE_H_ | 7 #ifndef COMPONENTS_METRICS_METRICS_REPORTING_SERVICE_H_ |
8 #define COMPONENTS_METRICS_METRICS_REPORTING_SERVICE_H_ | 8 #define COMPONENTS_METRICS_METRICS_REPORTING_SERVICE_H_ |
9 | 9 |
10 #include <stdint.h> | 10 #include <stdint.h> |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 static void RegisterPrefs(PrefRegistrySimple* registry); | 44 static void RegisterPrefs(PrefRegistrySimple* registry); |
45 | 45 |
46 private: | 46 private: |
47 // ReportingService: | 47 // ReportingService: |
48 LogStore* log_store() override; | 48 LogStore* log_store() override; |
49 std::string GetUploadUrl() const override; | 49 std::string GetUploadUrl() const override; |
50 base::StringPiece upload_mime_type() const override; | 50 base::StringPiece upload_mime_type() const override; |
51 MetricsLogUploader::MetricServiceType service_type() const override; | 51 MetricsLogUploader::MetricServiceType service_type() const override; |
52 void LogActualUploadInterval(base::TimeDelta interval) override; | 52 void LogActualUploadInterval(base::TimeDelta interval) override; |
53 void LogCellularConstraint(bool upload_canceled) override; | 53 void LogCellularConstraint(bool upload_canceled) override; |
54 void LogResponseCode(int response_code) override; | 54 void LogResponseOrErrorCode(int response_code, int error_code) override; |
55 void LogSuccess(size_t log_size) override; | 55 void LogSuccess(size_t log_size) override; |
56 void LogLargeRejection(size_t log_size) override; | 56 void LogLargeRejection(size_t log_size) override; |
57 | 57 |
58 MetricsLogStore metrics_log_store_; | 58 MetricsLogStore metrics_log_store_; |
59 | 59 |
60 DISALLOW_COPY_AND_ASSIGN(MetricsReportingService); | 60 DISALLOW_COPY_AND_ASSIGN(MetricsReportingService); |
61 }; | 61 }; |
62 | 62 |
63 } // namespace metrics | 63 } // namespace metrics |
64 | 64 |
65 #endif // COMPONENTS_METRICS_METRICS_REPORTING_SERVICE_H_ | 65 #endif // COMPONENTS_METRICS_METRICS_REPORTING_SERVICE_H_ |
OLD | NEW |