Chromium Code Reviews| Index: components/variations/service/variations_service.cc |
| diff --git a/components/variations/service/variations_service.cc b/components/variations/service/variations_service.cc |
| index d1f4cf3d7004042d5c82d5126f36a1a5c8889601..eb3695c326998fb509b8b800a26cefa1f4988e88 100644 |
| --- a/components/variations/service/variations_service.cc |
| +++ b/components/variations/service/variations_service.cc |
| @@ -336,6 +336,9 @@ bool VariationsService::CreateTrialsFromSeed(base::FeatureList* feature_list) { |
| const std::string latest_country = |
| local_state_->GetString(prefs::kVariationsCountry); |
| + |
| + std::unique_ptr<const base::FieldTrial::EntropyProvider> low_entropy_provider( |
| + GetLowEntropyProvider()); |
| // Note that passing |&ui_string_overrider_| via base::Unretained below is |
| // safe because the callback is executed synchronously. It is not possible |
| // to pass UIStringOverrider itself to VariationSeedProcesor as variations |
| @@ -347,7 +350,7 @@ bool VariationsService::CreateTrialsFromSeed(base::FeatureList* feature_list) { |
| LoadPermanentConsistencyCountry(current_version, latest_country), |
| base::Bind(&UIStringOverrider::OverrideUIString, |
| base::Unretained(&ui_string_overrider_)), |
| - feature_list); |
| + feature_list, low_entropy_provider.get()); |
| const base::Time now = base::Time::Now(); |
| @@ -595,6 +598,11 @@ bool VariationsService::StoreSeed(const std::string& seed_data, |
| return true; |
| } |
| +std::unique_ptr<const base::FieldTrial::EntropyProvider> |
| +VariationsService::GetLowEntropyProvider() { |
|
Alexei Svitkine (slow)
2016/05/17 16:31:35
Nit: CreateLowEntropyProvider.
Although, maybe no
jwd
2016/05/18 13:24:18
Done.
Yeah, it's for the tests.
|
| + return state_manager_->CreateLowEntropyProvider(); |
| +} |
| + |
| bool VariationsService::LoadSeed(VariationsSeed* seed) { |
| return seed_store_.LoadSeed(seed); |
| } |
| @@ -740,7 +748,7 @@ void VariationsService::PerformSimulationWithVersion( |
| const base::ElapsedTimer timer; |
| std::unique_ptr<const base::FieldTrial::EntropyProvider> entropy_provider = |
| - state_manager_->CreateEntropyProvider(); |
| + state_manager_->CreateDefaultEntropyProvider(); |
| variations::VariationsSeedSimulator seed_simulator(*entropy_provider); |
| const std::string latest_country = |