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

Unified Diff: c_metrics_library.cc

Issue 3171023: Add weekly crash counters, refactor metrics_daemon, respect opt-in in library. (Closed) Base URL: http://src.chromium.org/git/metrics.git
Patch Set: Respond to review Created 10 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « c_metrics_library.h ('k') | counter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: c_metrics_library.cc
diff --git a/c_metrics_library.cc b/c_metrics_library.cc
index 91e9ca6e30d597493597f6d03ad9b5d3fbc63728..e97f9ac264059040213a319c8005da45842ea1b8 100644
--- a/c_metrics_library.cc
+++ b/c_metrics_library.cc
@@ -26,8 +26,8 @@ extern "C" void CMetricsLibraryInit(CMetricsLibrary handle) {
}
extern "C" int CMetricsLibrarySendToUMA(CMetricsLibrary handle,
- const char* name, int sample,
- int min, int max, int nbuckets) {
+ const char* name, int sample,
+ int min, int max, int nbuckets) {
MetricsLibrary* lib = reinterpret_cast<MetricsLibrary*>(handle);
if (lib == NULL)
return 0;
@@ -35,10 +35,17 @@ extern "C" int CMetricsLibrarySendToUMA(CMetricsLibrary handle,
}
extern "C" int CMetricsLibrarySendEnumToUMA(CMetricsLibrary handle,
- const char* name, int sample,
- int max) {
+ const char* name, int sample,
+ int max) {
MetricsLibrary* lib = reinterpret_cast<MetricsLibrary*>(handle);
if (lib == NULL)
return 0;
return lib->SendEnumToUMA(std::string(name), sample, max);
}
+
+extern "C" int CMetricsLibraryAreMetricsEnabled(CMetricsLibrary handle) {
+ MetricsLibrary* lib = reinterpret_cast<MetricsLibrary*>(handle);
+ if (lib == NULL)
+ return 0;
+ return lib->AreMetricsEnabled();
+}
« no previous file with comments | « c_metrics_library.h ('k') | counter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698