| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 #include "base/test/mock_entropy_provider.h" | 5 #include "base/test/mock_entropy_provider.h" |
| 6 | 6 |
| 7 namespace base { | 7 namespace base { |
| 8 | 8 |
| 9 MockEntropyProvider::MockEntropyProvider() : entropy_value_(0.5) {} |
| 10 MockEntropyProvider::MockEntropyProvider(double entropy_value) |
| 11 : entropy_value_(entropy_value) {} |
| 9 MockEntropyProvider::~MockEntropyProvider() {} | 12 MockEntropyProvider::~MockEntropyProvider() {} |
| 10 | 13 |
| 11 double MockEntropyProvider::GetEntropyForTrial( | 14 double MockEntropyProvider::GetEntropyForTrial( |
| 12 const std::string& trial_name, | 15 const std::string& trial_name, |
| 13 uint32_t randomization_seed) const { | 16 uint32_t randomization_seed) const { |
| 14 return 0.5; | 17 return entropy_value_; |
| 15 } | 18 } |
| 16 | 19 |
| 17 } // namespace base | 20 } // namespace base |
| OLD | NEW |