Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef CHROME_BROWSER_SAFE_BROWSING_CERTIFICATE_REPORTING_METRICS_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_CERTIFICATE_REPORTING_METRICS_PROVIDER_H_ |
| 6 #define CHROME_BROWSER_SAFE_BROWSING_CERTIFICATE_REPORTING_METRICS_PROVIDER_H_ | 6 #define CHROME_BROWSER_SAFE_BROWSING_CERTIFICATE_REPORTING_METRICS_PROVIDER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "components/metrics/metrics_provider.h" | 9 #include "components/metrics/metrics_provider.h" |
| 10 | 10 |
| 11 // When user metrics are about to be uploaded, | 11 // CertificateReportingService doesn't do its own scheduling when retrying |
| 12 // uploads of failed reports. Instead, it piggybacks off on the metrics service | |
|
Ilya Sherman
2016/12/23 00:56:48
nit: s/off on/off of
meacer
2016/12/27 18:56:43
Done.
| |
| 13 // scheduler. | |
| 14 // | |
| 15 // When the metrics services requests metrics to be uploaded, | |
| 12 // CertificateReportingMetricsProvider looks up the CertificateReportingService | 16 // CertificateReportingMetricsProvider looks up the CertificateReportingService |
| 13 // for the current profile and tells it to record its metrics before the upload | 17 // for the current profile and tells it send all pending reports at once. |
| 14 // occurs. | |
| 15 class CertificateReportingMetricsProvider : public metrics::MetricsProvider { | 18 class CertificateReportingMetricsProvider : public metrics::MetricsProvider { |
| 16 public: | 19 public: |
| 17 CertificateReportingMetricsProvider(); | 20 CertificateReportingMetricsProvider(); |
| 18 ~CertificateReportingMetricsProvider() override; | 21 ~CertificateReportingMetricsProvider() override; |
| 19 | 22 |
| 20 // metrics:MetricsProvider: | 23 // metrics:MetricsProvider: |
| 21 void ProvideGeneralMetrics( | 24 void ProvideGeneralMetrics( |
| 22 metrics::ChromeUserMetricsExtension* unused) override; | 25 metrics::ChromeUserMetricsExtension* unused) override; |
| 23 }; | 26 }; |
| 24 | 27 |
| 25 #endif // CHROME_BROWSER_SAFE_BROWSING_CERTIFICATE_REPORTING_METRICS_PROVIDER_H _ | 28 #endif // CHROME_BROWSER_SAFE_BROWSING_CERTIFICATE_REPORTING_METRICS_PROVIDER_H _ |
| OLD | NEW |