Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Side by Side Diff: components/ukm/metrics_reporting_scheduler.cc

Issue 2567263003: Basic UkmService implementation (Closed)
Patch Set: Updated Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 using base::TimeDelta;
10
11 namespace ukm {
12
13 MetricsReportingScheduler::MetricsReportingScheduler(
14 const base::Closure& upload_callback,
15 const base::Callback<base::TimeDelta(void)>& upload_interval_callback)
16 : metrics::MetricsReportingScheduler(upload_callback,
17 upload_interval_callback) {
18 }
19
20 MetricsReportingScheduler::~MetricsReportingScheduler() {}
21
22 void MetricsReportingScheduler::LogMetricsInitSequence(InitSequence sequence) {
23 UMA_HISTOGRAM_ENUMERATION("UKM.InitSequence", sequence,
24 INIT_SEQUENCE_ENUM_SIZE);
25 }
26
27 void MetricsReportingScheduler::LogActualUploadInterval(TimeDelta interval) {
28 UMA_HISTOGRAM_CUSTOM_COUNTS("UKM.ActualLogUploadInterval",
29 interval.InMinutes(),
30 1,
31 base::TimeDelta::FromHours(12).InMinutes(),
32 50);
33 }
34
35 } // namespace ukm
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698