| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_VARIATIONS_SERVICE_VARIATIONS_SERVICE_H_ | 5 #ifndef COMPONENTS_VARIATIONS_SERVICE_VARIATIONS_SERVICE_H_ |
| 6 #define COMPONENTS_VARIATIONS_SERVICE_VARIATIONS_SERVICE_H_ | 6 #define COMPONENTS_VARIATIONS_SERVICE_VARIATIONS_SERVICE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 | 171 |
| 172 // Stores the seed to prefs. Set as virtual and protected so that it can be | 172 // Stores the seed to prefs. Set as virtual and protected so that it can be |
| 173 // overridden by tests. | 173 // overridden by tests. |
| 174 virtual bool StoreSeed(const std::string& seed_data, | 174 virtual bool StoreSeed(const std::string& seed_data, |
| 175 const std::string& seed_signature, | 175 const std::string& seed_signature, |
| 176 const std::string& country_code, | 176 const std::string& country_code, |
| 177 const base::Time& date_fetched, | 177 const base::Time& date_fetched, |
| 178 bool is_delta_compressed, | 178 bool is_delta_compressed, |
| 179 bool is_gzip_compressed); | 179 bool is_gzip_compressed); |
| 180 | 180 |
| 181 // Create an entropy provider based on low entropy. This is used to create |
| 182 // trials for studies that should only depend on low entropy, such as studies |
| 183 // that send experiment IDs to Google web properties. Virtual for testing. |
| 184 virtual std::unique_ptr<const base::FieldTrial::EntropyProvider> |
| 185 CreateLowEntropyProvider(); |
| 186 |
| 181 // Creates the VariationsService with the given |local_state| prefs service | 187 // Creates the VariationsService with the given |local_state| prefs service |
| 182 // and |state_manager|. Does not take ownership of |state_manager|. Caller | 188 // and |state_manager|. Does not take ownership of |state_manager|. Caller |
| 183 // should ensure that |state_manager| is valid for the lifetime of this class. | 189 // should ensure that |state_manager| is valid for the lifetime of this class. |
| 184 // Use the |Create| factory method to create a VariationsService. | 190 // Use the |Create| factory method to create a VariationsService. |
| 185 VariationsService( | 191 VariationsService( |
| 186 std::unique_ptr<VariationsServiceClient> client, | 192 std::unique_ptr<VariationsServiceClient> client, |
| 187 std::unique_ptr<web_resource::ResourceRequestAllowedNotifier> notifier, | 193 std::unique_ptr<web_resource::ResourceRequestAllowedNotifier> notifier, |
| 188 PrefService* local_state, | 194 PrefService* local_state, |
| 189 metrics::MetricsStateManager* state_manager, | 195 metrics::MetricsStateManager* state_manager, |
| 190 const UIStringOverrider& ui_string_overrider); | 196 const UIStringOverrider& ui_string_overrider); |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 base::ThreadChecker thread_checker_; | 331 base::ThreadChecker thread_checker_; |
| 326 | 332 |
| 327 base::WeakPtrFactory<VariationsService> weak_ptr_factory_; | 333 base::WeakPtrFactory<VariationsService> weak_ptr_factory_; |
| 328 | 334 |
| 329 DISALLOW_COPY_AND_ASSIGN(VariationsService); | 335 DISALLOW_COPY_AND_ASSIGN(VariationsService); |
| 330 }; | 336 }; |
| 331 | 337 |
| 332 } // namespace variations | 338 } // namespace variations |
| 333 | 339 |
| 334 #endif // COMPONENTS_VARIATIONS_SERVICE_VARIATIONS_SERVICE_H_ | 340 #endif // COMPONENTS_VARIATIONS_SERVICE_VARIATIONS_SERVICE_H_ |
| OLD | NEW |