1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef BASE_TEST_MOCK_ENTROPY_PROVIDER_H_
6 #define BASE_TEST_MOCK_ENTROPY_PROVIDER_H_
7 
8 #include <stdint.h>
9 
10 #include "base/metrics/field_trial.h"
11 
12 namespace base {
13 
14 class MockEntropyProvider : public base::FieldTrial::EntropyProvider {
15  public:
16   MockEntropyProvider();
17   explicit MockEntropyProvider(double entropy_value);
18   ~MockEntropyProvider() override;
19 
20   // base::FieldTrial::EntropyProvider:
21   double GetEntropyForTrial(const std::string& trial_name,
22                             uint32_t randomization_seed) const override;
23 
24  private:
25   double entropy_value_;
26 
27   DISALLOW_COPY_AND_ASSIGN(MockEntropyProvider);
28 };
29 
30 }  // namespace base
31 
32 #endif  // BASE_TEST_MOCK_ENTROPY_PROVIDER_H_
33