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

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

Issue 2567263003: Basic UkmService implementation (Closed)
Patch Set: RegisterPrefs 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;
Alexei Svitkine (slow) 2017/01/10 17:37:19 Nit: Remove
Steven Holte 2017/01/10 22:52:44 Done.
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 MetricsReportingScheduler::~MetricsReportingScheduler() {}
20
21 void MetricsReportingScheduler::LogMetricsInitSequence(InitSequence sequence) {
22 UMA_HISTOGRAM_ENUMERATION("UKM.InitSequence", sequence,
23 INIT_SEQUENCE_ENUM_SIZE);
24 }
25
26 void MetricsReportingScheduler::LogActualUploadInterval(TimeDelta interval) {
27 UMA_HISTOGRAM_CUSTOM_COUNTS("UKM.ActualLogUploadInterval",
28 interval.InMinutes(), 1,
29 base::TimeDelta::FromHours(12).InMinutes(), 50);
30 }
31
32 } // namespace ukm
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698