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