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

Unified Diff: components/rappor/rappor_metric.cc

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, 2 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
« no previous file with comments | « no previous file | components/rappor/rappor_parameters.h » ('j') | components/rappor/rappor_service.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/rappor/rappor_metric.cc
diff --git a/components/rappor/rappor_metric.cc b/components/rappor/rappor_metric.cc
index 92765de6e89b79e7c3c02873c2c6403b53fb2fea..1624cf133096b01577d4b736cd2cff5262a47ac1 100644
--- a/components/rappor/rappor_metric.cc
+++ b/components/rappor/rappor_metric.cc
@@ -21,6 +21,9 @@ RapporMetric::RapporMetric(const std::string& metric_name,
parameters.bloom_filter_hash_function_count) {
DCHECK_GE(cohort_seed, 0);
DCHECK_LT(cohort_seed, RapporParameters::kMaxCohorts);
+ // Since cohort_seed is in the range [0, kMaxCohorts), num_cohorts should
+ // divide kMaxCohorts for each cohort to have equal weight.
+ DCHECK_EQ(RapporParameters::kMaxCohorts % parameters.num_cohorts, 0);
Alexei Svitkine (slow) 2014/10/03 20:28:50 Nit: Expected value goes on the left for DCHECK_EQ
Steven Holte 2014/10/03 21:41:11 Done.
}
RapporMetric::~RapporMetric() {}
« no previous file with comments | « no previous file | components/rappor/rappor_parameters.h » ('j') | components/rappor/rappor_service.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698