| 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 { |
| 23 |
| 25 // This class provides base functionality for logging metrics data. | 24 // This class provides base functionality for logging metrics data. |
| 26 class MetricsLogBase { | 25 class MetricsLogBase { |
| 27 public: | 26 public: |
| 28 // TODO(asvitkine): Remove the NO_LOG value. | 27 // TODO(asvitkine): Remove the NO_LOG value. |
| 29 enum LogType { | 28 enum LogType { |
| 30 INITIAL_STABILITY_LOG, // The initial log containing stability stats. | 29 INITIAL_STABILITY_LOG, // The initial log containing stability stats. |
| 31 ONGOING_LOG, // Subsequent logs in a session. | 30 ONGOING_LOG, // Subsequent logs in a session. |
| 32 NO_LOG, // Placeholder value for when there is no log. | 31 NO_LOG, // Placeholder value for when there is no log. |
| 33 }; | 32 }; |
| 34 | 33 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 | 98 |
| 100 // The type of the log, i.e. initial or ongoing. | 99 // The type of the log, i.e. initial or ongoing. |
| 101 const LogType log_type_; | 100 const LogType log_type_; |
| 102 | 101 |
| 103 // Stores the protocol buffer representation for this log. | 102 // Stores the protocol buffer representation for this log. |
| 104 metrics::ChromeUserMetricsExtension uma_proto_; | 103 metrics::ChromeUserMetricsExtension uma_proto_; |
| 105 | 104 |
| 106 DISALLOW_COPY_AND_ASSIGN(MetricsLogBase); | 105 DISALLOW_COPY_AND_ASSIGN(MetricsLogBase); |
| 107 }; | 106 }; |
| 108 | 107 |
| 109 #endif // CHROME_COMMON_METRICS_METRICS_LOG_BASE_H_ | 108 } // namespace metrics |
| 109 |
| 110 #endif // COMPONENTS_METRICS_METRICS_LOG_BASE_H_ |
| OLD | NEW |