dbeam | 7379294 | 2015-04-18 01:46:21 | [diff] [blame] | 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 | #include "base/test/mock_entropy_provider.h" |
| 6 | |
| 7 | namespace base { |
| 8 | |
jwd | 67c08f75 | 2016-05-18 21:04:59 | [diff] [blame] | 9 | MockEntropyProvider::MockEntropyProvider() : entropy_value_(0.5) {} |
| 10 | MockEntropyProvider::MockEntropyProvider(double entropy_value) |
| 11 | : entropy_value_(entropy_value) {} |
dbeam | 7379294 | 2015-04-18 01:46:21 | [diff] [blame] | 12 | MockEntropyProvider::~MockEntropyProvider() {} |
| 13 | |
| 14 | double MockEntropyProvider::GetEntropyForTrial( |
avi | d351e5a | 2015-12-24 03:28:02 | [diff] [blame] | 15 | const std::string& trial_name, |
| 16 | uint32_t randomization_seed) const { |
jwd | 67c08f75 | 2016-05-18 21:04:59 | [diff] [blame] | 17 | return entropy_value_; |
dbeam | 7379294 | 2015-04-18 01:46:21 | [diff] [blame] | 18 | } |
| 19 | |
| 20 | } // namespace base |