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

Unified Diff: components/security_interstitials/core/metrics_helper.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 | « components/rappor/rappor_parameters.h ('k') | components/security_interstitials/core/metrics_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/security_interstitials/core/metrics_helper.h
diff --git a/components/security_interstitials/core/metrics_helper.h b/components/security_interstitials/core/metrics_helper.h
index f265f1b9bec1edb0d4ee86c6d9773429f808df5a..7f41376e79ed76703f7120385fb12eeea59ecee9 100644
--- a/components/security_interstitials/core/metrics_helper.h
+++ b/components/security_interstitials/core/metrics_helper.h
@@ -21,11 +21,12 @@ class HistoryService;
namespace security_interstitials {
// MetricsHelper records user warning interactions in a common way via METRICS
-// histograms and, optionally, RAPPOR metrics. The class will generate the
+// histograms and, optionally, RAPPOR metrics. The class will generate the
// following histograms:
// METRICS: interstitial.<metric_prefix>.decision[.repeat_visit]
// METRICS: interstitial.<metric_prefix>.interaction[.repeat_visi]
-// RAPPOR: interstitial.<rappor_prefix>
+// RAPPOR: interstitial.<rappor_prefix> (SafeBrowsing parameters)
+// RAPPOR: interstitial.<rappor_prefix>2 (Low frequency parameters)
// wherein |metric_prefix| and |rappor_prefix| are specified via ReportDetails.
// repeat_visit is also generated if the user has seen the page before.
//
@@ -63,16 +64,25 @@ class MetricsHelper {
// placing at the end of the metric name. Examples:
// "from_datasaver", "from_device"
// rappor_prefix: Metric prefix for Rappor.
- // examples: "phishing", "ssl2"
- // rappor_report_type: Used to differentiate UMA and Safe Browsing statistics.
+ // examples: "phishing2", "ssl3"
+ // rappor_report_type: Specifies the low-frequency RAPPOR configuration to use
+ // (i.e. UMA or Safe Browsing).
+ // deprecated_rappor_report_type: Specifies the deprecated RAPPOR
+ // configuration to use for comparison with the
+ // low-frequency metric.
// The rappor preferences can be left blank if rappor_service is not set.
+ // TODO(dominickn): remove deprecated_rappor_report_type once sufficient
+ // comparison data has been collected and analysed - crbug.com/605836.
struct ReportDetails {
ReportDetails();
ReportDetails(const ReportDetails& other);
+ ~ReportDetails();
std::string metric_prefix;
std::string extra_suffix;
std::string rappor_prefix;
+ std::string deprecated_rappor_prefix;
rappor::RapporType rappor_report_type;
+ rappor::RapporType deprecated_rappor_report_type;
};
// Args:
@@ -113,7 +123,9 @@ class MetricsHelper {
void RecordUserDecisionToMetrics(Decision decision,
const std::string& histogram_name);
- void RecordUserDecisionToRappor(Decision decision);
+ void RecordUserDecisionToRappor(Decision decision,
+ const rappor::RapporType rappor_report_type,
+ const std::string& rappor_prefix);
const GURL request_url_;
const ReportDetails settings_;
base::WeakPtr<rappor::RapporService> rappor_service_;
« no previous file with comments | « components/rappor/rappor_parameters.h ('k') | components/security_interstitials/core/metrics_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698