Make sure webrtc::VideoSource is released when WebRtcVideoTrackAdapter is destroyed.
[chromium-blink-merge.git] / components / rappor / rappor_parameters.h
blobca625ba4d8e3216969d5efe2b545aabb91878029
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.
5 #ifndef COMPONENTS_RAPPOR_RAPPOR_PARAMETERS_H_
6 #define COMPONENTS_RAPPOR_RAPPOR_PARAMETERS_H_
8 #include <string>
10 namespace rappor {
12 enum Probability {
13 PROBABILITY_75, // 75%
14 PROBABILITY_50, // 50%
15 PROBABILITY_25, // 25%
18 // An object describing a rappor metric and the parameters used to generate it.
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;
26 // The maximum number of cohorts we divide clients into.
27 static const int kMaxCohorts;
29 // The number of cohorts to divide the reports for this metric into.
30 int num_cohorts;
32 // The number of bytes stored in the Bloom filter.
33 int bloom_filter_size_bytes;
34 // The number of hash functions used in the Bloom filter.
35 int bloom_filter_hash_function_count;
37 // The probability that a bit will be redacted with fake data.
38 Probability fake_prob;
39 // The probability that a fake bit will be a one.
40 Probability fake_one_prob;
42 // The probability that a one bit in the redacted data reports as one.
43 Probability one_coin_prob;
44 // The probability that a zero bit in the redacted data reports as one.
45 Probability zero_coin_prob;
48 } // namespace rappor
50 #endif // COMPONENTS_RAPPOR_RAPPOR_PARAMETERS_H_