Chromium Code Reviews| Index: components/rappor/rappor_metric.h |
| diff --git a/components/rappor/rappor_metric.h b/components/rappor/rappor_metric.h |
| index 30147c406851fabfc95aba5eb502da05d454784e..c9bb013dbe66fdbb87f16080683922482f182a34 100644 |
| --- a/components/rappor/rappor_metric.h |
| +++ b/components/rappor/rappor_metric.h |
| @@ -2,11 +2,15 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#ifndef COMPONENTS_RAPPOR_RAPPOR_H_ |
| -#define COMPONENTS_RAPPOR_RAPPOR_H_ |
| +// Change for readability |
| + |
| +#ifndef COMPONENTS_RAPPOR_RAPPOR_METRIC_H_ |
| +#define COMPONENTS_RAPPOR_RAPPOR_METRIC_H_ |
| #include <string> |
| +#include "base/basictypes.h" |
| +#include "base/macros.h" |
| #include "components/rappor/bloom_filter.h" |
| #include "components/rappor/byte_vector_utils.h" |
| #include "components/rappor/rappor_parameters.h" |
| @@ -16,17 +20,20 @@ namespace rappor { |
| // A RapporMetric is an object that collects string samples into a Bloom filter, |
| // and generates randomized reports about the collected data. |
| // |
| +// Metrics should be recorded through RapporService::RecordSample, rather than |
| +// instantiating RapporMetric objects directly. |
|
ktl
2014/03/18 08:35:01
Is this class then not supposed to be used by clie
Steven Holte
2014/03/19 23:46:55
Reworded.
|
| +// |
| // For a full description of the rappor metrics, see |
| // http://www.chromium.org/developers/design-documents/rappor |
| class RapporMetric { |
| public: |
| // Takes the |metric_name| that this will be reported to the server with, |
| - // a |parameters| describing size and probability weights to be used in |
| - // recording this metric, and cohort value, which modifies the hash |
| - // functions and used in the bloom filter. |
| - explicit RapporMetric(const std::string& metric_name, |
| - const RapporParameters& parameters, |
| - int32_t cohort); |
| + // a |parameters| describing size and probability weights used in recording |
| + // this metric, and a |cohort| value, which determines the hash functions |
| + // used in the Bloom filter. |
| + RapporMetric(const std::string& metric_name, |
| + const RapporParameters& parameters, |
| + int32_t cohort); |
| ~RapporMetric(); |
| // Records an additional sample in the Bloom filter. |
| @@ -53,4 +60,4 @@ class RapporMetric { |
| } // namespace rappor |
| -#endif // COMPONENTS_RAPPOR_RAPPOR_H_ |
| +#endif // COMPONENTS_RAPPOR_RAPPOR_METRIC_H_ |