Chromium Code Reviews| Index: components/rappor/public/rappor_parameters.h |
| diff --git a/components/rappor/rappor_parameters.h b/components/rappor/public/rappor_parameters.h |
| similarity index 70% |
| rename from components/rappor/rappor_parameters.h |
| rename to components/rappor/public/rappor_parameters.h |
| index 1696269f4c0a0c3bd55e310e76074d061ac378d1..1bf151b8028ff324e5ffad28e2720cebad6c266c 100644 |
| --- a/components/rappor/rappor_parameters.h |
| +++ b/components/rappor/public/rappor_parameters.h |
| @@ -40,14 +40,13 @@ enum RapporType { |
| }; |
| enum Probability { |
| - PROBABILITY_100, // 100% |
| - PROBABILITY_75, // 75% |
| - PROBABILITY_50, // 50% |
| - PROBABILITY_25, // 25% |
| - PROBABILITY_0, // 0% |
| + PROBABILITY_100, // 100% |
| + PROBABILITY_75, // 75% |
| + PROBABILITY_50, // 50% |
| + PROBABILITY_25, // 25% |
| + PROBABILITY_0, // 0% |
| }; |
| - |
| // A metric is reported when its reporting group is in the set of groups |
| // passed in to RapporService::Start() |
| enum RecordingGroup { |
| @@ -57,7 +56,6 @@ enum RecordingGroup { |
| SAFEBROWSING_RAPPOR_GROUP = 1 << 1, |
| }; |
| - |
| // An object describing noise probabilities for a noise level |
| struct NoiseParameters { |
| // The probability that a bit will be redacted with fake data. This |
| @@ -106,63 +104,51 @@ namespace internal { |
| const NoiseParameters kNoiseParametersForLevel[NUM_NOISE_LEVELS] = { |
| // NO_NOISE |
| { |
| - rappor::PROBABILITY_0 /* Fake data probability */, |
| - rappor::PROBABILITY_0 /* Fake one probability */, |
| - rappor::PROBABILITY_100 /* One coin probability */, |
| - rappor::PROBABILITY_0 /* Zero coin probability */, |
| + rappor::PROBABILITY_0 /* Fake data probability */, |
| + rappor::PROBABILITY_0 /* Fake one probability */, |
| + rappor::PROBABILITY_100 /* One coin probability */, |
| + rappor::PROBABILITY_0 /* Zero coin probability */, |
| }, |
| // NORMAL_NOISE |
| { |
| - rappor::PROBABILITY_50 /* Fake data probability */, |
| - rappor::PROBABILITY_50 /* Fake one probability */, |
| - rappor::PROBABILITY_75 /* One coin probability */, |
| - rappor::PROBABILITY_25 /* Zero coin probability */, |
| + rappor::PROBABILITY_50 /* Fake data probability */, |
| + rappor::PROBABILITY_50 /* Fake one probability */, |
| + rappor::PROBABILITY_75 /* One coin probability */, |
| + rappor::PROBABILITY_25 /* Zero coin probability */, |
| }, |
| // SPARSE_NOISE |
| { |
| - rappor::PROBABILITY_25 /* Fake data probability */, |
| - rappor::PROBABILITY_50 /* Fake one probability */, |
| - rappor::PROBABILITY_75 /* One coin probability */, |
| - rappor::PROBABILITY_25 /* Zero coin probability */, |
| + rappor::PROBABILITY_25 /* Fake data probability */, |
| + rappor::PROBABILITY_50 /* Fake one probability */, |
| + rappor::PROBABILITY_75 /* One coin probability */, |
| + rappor::PROBABILITY_25 /* Zero coin probability */, |
| }, |
| }; |
| const RapporParameters kRapporParametersForType[NUM_RAPPOR_TYPES] = { |
| // UMA_RAPPOR_TYPE |
| - {128 /* Num cohorts */, |
| - 4 /* Bloom filter size bytes */, |
| - 2 /* Bloom filter hash count */, |
| - rappor::NORMAL_NOISE /* Noise level */, |
| + {128 /* Num cohorts */, 4 /* Bloom filter size bytes */, |
|
ncarter (slow)
2016/12/01 22:33:32
totally optional: if you want to preserve the old
Navid Zolghadr
2016/12/02 20:47:35
I guess git cl format made it like this. I changed
|
| + 2 /* Bloom filter hash count */, rappor::NORMAL_NOISE /* Noise level */, |
| UMA_RAPPOR_GROUP /* Recording group */}, |
| // SAFEBROWSING_RAPPOR_TYPE |
| - {128 /* Num cohorts */, |
| - 1 /* Bloom filter size bytes */, |
| - 2 /* Bloom filter hash count */, |
| - rappor::NORMAL_NOISE /* Noise level */, |
| + {128 /* Num cohorts */, 1 /* Bloom filter size bytes */, |
| + 2 /* Bloom filter hash count */, rappor::NORMAL_NOISE /* Noise level */, |
| SAFEBROWSING_RAPPOR_GROUP /* Recording group */}, |
| // ETLD_PLUS_ONE_RAPPOR_TYPE |
| - {128 /* Num cohorts */, |
| - 16 /* Bloom filter size bytes */, |
| - 2 /* Bloom filter hash count */, |
| - rappor::NORMAL_NOISE /* Noise level */, |
| + {128 /* Num cohorts */, 16 /* Bloom filter size bytes */, |
| + 2 /* Bloom filter hash count */, rappor::NORMAL_NOISE /* Noise level */, |
| UMA_RAPPOR_GROUP /* Recording group */}, |
| // LOW_FREQUENCY_UMA_RAPPOR_TYPE |
| - {128 /* Num cohorts */, |
| - 4 /* Bloom filter size bytes */, |
| - 2 /* Bloom filter hash count */, |
| - rappor::SPARSE_NOISE /* Noise level */, |
| + {128 /* Num cohorts */, 4 /* Bloom filter size bytes */, |
| + 2 /* Bloom filter hash count */, rappor::SPARSE_NOISE /* Noise level */, |
| UMA_RAPPOR_GROUP /* Recording group */}, |
| // LOW_FREQUENCY_SAFEBROWSING_RAPPOR_TYPE |
| - {128 /* Num cohorts */, |
| - 1 /* Bloom filter size bytes */, |
| - 2 /* Bloom filter hash count */, |
| - rappor::SPARSE_NOISE /* Noise level */, |
| + {128 /* Num cohorts */, 1 /* Bloom filter size bytes */, |
| + 2 /* Bloom filter hash count */, rappor::SPARSE_NOISE /* Noise level */, |
| SAFEBROWSING_RAPPOR_GROUP /* Recording group */}, |
| // LOW_FREQUENCY_ETLD_PLUS_ONE_RAPPOR_TYPE |
| - {128 /* Num cohorts */, |
| - 16 /* Bloom filter size bytes */, |
| - 2 /* Bloom filter hash count */, |
| - rappor::SPARSE_NOISE /* Noise level */, |
| + {128 /* Num cohorts */, 16 /* Bloom filter size bytes */, |
| + 2 /* Bloom filter hash count */, rappor::SPARSE_NOISE /* Noise level */, |
| UMA_RAPPOR_GROUP /* Recording group */}, |
| }; |