Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / ppapi / api / private / ppb_uma_private.idl
blob2d9b950fbba3d0980170a45f5b6a10496caece1b
1 /* Copyright (c) 2012 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 */
6 /**
7 * This file defines the <code>PPB_UMA_Private</code> interface.
8 */
10 [generate_thunk,thunk_include="ppapi/thunk/ppb_uma_singleton_api.h"]
12 label Chrome {
13 M35 = 0.3
16 /**
17 * Contains functions for plugins to report UMA usage stats.
19 interface PPB_UMA_Private {
20 /**
21 * HistogramCustomTimes is a pointer to a function which records a time
22 * sample given in milliseconds in the histogram given by |name|, possibly
23 * creating the histogram if it does not exist.
25 [singleton,api=PPB_UMA_Singleton_API]
26 void HistogramCustomTimes([in] PP_Instance instance,
27 [in] PP_Var name,
28 [in] int64_t sample,
29 [in] int64_t min,
30 [in] int64_t max,
31 [in] uint32_t bucket_count);
33 /**
34 * HistogramCustomCounts is a pointer to a function which records a sample
35 * in the histogram given by |name|, possibly creating the histogram if it
36 * does not exist.
38 [singleton,api=PPB_UMA_Singleton_API]
39 void HistogramCustomCounts([in] PP_Instance instance,
40 [in] PP_Var name,
41 [in] int32_t sample,
42 [in] int32_t min,
43 [in] int32_t max,
44 [in] uint32_t bucket_count);
46 /**
47 * HistogramEnumeration is a pointer to a function which records a sample
48 * in the histogram given by |name|, possibly creating the histogram if it
49 * does not exist. The sample represents a value in an enumeration bounded
50 * by |boundary_value|, that is, sample < boundary_value always.
52 [singleton,api=PPB_UMA_Singleton_API]
53 void HistogramEnumeration([in] PP_Instance instance,
54 [in] PP_Var name,
55 [in] int32_t sample,
56 [in] int32_t boundary_value);
58 /**
59 * IsCrashReportingEnabled returns PP_OK to the completion callback to
60 * indicate that the current user has opted-in to crash reporting, or
61 * PP_ERROR_* on failure or when a user has not opted-in. This can be used to
62 * gate other reporting processes such as analytics and crash reporting.
64 [singleton,api=PPB_UMA_Singleton_API]
65 int32_t IsCrashReportingEnabled([in] PP_Instance instance,
66 [in] PP_CompletionCallback callback);