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

Side by Side Diff: components/rappor/rappor_parameters.h

Issue 49753002: RAPPOR implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 11 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
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698