Chromium Code Reviews| Index: components/rappor/rappor_metric.cc |
| diff --git a/components/rappor/rappor_metric.cc b/components/rappor/rappor_metric.cc |
| index f8ff16252e232ddbdbd258e6f337ed20b3d124f2..b4bd950af9d1741210b81dcdf54bbd893b1b63b2 100644 |
| --- a/components/rappor/rappor_metric.cc |
| +++ b/components/rappor/rappor_metric.cc |
| @@ -10,13 +10,15 @@ namespace rappor { |
| RapporMetric::RapporMetric(const std::string& metric_name, |
| const RapporParameters& parameters, |
| - int32_t cohort) |
| + int32_t cohort_seed) |
| : metric_name_(metric_name), |
| parameters_(parameters), |
| bloom_filter_(parameters.bloom_filter_size_bytes, |
| parameters.bloom_filter_hash_function_count, |
| - cohort * parameters.bloom_filter_hash_function_count) { |
| - DCHECK_GE(cohort, 0); |
| + (cohort_seed % parameters.num_cohorts) * |
|
ulfar
2014/05/27 17:52:14
This is the only place where I see parameters.num_
Steven Holte
2014/05/27 17:58:42
Yes, it's reporting the seed, and we'll just aggre
|
| + parameters.bloom_filter_hash_function_count) { |
| + DCHECK_GE(cohort_seed, 0); |
| + DCHECK_LT(cohort_seed, RapporParameters::kMaxCohorts); |
| } |
| RapporMetric::~RapporMetric() {} |