Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Side by Side Diff: ppapi/thunk/ppb_uma_private_thunk.cc

Issue 61643022: Proxy private UMA pepper interface for out-of-process and NaCl plugins. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove errant file, fix comment typo Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
5 // From private/ppb_uma_private.idl modified Mon Nov 18 14:39:43 2013.
6
7 #include "ppapi/c/pp_errors.h"
8 #include "ppapi/c/private/ppb_uma_private.h"
9 #include "ppapi/shared_impl/tracked_callback.h"
10 #include "ppapi/thunk/enter.h"
11 #include "ppapi/thunk/ppb_instance_api.h"
12 #include "ppapi/thunk/ppb_uma_singleton_api.h"
13 #include "ppapi/thunk/resource_creation_api.h"
14 #include "ppapi/thunk/thunk.h"
15
16 namespace ppapi {
17 namespace thunk {
18
19 namespace {
20
21 void HistogramCustomTimes(PP_Instance instance,
22 struct PP_Var name,
23 int64_t sample,
24 int64_t min,
25 int64_t max,
26 uint32_t bucket_count) {
27 VLOG(4) << "PPB_UMA_Private::HistogramCustomTimes()";
28 EnterInstanceAPI<PPB_UMA_Singleton_API> enter(instance);
29 if (enter.failed())
30 return;
31 enter.functions()->HistogramCustomTimes(instance,
32 name,
33 sample,
34 min,
35 max,
36 bucket_count);
37 }
38
39 void HistogramCustomCounts(PP_Instance instance,
40 struct PP_Var name,
41 int32_t sample,
42 int32_t min,
43 int32_t max,
44 uint32_t bucket_count) {
45 VLOG(4) << "PPB_UMA_Private::HistogramCustomCounts()";
46 EnterInstanceAPI<PPB_UMA_Singleton_API> enter(instance);
47 if (enter.failed())
48 return;
49 enter.functions()->HistogramCustomCounts(instance,
50 name,
51 sample,
52 min,
53 max,
54 bucket_count);
55 }
56
57 void HistogramEnumeration(PP_Instance instance,
58 struct PP_Var name,
59 int32_t sample,
60 int32_t boundary_value) {
61 VLOG(4) << "PPB_UMA_Private::HistogramEnumeration()";
62 EnterInstanceAPI<PPB_UMA_Singleton_API> enter(instance);
63 if (enter.failed())
64 return;
65 enter.functions()->HistogramEnumeration(instance,
66 name,
67 sample,
68 boundary_value);
69 }
70
71 const PPB_UMA_Private_0_2 g_ppb_uma_private_thunk_0_2 = {
72 &HistogramCustomTimes,
73 &HistogramCustomCounts,
74 &HistogramEnumeration
75 };
76
77 } // namespace
78
79 const PPB_UMA_Private_0_2* GetPPB_UMA_Private_0_2_Thunk() {
80 return &g_ppb_uma_private_thunk_0_2;
81 }
82
83 } // namespace thunk
84 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698