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

Unified Diff: components/rappor/rappor_parameters.h

Issue 1921533004: Add a low-frequency RAPPOR configuration, and use it for Safe Browsing and Permissions metrics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing nits Created 4 years, 8 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 | « chrome/browser/ssl/ssl_blocking_page.cc ('k') | components/security_interstitials/core/metrics_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/rappor/rappor_parameters.h
diff --git a/components/rappor/rappor_parameters.h b/components/rappor/rappor_parameters.h
index 2a8bae741ab733d7c8102a59d27e1800f1030e16..1696269f4c0a0c3bd55e310e76074d061ac378d1 100644
--- a/components/rappor/rappor_parameters.h
+++ b/components/rappor/rappor_parameters.h
@@ -13,17 +13,28 @@ namespace rappor {
enum NoiseLevel {
NO_NOISE = 0,
NORMAL_NOISE,
+ SPARSE_NOISE,
NUM_NOISE_LEVELS,
};
// The type of data stored in a metric.
+// Any use of the LOW_FREQUENCY types must be approved by Chrome Privacy and
+// the rappor-dev team.
enum RapporType {
// Generic metrics from UMA opt-in users.
UMA_RAPPOR_TYPE = 0,
- // Generic metrics for SafeBrowsing users.
+ // Generic metrics for SafeBrowsing users. Deprecated, replaced by
+ // LOW_FREQUENCY_SAFEBROWSING_RAPPOR_TYPE.
SAFEBROWSING_RAPPOR_TYPE,
// Deprecated: Use UMA_RAPPOR_TYPE for new metrics
ETLD_PLUS_ONE_RAPPOR_TYPE,
+ // Type for low-frequency metrics from UMA opt-in users.
+ LOW_FREQUENCY_UMA_RAPPOR_TYPE,
+ // Type for low-frequency metrics from SafeBrowsing users.
+ LOW_FREQUENCY_SAFEBROWSING_RAPPOR_TYPE,
+ // Type for low-frequency metrics from UMA opt-in users. Do not use for new
+ // metrics.
+ LOW_FREQUENCY_ETLD_PLUS_ONE_RAPPOR_TYPE,
NUM_RAPPOR_TYPES,
COARSE_RAPPOR_TYPE = SAFEBROWSING_RAPPOR_TYPE,
};
@@ -49,13 +60,16 @@ enum RecordingGroup {
// An object describing noise probabilities for a noise level
struct NoiseParameters {
- // The probability that a bit will be redacted with fake data.
+ // The probability that a bit will be redacted with fake data. This
+ // corresponds to the F privacy parameter.
Probability fake_prob;
// The probability that a fake bit will be a one.
Probability fake_one_prob;
- // The probability that a one bit in the redacted data reports as one.
+ // The probability that a one bit in the redacted data reports as one. This
+ // corresponds to the Q privacy parameter
Probability one_coin_prob;
- // The probability that a zero bit in the redacted data reports as one.
+ // The probability that a zero bit in the redacted data reports as one. This
+ // corresponds to the P privacy parameter.
Probability zero_coin_prob;
};
@@ -104,6 +118,13 @@ const NoiseParameters kNoiseParametersForLevel[NUM_NOISE_LEVELS] = {
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 */,
+ },
};
const RapporParameters kRapporParametersForType[NUM_RAPPOR_TYPES] = {
@@ -125,6 +146,24 @@ const RapporParameters kRapporParametersForType[NUM_RAPPOR_TYPES] = {
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 */,
+ 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 */,
+ 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 */,
+ UMA_RAPPOR_GROUP /* Recording group */},
};
} // namespace internal
« no previous file with comments | « chrome/browser/ssl/ssl_blocking_page.cc ('k') | components/security_interstitials/core/metrics_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698