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

Side by Side Diff: chrome/browser/extensions/api/metrics_private/metrics_private_api.h

Issue 213433003: Add Sparse Histogram Support to metricsPrivate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Style and Unsigned/Signed Compare Created 6 years, 9 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 #ifndef CHROME_BROWSER_EXTENSIONS_API_METRICS_PRIVATE_METRICS_PRIVATE_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_METRICS_PRIVATE_METRICS_PRIVATE_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_METRICS_PRIVATE_METRICS_PRIVATE_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_METRICS_PRIVATE_METRICS_PRIVATE_API_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 DECLARE_EXTENSION_FUNCTION("metricsPrivate.recordValue", 76 DECLARE_EXTENSION_FUNCTION("metricsPrivate.recordValue",
77 METRICSPRIVATE_RECORDVALUE) 77 METRICSPRIVATE_RECORDVALUE)
78 78
79 protected: 79 protected:
80 virtual ~MetricsPrivateRecordValueFunction() {} 80 virtual ~MetricsPrivateRecordValueFunction() {}
81 81
82 // ExtensionFunction: 82 // ExtensionFunction:
83 virtual bool RunImpl() OVERRIDE; 83 virtual bool RunImpl() OVERRIDE;
84 }; 84 };
85 85
86 class MetricsPrivateRecordSparseValueFunction
87 : public MetricsHistogramHelperFunction {
88 public:
89 DECLARE_EXTENSION_FUNCTION("metricsPrivate.recordSparseValue",
90 METRICSPRIVATE_RECORDSPARSEVALUE)
91
92 protected:
93 virtual ~MetricsPrivateRecordSparseValueFunction() {}
94
95 // ExtensionFunction:
96 virtual bool RunImpl() OVERRIDE;
97 };
98
86 class MetricsPrivateRecordPercentageFunction 99 class MetricsPrivateRecordPercentageFunction
87 : public MetricsHistogramHelperFunction { 100 : public MetricsHistogramHelperFunction {
88 public: 101 public:
89 DECLARE_EXTENSION_FUNCTION("metricsPrivate.recordPercentage", 102 DECLARE_EXTENSION_FUNCTION("metricsPrivate.recordPercentage",
90 METRICSPRIVATE_RECORDPERCENTAGE) 103 METRICSPRIVATE_RECORDPERCENTAGE)
91 104
92 protected: 105 protected:
93 virtual ~MetricsPrivateRecordPercentageFunction() {} 106 virtual ~MetricsPrivateRecordPercentageFunction() {}
94 107
95 // ExtensionFunction: 108 // ExtensionFunction:
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 protected: 182 protected:
170 virtual ~MetricsPrivateRecordLongTimeFunction() {} 183 virtual ~MetricsPrivateRecordLongTimeFunction() {}
171 184
172 // ExtensionFunction: 185 // ExtensionFunction:
173 virtual bool RunImpl() OVERRIDE; 186 virtual bool RunImpl() OVERRIDE;
174 }; 187 };
175 188
176 } // namespace extensions 189 } // namespace extensions
177 190
178 #endif // CHROME_BROWSER_EXTENSIONS_API_METRICS_PRIVATE_METRICS_PRIVATE_API_H_ 191 #endif // CHROME_BROWSER_EXTENSIONS_API_METRICS_PRIVATE_METRICS_PRIVATE_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698