Chromium Code Reviews| 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 CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_ |
| 6 #define CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_ | 6 #define CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <deque> | 10 #include <deque> |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 95 // can be saved. | 95 // can be saved. |
| 96 static const char kBrowserMetricsName[]; | 96 static const char kBrowserMetricsName[]; |
| 97 | 97 |
| 98 private: | 98 private: |
| 99 explicit ChromeMetricsServiceClient( | 99 explicit ChromeMetricsServiceClient( |
| 100 metrics::MetricsStateManager* state_manager); | 100 metrics::MetricsStateManager* state_manager); |
| 101 | 101 |
| 102 // Completes the two-phase initialization of ChromeMetricsServiceClient. | 102 // Completes the two-phase initialization of ChromeMetricsServiceClient. |
| 103 void Initialize(); | 103 void Initialize(); |
| 104 | 104 |
| 105 // Register providers to the MetricsService. These provide data from alternate | |
|
Alexei Svitkine (slow)
2017/02/06 16:07:39
Nit: Registers
rkaplow
2017/02/06 16:31:41
Done.
| |
| 106 // sources. | |
| 107 void RegisterMetricsServiceProviders(); | |
|
Alexei Svitkine (slow)
2017/02/06 16:07:39
Nit: Add a new line after this.
rkaplow
2017/02/06 16:31:41
Done.
| |
| 108 // Register providers to the UkmService. These provide data from alternate | |
|
Alexei Svitkine (slow)
2017/02/06 16:07:39
Nit: Registers
rkaplow
2017/02/06 16:31:41
Done.
| |
| 109 // sources. | |
| 110 void RegisterUKMProviders(); | |
| 111 | |
| 105 // Callback to chain init tasks: Pops and executes the next init task from | 112 // Callback to chain init tasks: Pops and executes the next init task from |
| 106 // |initialize_task_queue_|, then passes itself as callback for each init task | 113 // |initialize_task_queue_|, then passes itself as callback for each init task |
| 107 // to call upon completion. | 114 // to call upon completion. |
| 108 void OnInitNextTask(); | 115 void OnInitNextTask(); |
| 109 | 116 |
| 110 // Returns true iff profiler data should be included in the next metrics log. | 117 // Returns true iff profiler data should be included in the next metrics log. |
| 111 // NOTE: This method is probabilistic and also updates internal state as a | 118 // NOTE: This method is probabilistic and also updates internal state as a |
| 112 // side-effect when called, so it should only be called once per log. | 119 // side-effect when called, so it should only be called once per log. |
| 113 bool ShouldIncludeProfilerDataInLog(); | 120 bool ShouldIncludeProfilerDataInLog(); |
| 114 | 121 |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 230 // Whether this client has already uploaded profiler data during this session. | 237 // Whether this client has already uploaded profiler data during this session. |
| 231 // Profiler data is uploaded at most once per session. | 238 // Profiler data is uploaded at most once per session. |
| 232 bool has_uploaded_profiler_data_; | 239 bool has_uploaded_profiler_data_; |
| 233 | 240 |
| 234 base::WeakPtrFactory<ChromeMetricsServiceClient> weak_ptr_factory_; | 241 base::WeakPtrFactory<ChromeMetricsServiceClient> weak_ptr_factory_; |
| 235 | 242 |
| 236 DISALLOW_COPY_AND_ASSIGN(ChromeMetricsServiceClient); | 243 DISALLOW_COPY_AND_ASSIGN(ChromeMetricsServiceClient); |
| 237 }; | 244 }; |
| 238 | 245 |
| 239 #endif // CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_ | 246 #endif // CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_ |
| OLD | NEW |