Chromium Code Reviews| Index: components/rappor/rappor_parameters.h |
| diff --git a/components/rappor/rappor_parameters.h b/components/rappor/rappor_parameters.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..fb3c0aaa672f90e9d8550b74917512e81f874729 |
| --- /dev/null |
| +++ b/components/rappor/rappor_parameters.h |
| @@ -0,0 +1,48 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef COMPONENTS_RAPPOR_RAPPOR_PARAMETERS_H_ |
| +#define COMPONENTS_RAPPOR_RAPPOR_PARAMETERS_H_ |
| + |
| +#include <string> |
| + |
| +namespace rappor { |
| + |
| +enum Probability { |
| + PROBABILITY_75, // 75% |
| + PROBABILITY_50, // 50% |
| +}; |
| + |
| +// An object describing a rappor metric and the parameters used to generate it. |
| +// |
| +// For a full description of the rappor metrics, see |
| +// http://www.chromium.org/developers/design-documents/rappor |
| +struct RapporParameters { |
| + // Get a string representing the parameters, for DCHECK_EQ. |
| + std::string ToString() const; |
| + |
| + // The name of the metric. |
| + std::string rappor_name; |
| + |
| + // The number of bytes stored in the Bloom filter. |
| + int bloom_filter_size_bytes; |
| + // The number of hash functions used in the Bloom filter. |
| + int bloom_filter_hash_function_count; |
| + |
| + // The probability that a bit will be redacted with fake data. |
| + Probability fake_prob; |
| + // The probability that a fake bit will be a one. |
| + Probability fake_one_prob; |
| + |
| + // The probability that a one bit in the redacted data reports as one. |
| + Probability one_coin_prob; |
| + // The probability that a zero bit in the redacted data reports as one. |
| + Probability zero_coin_prob; |
| +}; |
| + |
| +extern const RapporParameters kHomePageRapporParameters; |
|
Alexei Svitkine (slow)
2014/02/04 19:20:12
Remove?
Steven Holte
2014/02/04 21:41:21
Done.
|
| + |
| +} // namespace rappor |
| + |
| +#endif // COMPONENTS_RAPPOR_RAPPOR_PARAMETERS_H_ |