// Copyright 2015 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef COMPONENTS_SECURITY_INTERSTITIALS_CORE_METRICS_HELPER_H_ #define COMPONENTS_SECURITY_INTERSTITIALS_CORE_METRICS_HELPER_H_ #include <optional> #include <string> #include "base/task/cancelable_task_tracker.h" #include "base/time/time.h" #include "url/gurl.h" namespace history { class HistoryService; struct VisibleVisitCountToHostResult; } namespace security_interstitials { // MetricsHelper records user warning interactions in a common way via METRICS // histograms. The class will generate the following histograms: // METRICS: interstitial.<metric_prefix>.decision[.repeat_visit] // METRICS: interstitial.<metric_prefix>.interaction[.repeat_visit] // wherein |metric_prefix| is specified via ReportDetails. // repeat_visit is also generated if the user has seen the page before. // // If |extra_suffix| is not empty, MetricsHelper will append ".<extra_suffix>" // to generate an additional 2 or 4 more metrics. class MetricsHelper { … }; } // namespace security_interstitials #endif // COMPONENTS_SECURITY_INTERSTITIALS_CORE_METRICS_HELPER_H_