| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_HELPERS_H_ | 8 #ifndef CHROME_COMMON_METRICS_HELPERS_H_ |
| 9 #define CHROME_COMMON_METRICS_HELPERS_H_ | 9 #define CHROME_COMMON_METRICS_HELPERS_H_ |
| 10 #pragma once | 10 #pragma once |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 // The value is used to identify when a new build is run, so that previous | 92 // The value is used to identify when a new build is run, so that previous |
| 93 // reliability stats, from other builds, can be abandoned. | 93 // reliability stats, from other builds, can be abandoned. |
| 94 static int64 GetBuildTime(); | 94 static int64 GetBuildTime(); |
| 95 | 95 |
| 96 // Use |extension| in all uploaded appversions in addition to the standard | 96 // Use |extension| in all uploaded appversions in addition to the standard |
| 97 // version string. | 97 // version string. |
| 98 static void set_version_extension(const std::string& extension) { | 98 static void set_version_extension(const std::string& extension) { |
| 99 version_extension_ = extension; | 99 version_extension_ = extension; |
| 100 } | 100 } |
| 101 | 101 |
| 102 virtual MetricsLog* AsMetricsLog() { | 102 virtual MetricsLog* AsMetricsLog(); |
| 103 return NULL; | |
| 104 } | |
| 105 | 103 |
| 106 protected: | 104 protected: |
| 107 class XmlWrapper; | 105 class XmlWrapper; |
| 108 | 106 |
| 109 // Returns a string containing the current time. | 107 // Returns a string containing the current time. |
| 110 // Virtual so that it can be overridden for testing. | 108 // Virtual so that it can be overridden for testing. |
| 111 virtual std::string GetCurrentTimeString(); | 109 virtual std::string GetCurrentTimeString(); |
| 112 // Helper class that invokes StartElement from constructor, and EndElement | 110 // Helper class that invokes StartElement from constructor, and EndElement |
| 113 // from destructor. | 111 // from destructor. |
| 114 // | 112 // |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 const base::Histogram& histogram, | 266 const base::Histogram& histogram, |
| 269 const base::Histogram::SampleSet& snapshot); | 267 const base::Histogram::SampleSet& snapshot); |
| 270 virtual void InconsistencyDetected(int problem); | 268 virtual void InconsistencyDetected(int problem); |
| 271 virtual void UniqueInconsistencyDetected(int problem); | 269 virtual void UniqueInconsistencyDetected(int problem); |
| 272 virtual void SnapshotProblemResolved(int amount); | 270 virtual void SnapshotProblemResolved(int amount); |
| 273 | 271 |
| 274 DISALLOW_COPY_AND_ASSIGN(MetricsServiceBase); | 272 DISALLOW_COPY_AND_ASSIGN(MetricsServiceBase); |
| 275 }; | 273 }; |
| 276 | 274 |
| 277 #endif // CHROME_COMMON_METRICS_HELPERS_H_ | 275 #endif // CHROME_COMMON_METRICS_HELPERS_H_ |
| OLD | NEW |