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

Side by Side Diff: chrome/browser/extensions/extension_metrics_module.h

Issue 657037: Add a metrics extensions API.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_METRICS_MODULE_H__
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_METRICS_MODULE_H__
7
8 #include <string>
9
10 #include "base/histogram.h"
11 #include "chrome/browser/extensions/extension_function.h"
12
13 class MetricsRecordUserActionFunction : public SyncExtensionFunction {
14 virtual bool RunImpl();
15 DECLARE_EXTENSION_FUNCTION_NAME("metrics.recordUserAction")
16 };
17
18 class MetricsHistogramHelperFunction : public SyncExtensionFunction {
19 protected:
20 bool GetNameAndSample(std::string* name, int* sample);
21 virtual bool RecordValue(const std::string& name, Histogram::ClassType type,
22 int min, int max, size_t buckets, int sample);
23 };
24
25 class MetricsRecordValueFunction : public MetricsHistogramHelperFunction {
26 virtual bool RunImpl();
27 DECLARE_EXTENSION_FUNCTION_NAME("metrics.recordValue")
28 };
29
30 class MetricsRecordPercentageFunction : public MetricsHistogramHelperFunction {
31 virtual bool RunImpl();
32 DECLARE_EXTENSION_FUNCTION_NAME("metrics.recordPercentage")
33 };
34
35 class MetricsRecordCountFunction : public MetricsHistogramHelperFunction {
36 virtual bool RunImpl();
37 DECLARE_EXTENSION_FUNCTION_NAME("metrics.recordCount")
38 };
39
40 class MetricsRecordSmallCountFunction : public MetricsHistogramHelperFunction {
41 virtual bool RunImpl();
42 DECLARE_EXTENSION_FUNCTION_NAME("metrics.recordSmallCount")
43 };
44
45 class MetricsRecordMediumCountFunction : public MetricsHistogramHelperFunction {
46 virtual bool RunImpl();
47 DECLARE_EXTENSION_FUNCTION_NAME("metrics.recordMediumCount")
48 };
49
50 class MetricsRecordTimeFunction : public MetricsHistogramHelperFunction {
51 virtual bool RunImpl();
52 DECLARE_EXTENSION_FUNCTION_NAME("metrics.recordTime")
53 };
54
55 class MetricsRecordMediumTimeFunction : public MetricsHistogramHelperFunction {
56 virtual bool RunImpl();
57 DECLARE_EXTENSION_FUNCTION_NAME("metrics.recordMediumTime")
58 };
59
60 class MetricsRecordLongTimeFunction : public MetricsHistogramHelperFunction {
61 virtual bool RunImpl();
62 DECLARE_EXTENSION_FUNCTION_NAME("metrics.recordLongTime")
63 };
64
65 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_METRICS_MODULE_H__
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_metrics_apitest.cc ('k') | chrome/browser/extensions/extension_metrics_module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698