Home | History | Annotate | Download | only in private
      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 
      5 #ifndef PPAPI_CPP_PRIVATE_UMA_PRIVATE_H_
      6 #define PPAPI_CPP_PRIVATE_UMA_PRIVATE_H_
      7 
      8 #include <string>
      9 
     10 #include "ppapi/c/pp_instance.h"
     11 #include "ppapi/cpp/instance_handle.h"
     12 
     13 namespace pp {
     14 
     15 class CompletionCallback;
     16 
     17 class UMAPrivate {
     18  public:
     19   UMAPrivate();
     20   explicit UMAPrivate(const InstanceHandle& instance);
     21   ~UMAPrivate();
     22 
     23   static bool IsAvailable();
     24 
     25   void HistogramCustomTimes(const std::string& name,
     26                             int64_t sample,
     27                             int64_t min,
     28                             int64_t max,
     29                             uint32_t bucket_count);
     30 
     31   void HistogramCustomCounts(const std::string& name,
     32                              int32_t sample,
     33                              int32_t min,
     34                              int32_t max,
     35                              uint32_t bucket_count);
     36 
     37   void HistogramEnumeration(const std::string& name,
     38                             int32_t sample,
     39                             int32_t boundary_value);
     40 
     41   int32_t IsCrashReportingEnabled(const CompletionCallback& cc);
     42 
     43  private:
     44   PP_Instance instance_;
     45 };
     46 
     47 }  // namespace pp
     48 
     49 #endif  // PPAPI_CPP_PRIVATE_UMA_PRIVATE_H_
     50