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

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

Issue 10696145: Moving metrics to api/ . (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Putting back "using" and updating WATCHLISTS Created 8 years, 5 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
« no previous file with comments | « WATCHLISTS ('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_EXTENSION_METRICS_MODULE_H__ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_METRICS_METRICS_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_METRICS_MODULE_H__ 6 #define CHROME_BROWSER_EXTENSIONS_API_METRICS_METRICS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/metrics/histogram.h" 11 #include "base/metrics/histogram.h"
12 #include "chrome/browser/extensions/extension_function.h" 12 #include "chrome/browser/extensions/extension_function.h"
13 13
14 namespace extensions {
15
14 class MetricsRecordUserActionFunction : public SyncExtensionFunction { 16 class MetricsRecordUserActionFunction : public SyncExtensionFunction {
15 public: 17 public:
16 DECLARE_EXTENSION_FUNCTION_NAME("metricsPrivate.recordUserAction") 18 DECLARE_EXTENSION_FUNCTION_NAME("metricsPrivate.recordUserAction")
17 19
18 protected: 20 protected:
19 virtual ~MetricsRecordUserActionFunction() {} 21 virtual ~MetricsRecordUserActionFunction() {}
20 22
21 // ExtensionFunction: 23 // ExtensionFunction:
22 virtual bool RunImpl() OVERRIDE; 24 virtual bool RunImpl() OVERRIDE;
23 }; 25 };
24 26
25 class MetricsHistogramHelperFunction : public SyncExtensionFunction { 27 class MetricsHistogramHelperFunction : public SyncExtensionFunction {
26 protected: 28 protected:
27 virtual ~MetricsHistogramHelperFunction() {} 29 virtual ~MetricsHistogramHelperFunction() {}
28 bool GetNameAndSample(std::string* name, int* sample); 30 bool GetNameAndSample(std::string* name, int* sample);
29 virtual bool RecordValue(const std::string& name, 31 virtual bool RecordValue(const std::string& name,
30 base::Histogram::ClassType type, 32 base::Histogram::ClassType type,
31 int min, int max, size_t buckets, int sample); 33 int min, int max, size_t buckets,
34 int sample);
32 }; 35 };
33 36
34 class MetricsRecordValueFunction : public MetricsHistogramHelperFunction { 37 class MetricsRecordValueFunction : public MetricsHistogramHelperFunction {
35 public: 38 public:
36 DECLARE_EXTENSION_FUNCTION_NAME("metricsPrivate.recordValue") 39 DECLARE_EXTENSION_FUNCTION_NAME("metricsPrivate.recordValue")
37 40
38 protected: 41 protected:
39 virtual ~MetricsRecordValueFunction() {} 42 virtual ~MetricsRecordValueFunction() {}
40 43
41 // ExtensionFunction: 44 // ExtensionFunction:
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 public: 115 public:
113 DECLARE_EXTENSION_FUNCTION_NAME("metricsPrivate.recordLongTime") 116 DECLARE_EXTENSION_FUNCTION_NAME("metricsPrivate.recordLongTime")
114 117
115 protected: 118 protected:
116 virtual ~MetricsRecordLongTimeFunction() {} 119 virtual ~MetricsRecordLongTimeFunction() {}
117 120
118 // ExtensionFunction: 121 // ExtensionFunction:
119 virtual bool RunImpl() OVERRIDE; 122 virtual bool RunImpl() OVERRIDE;
120 }; 123 };
121 124
122 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_METRICS_MODULE_H__ 125 } // namespace extensions
126
127 #endif // CHROME_BROWSER_EXTENSIONS_API_METRICS_METRICS_H_
OLDNEW
« no previous file with comments | « WATCHLISTS ('k') | chrome/browser/extensions/api/metrics/metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698