OLD | NEW |
---|---|
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 // This file defines a set of user experience metrics data recorded by | 5 // This file defines a set of user experience metrics data recorded by |
6 // the MetricsService. This is the unit of data that is sent to the server. | 6 // the MetricsService. This is the unit of data that is sent to the server. |
7 | 7 |
8 #ifndef CHROME_COMMON_METRICS_METRICS_LOG_BASE_H_ | 8 #ifndef COMPONENTS_METRICS_METRICS_LOG_BASE_H_ |
9 #define CHROME_COMMON_METRICS_METRICS_LOG_BASE_H_ | 9 #define COMPONENTS_METRICS_METRICS_LOG_BASE_H_ |
10 | 10 |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
14 #include "base/metrics/histogram.h" | 14 #include "base/metrics/histogram.h" |
15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
16 #include "chrome/common/metrics/proto/chrome_user_metrics_extension.pb.h" | 16 #include "components/metrics/proto/chrome_user_metrics_extension.pb.h" |
17 #include "content/public/common/page_transition_types.h" | |
18 | |
19 class GURL; | |
20 | 17 |
21 namespace base { | 18 namespace base { |
22 class HistogramSamples; | 19 class HistogramSamples; |
23 } // namespace base | 20 } // namespace base |
24 | 21 |
22 namespace metrics { | |
Ilya Sherman
2014/04/15 23:00:40
nit: There should be a blank line after this one.
| |
25 // This class provides base functionality for logging metrics data. | 23 // This class provides base functionality for logging metrics data. |
26 class MetricsLogBase { | 24 class MetricsLogBase { |
27 public: | 25 public: |
28 // TODO(asvitkine): Remove the NO_LOG value. | 26 // TODO(asvitkine): Remove the NO_LOG value. |
29 enum LogType { | 27 enum LogType { |
30 INITIAL_STABILITY_LOG, // The initial log containing stability stats. | 28 INITIAL_STABILITY_LOG, // The initial log containing stability stats. |
31 ONGOING_LOG, // Subsequent logs in a session. | 29 ONGOING_LOG, // Subsequent logs in a session. |
32 NO_LOG, // Placeholder value for when there is no log. | 30 NO_LOG, // Placeholder value for when there is no log. |
33 }; | 31 }; |
34 | 32 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
98 bool locked_; | 96 bool locked_; |
99 | 97 |
100 // The type of the log, i.e. initial or ongoing. | 98 // The type of the log, i.e. initial or ongoing. |
101 const LogType log_type_; | 99 const LogType log_type_; |
102 | 100 |
103 // Stores the protocol buffer representation for this log. | 101 // Stores the protocol buffer representation for this log. |
104 metrics::ChromeUserMetricsExtension uma_proto_; | 102 metrics::ChromeUserMetricsExtension uma_proto_; |
105 | 103 |
106 DISALLOW_COPY_AND_ASSIGN(MetricsLogBase); | 104 DISALLOW_COPY_AND_ASSIGN(MetricsLogBase); |
107 }; | 105 }; |
106 } // namespace metrics | |
Ilya Sherman
2014/04/15 23:00:40
nit: And, correspondingly, a blank line before thi
| |
108 | 107 |
109 #endif // CHROME_COMMON_METRICS_METRICS_LOG_BASE_H_ | 108 #endif // COMPONENTS_METRICS_METRICS_LOG_BASE_H_ |
OLD | NEW |