• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2015 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "base/test/mock_entropy_provider.h"
6 
7 #include <string_view>
8 
9 namespace base {
10 
MockEntropyProvider()11 MockEntropyProvider::MockEntropyProvider() : entropy_value_(0.5) {}
MockEntropyProvider(double entropy_value)12 MockEntropyProvider::MockEntropyProvider(double entropy_value)
13     : entropy_value_(entropy_value) {}
14 MockEntropyProvider::~MockEntropyProvider() = default;
15 
GetEntropyForTrial(std::string_view trial_name,uint32_t randomization_seed) const16 double MockEntropyProvider::GetEntropyForTrial(
17     std::string_view trial_name,
18     uint32_t randomization_seed) const {
19   return entropy_value_;
20 }
21 
22 }  // namespace base
23