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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
347 | 347 |
348 // Returns true if any of the registered metrics providers have critical | 348 // Returns true if any of the registered metrics providers have critical |
349 // stability metrics to report in an initial stability log. | 349 // stability metrics to report in an initial stability log. |
350 bool ProvidersHaveInitialStabilityMetrics(); | 350 bool ProvidersHaveInitialStabilityMetrics(); |
351 | 351 |
352 // Prepares the initial stability log, which is only logged when the previous | 352 // Prepares the initial stability log, which is only logged when the previous |
353 // run of Chrome crashed. This log contains any stability metrics left over | 353 // run of Chrome crashed. This log contains any stability metrics left over |
354 // from that previous run, and only these stability metrics. It uses the | 354 // from that previous run, and only these stability metrics. It uses the |
355 // system profile from the previous session. Returns true if a log was | 355 // system profile from the previous session. Returns true if a log was |
356 // created. | 356 // created. |
357 bool PrepareInitialStabilityLog(); | 357 bool PrepareInitialStabilityLog(const std::string& prefs_previous_version); |
Alexei Svitkine (slow)
2016/09/02 17:57:49
Nit: Document this parameter in the comment.
manzagop (departed)
2016/09/02 21:00:06
Done.
| |
358 | 358 |
359 // Prepares the initial metrics log, which includes startup histograms and | 359 // Prepares the initial metrics log, which includes startup histograms and |
360 // profiler data, as well as incremental stability-related metrics. | 360 // profiler data, as well as incremental stability-related metrics. |
361 void PrepareInitialMetricsLog(); | 361 void PrepareInitialMetricsLog(); |
362 | 362 |
363 // Uploads the currently staged log (which must be non-null). | 363 // Uploads the currently staged log (which must be non-null). |
364 void SendStagedLog(); | 364 void SendStagedLog(); |
365 | 365 |
366 // Called after transmission completes (either successfully or with failure). | 366 // Called after transmission completes (either successfully or with failure). |
367 void OnLogUploadComplete(int response_code); | 367 void OnLogUploadComplete(int response_code); |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
507 // Weak pointers factory used for saving state. All weak pointers managed by | 507 // Weak pointers factory used for saving state. All weak pointers managed by |
508 // this factory are invalidated in ScheduleNextStateSave. | 508 // this factory are invalidated in ScheduleNextStateSave. |
509 base::WeakPtrFactory<MetricsService> state_saver_factory_; | 509 base::WeakPtrFactory<MetricsService> state_saver_factory_; |
510 | 510 |
511 DISALLOW_COPY_AND_ASSIGN(MetricsService); | 511 DISALLOW_COPY_AND_ASSIGN(MetricsService); |
512 }; | 512 }; |
513 | 513 |
514 } // namespace metrics | 514 } // namespace metrics |
515 | 515 |
516 #endif // COMPONENTS_METRICS_METRICS_SERVICE_H_ | 516 #endif // COMPONENTS_METRICS_METRICS_SERVICE_H_ |
OLD | NEW |