| 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 COMPONENTS_RAPPOR_RAPPOR_SERVICE_H_ | 5 #ifndef COMPONENTS_RAPPOR_RAPPOR_SERVICE_H_ |
| 6 #define COMPONENTS_RAPPOR_RAPPOR_SERVICE_H_ | 6 #define COMPONENTS_RAPPOR_RAPPOR_SERVICE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 // A callback for testing if incognito mode is active; | 150 // A callback for testing if incognito mode is active; |
| 151 const base::Callback<bool(void)> is_incognito_callback_; | 151 const base::Callback<bool(void)> is_incognito_callback_; |
| 152 | 152 |
| 153 // Client-side secret used to generate fake bits. | 153 // Client-side secret used to generate fake bits. |
| 154 std::string secret_; | 154 std::string secret_; |
| 155 | 155 |
| 156 // The cohort this client is assigned to. -1 is uninitialized. | 156 // The cohort this client is assigned to. -1 is uninitialized. |
| 157 int32_t cohort_; | 157 int32_t cohort_; |
| 158 | 158 |
| 159 // Timer which schedules calls to OnLogInterval(). | 159 // Timer which schedules calls to OnLogInterval(). |
| 160 base::OneShotTimer<RapporService> log_rotation_timer_; | 160 base::OneShotTimer log_rotation_timer_; |
| 161 | 161 |
| 162 // A daily event for collecting metrics once a day. | 162 // A daily event for collecting metrics once a day. |
| 163 metrics::DailyEvent daily_event_; | 163 metrics::DailyEvent daily_event_; |
| 164 | 164 |
| 165 // A private LogUploader instance for sending reports to the server. | 165 // A private LogUploader instance for sending reports to the server. |
| 166 scoped_ptr<LogUploaderInterface> uploader_; | 166 scoped_ptr<LogUploaderInterface> uploader_; |
| 167 | 167 |
| 168 // The set of recording groups that metrics are being recorded, e.g. | 168 // The set of recording groups that metrics are being recorded, e.g. |
| 169 // UMA_RECORDING_GROUP | SAFEBROWSING_RECORDING_GROUP | 169 // UMA_RECORDING_GROUP | SAFEBROWSING_RECORDING_GROUP |
| 170 int recording_groups_; | 170 int recording_groups_; |
| 171 | 171 |
| 172 // We keep all registered metrics in a map, from name to metric. | 172 // We keep all registered metrics in a map, from name to metric. |
| 173 // The map owns the metrics it contains. | 173 // The map owns the metrics it contains. |
| 174 std::map<std::string, RapporMetric*> metrics_map_; | 174 std::map<std::string, RapporMetric*> metrics_map_; |
| 175 | 175 |
| 176 internal::Sampler sampler_; | 176 internal::Sampler sampler_; |
| 177 | 177 |
| 178 base::ThreadChecker thread_checker_; | 178 base::ThreadChecker thread_checker_; |
| 179 | 179 |
| 180 DISALLOW_COPY_AND_ASSIGN(RapporService); | 180 DISALLOW_COPY_AND_ASSIGN(RapporService); |
| 181 }; | 181 }; |
| 182 | 182 |
| 183 } // namespace rappor | 183 } // namespace rappor |
| 184 | 184 |
| 185 #endif // COMPONENTS_RAPPOR_RAPPOR_SERVICE_H_ | 185 #endif // COMPONENTS_RAPPOR_RAPPOR_SERVICE_H_ |
| OLD | NEW |