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.
7 * This file defines the <code>PPB_UMA_Private</code> interface.
10 [generate_thunk
,thunk_include
="ppapi/thunk/ppb_uma_singleton_api.h"]
17 * Contains functions for plugins to report UMA usage stats.
19 interface PPB_UMA_Private
{
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
,
31 [in] uint32_t bucket_count
);
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
38 [singleton
,api
=PPB_UMA_Singleton_API
]
39 void HistogramCustomCounts
([in] PP_Instance instance
,
44 [in] uint32_t bucket_count
);
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
,
56 [in] int32_t boundary_value
);
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);