OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 COMPONENTS_UKM_UKM_SERVICE_H_ | 5 #ifndef COMPONENTS_UKM_UKM_SERVICE_H_ |
6 #define COMPONENTS_UKM_UKM_SERVICE_H_ | 6 #define COMPONENTS_UKM_UKM_SERVICE_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <memory> | 9 #include <memory> |
10 #include <vector> | 10 #include <vector> |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 | 151 |
152 // A weak pointer to the PrefService used to read and write preferences. | 152 // A weak pointer to the PrefService used to read and write preferences. |
153 PrefService* pref_service_; | 153 PrefService* pref_service_; |
154 | 154 |
155 // Whether recording new data is currently allowed. | 155 // Whether recording new data is currently allowed. |
156 bool recording_enabled_; | 156 bool recording_enabled_; |
157 | 157 |
158 // The UKM client id stored in prefs. | 158 // The UKM client id stored in prefs. |
159 uint64_t client_id_; | 159 uint64_t client_id_; |
160 | 160 |
| 161 // The UKM session id stored in prefs. |
| 162 int32_t session_id_; |
| 163 |
161 // Used to interact with the embedder. Weak pointer; must outlive |this| | 164 // Used to interact with the embedder. Weak pointer; must outlive |this| |
162 // instance. | 165 // instance. |
163 metrics::MetricsServiceClient* const client_; | 166 metrics::MetricsServiceClient* const client_; |
164 | 167 |
165 // Registered metrics providers. | 168 // Registered metrics providers. |
166 std::vector<std::unique_ptr<metrics::MetricsProvider>> metrics_providers_; | 169 std::vector<std::unique_ptr<metrics::MetricsProvider>> metrics_providers_; |
167 | 170 |
168 // Logs that have not yet been sent. | 171 // Logs that have not yet been sent. |
169 metrics::PersistedLogs persisted_logs_; | 172 metrics::PersistedLogs persisted_logs_; |
170 | 173 |
(...skipping 18 matching lines...) Expand all Loading... |
189 // Weak pointers factory used to post task on different threads. All weak | 192 // Weak pointers factory used to post task on different threads. All weak |
190 // pointers managed by this factory have the same lifetime as UkmService. | 193 // pointers managed by this factory have the same lifetime as UkmService. |
191 base::WeakPtrFactory<UkmService> self_ptr_factory_; | 194 base::WeakPtrFactory<UkmService> self_ptr_factory_; |
192 | 195 |
193 DISALLOW_COPY_AND_ASSIGN(UkmService); | 196 DISALLOW_COPY_AND_ASSIGN(UkmService); |
194 }; | 197 }; |
195 | 198 |
196 } // namespace ukm | 199 } // namespace ukm |
197 | 200 |
198 #endif // COMPONENTS_UKM_UKM_SERVICE_H_ | 201 #endif // COMPONENTS_UKM_UKM_SERVICE_H_ |
OLD | NEW |