| 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 #ifndef CHROME_COMMON_METRICS_METRICS_SERVICE_BASE_H_ | 5 #ifndef CHROME_COMMON_METRICS_METRICS_SERVICE_BASE_H_ |
| 6 #define CHROME_COMMON_METRICS_METRICS_SERVICE_BASE_H_ | 6 #define CHROME_COMMON_METRICS_METRICS_SERVICE_BASE_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/metrics/histogram_base.h" | 9 #include "base/metrics/histogram_base.h" |
| 10 #include "base/metrics/histogram_flattener.h" | 10 #include "base/metrics/histogram_flattener.h" |
| 11 #include "base/metrics/histogram_snapshot_manager.h" | 11 #include "base/metrics/histogram_snapshot_manager.h" |
| 12 #include "chrome/common/metrics/metrics_log_manager.h" | 12 #include "components/metrics/metrics_log_manager.h" |
| 13 | 13 |
| 14 namespace base { | 14 namespace base { |
| 15 class HistogramSamples; | 15 class HistogramSamples; |
| 16 } // namespace base | 16 } // namespace base |
| 17 | 17 |
| 18 // This class provides base functionality for logging metrics data. | 18 // This class provides base functionality for logging metrics data. |
| 19 // TODO(ananta): Factor out more common code from chrome and chrome frame | 19 // TODO(ananta): Factor out more common code from chrome and chrome frame |
| 20 // metrics service into this class. | 20 // metrics service into this class. |
| 21 class MetricsServiceBase : public base::HistogramFlattener { | 21 class MetricsServiceBase : public base::HistogramFlattener { |
| 22 public: | 22 public: |
| (...skipping 18 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 // Record complete list of histograms into the current log. | 42 // Record complete list of histograms into the current log. |
| 43 // Called when we close a log. | 43 // Called when we close a log. |
| 44 void RecordCurrentHistograms(); | 44 void RecordCurrentHistograms(); |
| 45 | 45 |
| 46 // Record complete list of stability histograms into the current log, | 46 // Record complete list of stability histograms into the current log, |
| 47 // i.e., histograms with the |kUmaStabilityHistogramFlag| flag set. | 47 // i.e., histograms with the |kUmaStabilityHistogramFlag| flag set. |
| 48 void RecordCurrentStabilityHistograms(); | 48 void RecordCurrentStabilityHistograms(); |
| 49 | 49 |
| 50 // Manager for the various in-flight logs. | 50 // Manager for the various in-flight logs. |
| 51 MetricsLogManager log_manager_; | 51 metrics::MetricsLogManager log_manager_; |
| 52 | 52 |
| 53 private: | 53 private: |
| 54 // |histogram_snapshot_manager_| prepares histogram deltas for transmission. | 54 // |histogram_snapshot_manager_| prepares histogram deltas for transmission. |
| 55 base::HistogramSnapshotManager histogram_snapshot_manager_; | 55 base::HistogramSnapshotManager histogram_snapshot_manager_; |
| 56 | 56 |
| 57 DISALLOW_COPY_AND_ASSIGN(MetricsServiceBase); | 57 DISALLOW_COPY_AND_ASSIGN(MetricsServiceBase); |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 #endif // CHROME_COMMON_METRICS_METRICS_SERVICE_BASE_H_ | 60 #endif // CHROME_COMMON_METRICS_METRICS_SERVICE_BASE_H_ |
| OLD | NEW |