| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 service that collects information about the user | 5 // This file defines a service that collects information about the user |
| 6 // experience in order to help improve future versions of the app. | 6 // experience in order to help improve future versions of the app. |
| 7 | 7 |
| 8 #ifndef COMPONENTS_METRICS_METRICS_SERVICE_H_ | 8 #ifndef COMPONENTS_METRICS_METRICS_SERVICE_H_ |
| 9 #define COMPONENTS_METRICS_METRICS_SERVICE_H_ | 9 #define COMPONENTS_METRICS_METRICS_SERVICE_H_ |
| 10 | 10 |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 // Otherwise, it returns an entropy provider that is based on a low entropy | 146 // Otherwise, it returns an entropy provider that is based on a low entropy |
| 147 // source. | 147 // source. |
| 148 scoped_ptr<const base::FieldTrial::EntropyProvider> CreateEntropyProvider(); | 148 scoped_ptr<const base::FieldTrial::EntropyProvider> CreateEntropyProvider(); |
| 149 | 149 |
| 150 // At startup, prefs needs to be called with a list of all the pref names and | 150 // At startup, prefs needs to be called with a list of all the pref names and |
| 151 // types we'll be using. | 151 // types we'll be using. |
| 152 static void RegisterPrefs(PrefRegistrySimple* registry); | 152 static void RegisterPrefs(PrefRegistrySimple* registry); |
| 153 | 153 |
| 154 // HistogramFlattener: | 154 // HistogramFlattener: |
| 155 virtual void RecordDelta(const base::HistogramBase& histogram, | 155 virtual void RecordDelta(const base::HistogramBase& histogram, |
| 156 const base::HistogramSamples& snapshot) OVERRIDE; | 156 const base::HistogramSamples& snapshot) override; |
| 157 virtual void InconsistencyDetected( | 157 virtual void InconsistencyDetected( |
| 158 base::HistogramBase::Inconsistency problem) OVERRIDE; | 158 base::HistogramBase::Inconsistency problem) override; |
| 159 virtual void UniqueInconsistencyDetected( | 159 virtual void UniqueInconsistencyDetected( |
| 160 base::HistogramBase::Inconsistency problem) OVERRIDE; | 160 base::HistogramBase::Inconsistency problem) override; |
| 161 virtual void InconsistencyDetectedInLoggedCount(int amount) OVERRIDE; | 161 virtual void InconsistencyDetectedInLoggedCount(int amount) override; |
| 162 | 162 |
| 163 // This should be called when the application is not idle, i.e. the user seems | 163 // This should be called when the application is not idle, i.e. the user seems |
| 164 // to be interacting with the application. | 164 // to be interacting with the application. |
| 165 void OnApplicationNotIdle(); | 165 void OnApplicationNotIdle(); |
| 166 | 166 |
| 167 // Invoked when we get a WM_SESSIONEND. This places a value in prefs that is | 167 // Invoked when we get a WM_SESSIONEND. This places a value in prefs that is |
| 168 // reset when RecordCompletedSessionEnd is invoked. | 168 // reset when RecordCompletedSessionEnd is invoked. |
| 169 void RecordStartOfSessionEnd(); | 169 void RecordStartOfSessionEnd(); |
| 170 | 170 |
| 171 // This should be called when the application is shutting down. It records | 171 // This should be called when the application is shutting down. It records |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, | 466 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, |
| 467 PermutedEntropyCacheClearedWhenLowEntropyReset); | 467 PermutedEntropyCacheClearedWhenLowEntropyReset); |
| 468 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, RegisterSyntheticTrial); | 468 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, RegisterSyntheticTrial); |
| 469 | 469 |
| 470 DISALLOW_COPY_AND_ASSIGN(MetricsService); | 470 DISALLOW_COPY_AND_ASSIGN(MetricsService); |
| 471 }; | 471 }; |
| 472 | 472 |
| 473 } // namespace metrics | 473 } // namespace metrics |
| 474 | 474 |
| 475 #endif // COMPONENTS_METRICS_METRICS_SERVICE_H_ | 475 #endif // COMPONENTS_METRICS_METRICS_SERVICE_H_ |
| OLD | NEW |