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

Side by Side Diff: metrics_library.h

Issue 6130003: metrics: Add SendUserActionToUMA() to MetricsLibraryMock. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/metrics.git@master
Patch Set: Created 9 years, 11 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
« no previous file with comments | « no previous file | metrics_library_mock.h » ('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) 2010 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium OS 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 METRICS_LIBRARY_H_ 5 #ifndef METRICS_LIBRARY_H_
6 #define METRICS_LIBRARY_H_ 6 #define METRICS_LIBRARY_H_
7 7
8 #include <sys/types.h> 8 #include <sys/types.h>
9 #include <string> 9 #include <string>
10 10
11 #include <gtest/gtest_prod.h> // for FRIEND_TEST 11 #include <gtest/gtest_prod.h> // for FRIEND_TEST
12 12
13 class MetricsLibraryInterface { 13 class MetricsLibraryInterface {
14 public: 14 public:
15 virtual void Init() = 0; 15 virtual void Init() = 0;
16 virtual bool SendToUMA(const std::string& name, int sample, 16 virtual bool SendToUMA(const std::string& name, int sample,
17 int min, int max, int nbuckets) = 0; 17 int min, int max, int nbuckets) = 0;
18 virtual bool SendEnumToUMA(const std::string& name, int sample, int max) = 0; 18 virtual bool SendEnumToUMA(const std::string& name, int sample, int max) = 0;
19 virtual bool SendUserActionToUMA(const std::string& action) = 0;
19 virtual ~MetricsLibraryInterface() {} 20 virtual ~MetricsLibraryInterface() {}
20 }; 21 };
21 22
22 // Library used to send metrics to both Autotest and Chrome/UMA. 23 // Library used to send metrics to both Autotest and Chrome/UMA.
23 class MetricsLibrary : public MetricsLibraryInterface { 24 class MetricsLibrary : public MetricsLibraryInterface {
24 public: 25 public:
25 MetricsLibrary(); 26 MetricsLibrary();
26 27
27 // Initializes the library. 28 // Initializes the library.
28 void Init(); 29 void Init();
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 static time_t cached_enabled_time_; 119 static time_t cached_enabled_time_;
119 120
120 // Cached state of whether or not metrics were enabled. 121 // Cached state of whether or not metrics were enabled.
121 static bool cached_enabled_; 122 static bool cached_enabled_;
122 123
123 const char* uma_events_file_; 124 const char* uma_events_file_;
124 const char* consent_file_; 125 const char* consent_file_;
125 }; 126 };
126 127
127 #endif // METRICS_LIBRARY_H_ 128 #endif // METRICS_LIBRARY_H_
OLDNEW
« no previous file with comments | « no previous file | metrics_library_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698