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
5module metrics.mojom;
6
7// See components/metrics/single_sample_metrics_factory_impl.h for details.
8interface SingleSampleMetricsProvider {
9  // Returns a SingleSampleMetric.
10  //
11  // A single sample metric only reports its sample once at destruction time.
12  // The sample may be changed prior to destruction using the SetSample() method
13  // as many times as desired.
14  //
15  // See base/metrics/histograms.h for parameter definitions. |receiver| is the
16  // returned histogram.
17  AcquireSingleSampleMetric(string histogram_name, int32 min, int32 max,
18                            uint32 bucket_count, int32 flags,
19                            pending_receiver<SingleSampleMetric> receiver);
20};
21
22interface SingleSampleMetric {
23  SetSample(int32 sample);
24};
25