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 #ifndef CHROMECAST_BROWSER_METRICS_EXTERNAL_METRICS_H_ | 5 #ifndef CHROMECAST_BROWSER_METRICS_EXTERNAL_METRICS_H_ |
6 #define CHROMECAST_BROWSER_METRICS_EXTERNAL_METRICS_H_ | 6 #define CHROMECAST_BROWSER_METRICS_EXTERNAL_METRICS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 | 55 |
56 // Collects external events from metrics log file. This is run at periodic | 56 // Collects external events from metrics log file. This is run at periodic |
57 // intervals. | 57 // intervals. |
58 // | 58 // |
59 // Returns the number of events collected. | 59 // Returns the number of events collected. |
60 int CollectEvents(); | 60 int CollectEvents(); |
61 | 61 |
62 // Calls CollectEvents and reschedules a future collection. | 62 // Calls CollectEvents and reschedules a future collection. |
63 void CollectEventsAndReschedule(); | 63 void CollectEventsAndReschedule(); |
64 | 64 |
| 65 // Schedules a future collection. |
| 66 void ScheduleCollection(); |
| 67 |
65 // Reference to stability metrics provider, for reporting external crashes. | 68 // Reference to stability metrics provider, for reporting external crashes. |
66 CastStabilityMetricsProvider* const stability_provider_; | 69 CastStabilityMetricsProvider* const stability_provider_; |
67 | 70 |
68 // File used by libmetrics to send metrics to the browser process. | 71 // File used by libmetrics to send metrics to the browser process. |
69 const std::string uma_events_file_; | 72 const std::string uma_events_file_; |
70 | 73 |
71 base::WeakPtrFactory<ExternalMetrics> weak_factory_; | 74 base::WeakPtrFactory<ExternalMetrics> weak_factory_; |
72 | 75 |
73 DISALLOW_COPY_AND_ASSIGN(ExternalMetrics); | 76 DISALLOW_COPY_AND_ASSIGN(ExternalMetrics); |
74 }; | 77 }; |
75 | 78 |
76 } // namespace metrics | 79 } // namespace metrics |
77 } // namespace chromecast | 80 } // namespace chromecast |
78 | 81 |
79 #endif // CHROMECAST_BROWSER_METRICS_EXTERNAL_METRICS_H_ | 82 #endif // CHROMECAST_BROWSER_METRICS_EXTERNAL_METRICS_H_ |
OLD | NEW |