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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 // Starts the process of uploading metrics data. | 308 // Starts the process of uploading metrics data. |
309 void StartScheduledUpload(); | 309 void StartScheduledUpload(); |
310 | 310 |
311 // Called by the client when final log info collection is complete. | 311 // Called by the client when final log info collection is complete. |
312 void OnFinalLogInfoCollectionDone(); | 312 void OnFinalLogInfoCollectionDone(); |
313 | 313 |
314 // Either closes the current log or creates and closes the initial log | 314 // Either closes the current log or creates and closes the initial log |
315 // (depending on |state_|), and stages it for upload. | 315 // (depending on |state_|), and stages it for upload. |
316 void StageNewLog(); | 316 void StageNewLog(); |
317 | 317 |
| 318 // Returns true if any of the registered metrics providers have stability |
| 319 // metrics to report. |
| 320 bool ProvidersHaveStabilityMetrics(); |
| 321 |
318 // Prepares the initial stability log, which is only logged when the previous | 322 // Prepares the initial stability log, which is only logged when the previous |
319 // run of Chrome crashed. This log contains any stability metrics left over | 323 // run of Chrome crashed. This log contains any stability metrics left over |
320 // from that previous run, and only these stability metrics. It uses the | 324 // from that previous run, and only these stability metrics. It uses the |
321 // system profile from the previous session. | 325 // system profile from the previous session. |
322 void PrepareInitialStabilityLog(); | 326 void PrepareInitialStabilityLog(); |
323 | 327 |
324 // Prepares the initial metrics log, which includes startup histograms and | 328 // Prepares the initial metrics log, which includes startup histograms and |
325 // profiler data, as well as incremental stability-related metrics. | 329 // profiler data, as well as incremental stability-related metrics. |
326 void PrepareInitialMetricsLog(); | 330 void PrepareInitialMetricsLog(); |
327 | 331 |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, | 460 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, |
457 PermutedEntropyCacheClearedWhenLowEntropyReset); | 461 PermutedEntropyCacheClearedWhenLowEntropyReset); |
458 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, RegisterSyntheticTrial); | 462 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, RegisterSyntheticTrial); |
459 | 463 |
460 DISALLOW_COPY_AND_ASSIGN(MetricsService); | 464 DISALLOW_COPY_AND_ASSIGN(MetricsService); |
461 }; | 465 }; |
462 | 466 |
463 } // namespace metrics | 467 } // namespace metrics |
464 | 468 |
465 #endif // COMPONENTS_METRICS_METRICS_SERVICE_H_ | 469 #endif // COMPONENTS_METRICS_METRICS_SERVICE_H_ |
OLD | NEW |