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

Unified Diff: components/rappor/rappor_parameters.h

Issue 509203002: Create a mechanism for reporting rappor metrics from non-UMA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « components/rappor/rappor_metric_unittest.cc ('k') | components/rappor/rappor_parameters.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/rappor/rappor_parameters.h
diff --git a/components/rappor/rappor_parameters.h b/components/rappor/rappor_parameters.h
index ca625ba4d8e3216969d5efe2b545aabb91878029..9fee850bf9ba64dcca3c65a10c14ae94c8ab26f4 100644
--- a/components/rappor/rappor_parameters.h
+++ b/components/rappor/rappor_parameters.h
@@ -15,6 +15,18 @@ enum Probability {
PROBABILITY_25, // 25%
};
+
+// A metric is reported when it's reporting level is >= the reporting level
+// passed in to RapporService::Start()
+enum ReportingLevel {
+ // No metrics are reported at this level.
+ REPORTING_DISABLED = 0,
+ // Metrics suitable for broader populations.
+ COARSE_LEVEL,
+ // Metrics suitable for UMA opt-in users.
+ FINE_LEVEL,
+};
+
// An object describing a rappor metric and the parameters used to generate it.
//
// For a full description of the rappor metrics, see
@@ -27,6 +39,8 @@ struct RapporParameters {
static const int kMaxCohorts;
// The number of cohorts to divide the reports for this metric into.
+ // This should divide kMaxCohorts evenly so that each cohort has an equal
+ // probability of being assigned users.
int num_cohorts;
// The number of bytes stored in the Bloom filter.
@@ -43,6 +57,9 @@ struct RapporParameters {
Probability one_coin_prob;
// The probability that a zero bit in the redacted data reports as one.
Probability zero_coin_prob;
+
+ // The reporting level this metric is reported at.
+ ReportingLevel reporting_level;
};
} // namespace rappor
« no previous file with comments | « components/rappor/rappor_metric_unittest.cc ('k') | components/rappor/rappor_parameters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698