Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 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 COMPONENTS_RAPPOR_RAPPOR_PARAMETERS_H_ | |
| 6 #define COMPONENTS_RAPPOR_RAPPOR_PARAMETERS_H_ | |
| 7 | |
| 8 #include <ostream> | |
|
Alexei Svitkine (slow)
2014/01/24 22:09:03
Remove
Steven Holte
2014/01/24 23:26:58
Done.
| |
| 9 #include <string> | |
| 10 | |
| 11 namespace rappor { | |
| 12 | |
| 13 enum Probability { | |
| 14 PROBABILITY_75, // 75% | |
| 15 PROBABILITY_50, // 50% | |
| 16 }; | |
| 17 | |
| 18 // An object describing a rappor metric and the parameters used to generate it. | |
| 19 // | |
| 20 // For a full description of the rappor metrics, see | |
| 21 // http://www.chromium.org/developers/design-documents/rappor | |
| 22 struct RapporParameters { | |
| 23 // Get a string representing the parameters, for DCHECK_EQ. | |
| 24 std::string ToString() const; | |
| 25 | |
| 26 // The name of the metric. | |
| 27 std::string rappor_name; | |
| 28 | |
| 29 // The number of bytes stored in the Bloom filter. | |
| 30 int bloom_filter_size_bytes; | |
| 31 // The number of hash functions used in the Bloom filter. | |
| 32 int bloom_filter_hash_function_count; | |
| 33 | |
| 34 // The probability that a bit will be redacted with fake data. | |
| 35 Probability fake_prob; | |
| 36 // The probability that a fake bit will be a one. | |
| 37 Probability fake_one_prob; | |
| 38 | |
| 39 // The probability that a one bit in the redacted data reports as one. | |
| 40 Probability one_coin_prob; | |
| 41 // The probability that a zero bit in the redacted data reports as one. | |
| 42 Probability zero_coin_prob; | |
| 43 }; | |
| 44 | |
| 45 } // namespace rappor | |
| 46 | |
| 47 #endif // COMPONENTS_RAPPOR_RAPPOR_PARAMETERS_H_ | |
| OLD | NEW |