ppb_uma_singleton_api.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. // Copyright 2014 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. #ifndef PPAPI_THUNK_PPB_UMA_SINGLETON_API_H_
  5. #define PPAPI_THUNK_PPB_UMA_SINGLETON_API_H_
  6. #include <stdint.h>
  7. #include "ppapi/shared_impl/singleton_resource_id.h"
  8. #include "ppapi/thunk/ppapi_thunk_export.h"
  9. namespace ppapi {
  10. namespace thunk {
  11. class PPAPI_THUNK_EXPORT PPB_UMA_Singleton_API {
  12. public:
  13. virtual ~PPB_UMA_Singleton_API() {}
  14. virtual void HistogramCustomTimes(PP_Instance instance,
  15. struct PP_Var name,
  16. int64_t sample,
  17. int64_t min,
  18. int64_t max,
  19. uint32_t bucket_count) = 0;
  20. virtual void HistogramCustomCounts(PP_Instance instance,
  21. struct PP_Var name,
  22. int32_t sample,
  23. int32_t min,
  24. int32_t max,
  25. uint32_t bucket_count) = 0;
  26. virtual void HistogramEnumeration(PP_Instance instance,
  27. struct PP_Var name,
  28. int32_t sample,
  29. int32_t boundary_value) = 0;
  30. virtual int32_t IsCrashReportingEnabled(
  31. PP_Instance instance,
  32. scoped_refptr<TrackedCallback> cc) = 0;
  33. static const SingletonResourceID kSingletonResourceID = UMA_SINGLETON_ID;
  34. };
  35. } // namespace thunk
  36. } // namespace ppapi
  37. #endif // PPAPI_THUNK_PPB_UMA_SINGLETON_API_H_