Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(111)

Side by Side Diff: base/test/mock_entropy_provider.h

Issue 1984003002: Use low entropy for studies that send experiment IDs to Google properties. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/metrics/field_trial.cc ('k') | base/test/mock_entropy_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef BASE_TEST_MOCK_ENTROPY_PROVIDER_H_ 5 #ifndef BASE_TEST_MOCK_ENTROPY_PROVIDER_H_
6 #define BASE_TEST_MOCK_ENTROPY_PROVIDER_H_ 6 #define BASE_TEST_MOCK_ENTROPY_PROVIDER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
11 11
12 namespace base { 12 namespace base {
13 13
14 class MockEntropyProvider : public base::FieldTrial::EntropyProvider { 14 class MockEntropyProvider : public base::FieldTrial::EntropyProvider {
15 public: 15 public:
16 MockEntropyProvider();
17 MockEntropyProvider(double entropy_value);
Alexei Svitkine (slow) 2016/05/18 18:33:29 Nit: explicit
16 ~MockEntropyProvider() override; 18 ~MockEntropyProvider() override;
17 19
18 // base::FieldTrial::EntropyProvider: 20 // base::FieldTrial::EntropyProvider:
19 double GetEntropyForTrial(const std::string& trial_name, 21 double GetEntropyForTrial(const std::string& trial_name,
20 uint32_t randomization_seed) const override; 22 uint32_t randomization_seed) const override;
23
24 private:
25 double entropy_value_;
26
27 DISALLOW_COPY_AND_ASSIGN(MockEntropyProvider);
21 }; 28 };
22 29
23 } // namespace base 30 } // namespace base
24 31
25 #endif // BASE_TEST_MOCK_ENTROPY_PROVIDER_H_ 32 #endif // BASE_TEST_MOCK_ENTROPY_PROVIDER_H_
OLDNEW
« no previous file with comments | « base/metrics/field_trial.cc ('k') | base/test/mock_entropy_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698