OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "components/ukm/metrics_reporting_scheduler.h" |
| 6 |
| 7 #include "base/metrics/histogram_macros.h" |
| 8 |
| 9 namespace ukm { |
| 10 |
| 11 MetricsReportingScheduler::MetricsReportingScheduler( |
| 12 const base::Closure& upload_callback, |
| 13 const base::Callback<base::TimeDelta(void)>& upload_interval_callback) |
| 14 : metrics::MetricsReportingScheduler(upload_callback, |
| 15 upload_interval_callback) {} |
| 16 |
| 17 MetricsReportingScheduler::~MetricsReportingScheduler() = default; |
| 18 |
| 19 void MetricsReportingScheduler::LogMetricsInitSequence(InitSequence sequence) { |
| 20 UMA_HISTOGRAM_ENUMERATION("UKM.InitSequence", sequence, |
| 21 INIT_SEQUENCE_ENUM_SIZE); |
| 22 } |
| 23 |
| 24 void MetricsReportingScheduler::LogActualUploadInterval( |
| 25 base::TimeDelta interval) { |
| 26 UMA_HISTOGRAM_CUSTOM_COUNTS("UKM.ActualLogUploadInterval", |
| 27 interval.InMinutes(), 1, |
| 28 base::TimeDelta::FromHours(12).InMinutes(), 50); |
| 29 } |
| 30 |
| 31 } // namespace ukm |
OLD | NEW |