Index: components/rappor/rappor_metric.h |
diff --git a/components/rappor/rappor_metric.h b/components/rappor/rappor_metric.h |
index 07f422ddf187a9fa67125a9333ed5b8d36c694ac..b36252d6c32e31257184c29e3c2222bbe4975758 100644 |
--- a/components/rappor/rappor_metric.h |
+++ b/components/rappor/rappor_metric.h |
@@ -35,6 +35,8 @@ class RapporMetric { |
~RapporMetric(); |
// Records an additional sample in the Bloom filter. |
+ // A random sample will be used when reporting this metric when more than one |
+ // sample is collected in the same reporting interval. |
void AddSample(const std::string& str); |
// Retrieves the current Bloom filter bits. |
@@ -48,9 +50,13 @@ class RapporMetric { |
// final report bits. |
ByteVector GetReport(const std::string& secret) const; |
+ // Specify the bytes to generate a report from, for testing purposes. |
+ void SetBytesForTesting(const ByteVector& bytes); |
+ |
private: |
const std::string metric_name_; |
const RapporParameters parameters_; |
+ uint32_t sample_count_; |
BloomFilter bloom_filter_; |
DISALLOW_COPY_AND_ASSIGN(RapporMetric); |