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 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 void RecordCurrentEnvironment(MetricsLog* log); | 346 void RecordCurrentEnvironment(MetricsLog* log); |
347 | 347 |
348 // Record complete list of histograms into the current log. | 348 // Record complete list of histograms into the current log. |
349 // Called when we close a log. | 349 // Called when we close a log. |
350 void RecordCurrentHistograms(); | 350 void RecordCurrentHistograms(); |
351 | 351 |
352 // Record complete list of stability histograms into the current log, | 352 // Record complete list of stability histograms into the current log, |
353 // i.e., histograms with the |kUmaStabilityHistogramFlag| flag set. | 353 // i.e., histograms with the |kUmaStabilityHistogramFlag| flag set. |
354 void RecordCurrentStabilityHistograms(); | 354 void RecordCurrentStabilityHistograms(); |
355 | 355 |
| 356 // Record a single independent profile and assocatied histogram from |
| 357 // metrics providers. If this returns true, one was found and there may |
| 358 // be more. |
| 359 bool PrepareProviderMetricsLog(); |
| 360 |
| 361 // Records one independent histogram log and then reschedules itself to |
| 362 // check for others. The interval is so as to not adversely impact the UI. |
| 363 void PrepareProviderMetricsTask(); |
| 364 |
356 // Sub-service for uploading logs. | 365 // Sub-service for uploading logs. |
357 MetricsReportingService reporting_service_; | 366 MetricsReportingService reporting_service_; |
358 | 367 |
359 // Manager for the various in-flight logs. | 368 // Manager for the various in-flight logs. |
360 MetricsLogManager log_manager_; | 369 MetricsLogManager log_manager_; |
361 | 370 |
362 // |histogram_snapshot_manager_| prepares histogram deltas for transmission. | 371 // |histogram_snapshot_manager_| prepares histogram deltas for transmission. |
363 base::HistogramSnapshotManager histogram_snapshot_manager_; | 372 base::HistogramSnapshotManager histogram_snapshot_manager_; |
364 | 373 |
365 // Used to manage various metrics reporting state prefs, such as client id, | 374 // Used to manage various metrics reporting state prefs, such as client id, |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 // Weak pointers factory used to post task on different threads. All weak | 447 // Weak pointers factory used to post task on different threads. All weak |
439 // pointers managed by this factory have the same lifetime as MetricsService. | 448 // pointers managed by this factory have the same lifetime as MetricsService. |
440 base::WeakPtrFactory<MetricsService> self_ptr_factory_; | 449 base::WeakPtrFactory<MetricsService> self_ptr_factory_; |
441 | 450 |
442 DISALLOW_COPY_AND_ASSIGN(MetricsService); | 451 DISALLOW_COPY_AND_ASSIGN(MetricsService); |
443 }; | 452 }; |
444 | 453 |
445 } // namespace metrics | 454 } // namespace metrics |
446 | 455 |
447 #endif // COMPONENTS_METRICS_METRICS_SERVICE_H_ | 456 #endif // COMPONENTS_METRICS_METRICS_SERVICE_H_ |
OLD | NEW |