Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Side by Side Diff: components/variations/service/variations_service.h

Issue 1984003002: Use low entropy for studies that send experiment IDs to Google properties. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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. Exposed for testing.
Alexei Svitkine (slow) 2016/05/18 15:03:30 Nit: "Exposed for testing." -> "Virtual for testin
jwd 2016/05/18 18:31:41 Done.
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698