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

Unified 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 side-by-side diff with in-line comments
Download patch
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..02e58cfcf65b1d5bb89e472fd361d93888831227
--- /dev/null
+++ b/components/rappor/rappor_parameters.h
@@ -0,0 +1,45 @@
+// Copyright (c) 2013 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_87_5, // 87.5%
+ PROBABILITY_75, // 75%
+ PROBABILITY_50, // 50%
+ PROBABILITY_25, // 25%
+ PROBABILITY_12_5, // 12.5%
+};
+
+// 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 {
+ // 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 hashes used in the bloom filter.
+ int bloom_filter_hash_count;
+
+ // The probability that a bit will be replaced 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 reports as one.
Ilya Sherman 2014/01/10 11:00:32 nit: Is this a true one bit, or any one bit, after
Steven Holte 2014/01/14 00:47:54 Done.
+ Probability one_coin_prob;
+ // The probability that a zero bit reports as one.
Ilya Sherman 2014/01/10 11:00:32 Ditto
Steven Holte 2014/01/14 00:47:54 Done.
+ Probability zero_coin_prob;
+};
Ilya Sherman 2014/01/10 11:00:32 nit: Should all of the fields in this struct be ma
Steven Holte 2014/01/14 00:47:54 I don't think that would be meaningful, since the
+
+} // namespace rappor
+
+#endif // COMPONENTS_RAPPOR_RAPPOR_PARAMETERS_H_

Powered by Google App Engine
This is Rietveld 408576698