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

Side by Side Diff: c_metrics_library.cc

Issue 6094010: Add support for user actions to the metrics library and the metrics clients. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/metrics.git@master
Patch Set: Created 9 years, 11 months 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 | Annotate | Revision Log
« no previous file with comments | « c_metrics_library.h ('k') | metrics_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // 5 //
6 // C wrapper to libmetrics 6 // C wrapper to libmetrics
7 // 7 //
8 8
9 #include "c_metrics_library.h" 9 #include "c_metrics_library.h"
10 #include "metrics_library.h" 10 #include "metrics_library.h"
(...skipping 25 matching lines...) Expand all
36 36
37 extern "C" int CMetricsLibrarySendEnumToUMA(CMetricsLibrary handle, 37 extern "C" int CMetricsLibrarySendEnumToUMA(CMetricsLibrary handle,
38 const char* name, int sample, 38 const char* name, int sample,
39 int max) { 39 int max) {
40 MetricsLibrary* lib = reinterpret_cast<MetricsLibrary*>(handle); 40 MetricsLibrary* lib = reinterpret_cast<MetricsLibrary*>(handle);
41 if (lib == NULL) 41 if (lib == NULL)
42 return 0; 42 return 0;
43 return lib->SendEnumToUMA(std::string(name), sample, max); 43 return lib->SendEnumToUMA(std::string(name), sample, max);
44 } 44 }
45 45
46 extern "C" int CMetricsLibrarySendUserActionToUMA(CMetricsLibrary handle,
47 const char* action) {
48 MetricsLibrary* lib = reinterpret_cast<MetricsLibrary*>(handle);
49 if (lib == NULL)
50 return 0;
51 return lib->SendUserActionToUMA(std::string(action));
52 }
53
46 extern "C" int CMetricsLibraryAreMetricsEnabled(CMetricsLibrary handle) { 54 extern "C" int CMetricsLibraryAreMetricsEnabled(CMetricsLibrary handle) {
47 MetricsLibrary* lib = reinterpret_cast<MetricsLibrary*>(handle); 55 MetricsLibrary* lib = reinterpret_cast<MetricsLibrary*>(handle);
48 if (lib == NULL) 56 if (lib == NULL)
49 return 0; 57 return 0;
50 return lib->AreMetricsEnabled(); 58 return lib->AreMetricsEnabled();
51 } 59 }
OLDNEW
« no previous file with comments | « c_metrics_library.h ('k') | metrics_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698