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

Side by Side Diff: chrome/browser/extensions/api/metrics/metrics.h

Issue 11342060: Histogram type support in HistogramBase and remove SetRangeDescription function (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove "using" from metrics.cc Created 8 years, 1 month 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 | « base/metrics/sparse_histogram.cc ('k') | chrome/browser/extensions/api/metrics/metrics.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) 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_METRICS_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_METRICS_METRICS_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_METRICS_METRICS_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_METRICS_METRICS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 10 matching lines...) Expand all
21 21
22 // ExtensionFunction: 22 // ExtensionFunction:
23 virtual bool RunImpl() OVERRIDE; 23 virtual bool RunImpl() OVERRIDE;
24 }; 24 };
25 25
26 class MetricsHistogramHelperFunction : public SyncExtensionFunction { 26 class MetricsHistogramHelperFunction : public SyncExtensionFunction {
27 protected: 27 protected:
28 virtual ~MetricsHistogramHelperFunction() {} 28 virtual ~MetricsHistogramHelperFunction() {}
29 bool GetNameAndSample(std::string* name, int* sample); 29 bool GetNameAndSample(std::string* name, int* sample);
30 virtual bool RecordValue(const std::string& name, 30 virtual bool RecordValue(const std::string& name,
31 base::Histogram::ClassType type, 31 base::HistogramType type,
32 int min, int max, size_t buckets, 32 int min, int max, size_t buckets,
33 int sample); 33 int sample);
34 }; 34 };
35 35
36 class MetricsRecordValueFunction : public MetricsHistogramHelperFunction { 36 class MetricsRecordValueFunction : public MetricsHistogramHelperFunction {
37 public: 37 public:
38 DECLARE_EXTENSION_FUNCTION_NAME("metricsPrivate.recordValue") 38 DECLARE_EXTENSION_FUNCTION_NAME("metricsPrivate.recordValue")
39 39
40 protected: 40 protected:
41 virtual ~MetricsRecordValueFunction() {} 41 virtual ~MetricsRecordValueFunction() {}
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 protected: 117 protected:
118 virtual ~MetricsRecordLongTimeFunction() {} 118 virtual ~MetricsRecordLongTimeFunction() {}
119 119
120 // ExtensionFunction: 120 // ExtensionFunction:
121 virtual bool RunImpl() OVERRIDE; 121 virtual bool RunImpl() OVERRIDE;
122 }; 122 };
123 123
124 } // namespace extensions 124 } // namespace extensions
125 125
126 #endif // CHROME_BROWSER_EXTENSIONS_API_METRICS_METRICS_H_ 126 #endif // CHROME_BROWSER_EXTENSIONS_API_METRICS_METRICS_H_
OLDNEW
« no previous file with comments | « base/metrics/sparse_histogram.cc ('k') | chrome/browser/extensions/api/metrics/metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698