1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_INTERSTITIALS_CHROME_METRICS_HELPER_H_
6 #define CHROME_BROWSER_INTERSTITIALS_CHROME_METRICS_HELPER_H_
10 #include "components/security_interstitials/core/metrics_helper.h"
17 namespace extensions
{
18 class ExperienceSamplingEvent
;
21 // This class adds desktop-Chrome-specific metrics (extension experience
22 // sampling) to the security_interstitials::MetricsHelper. Together, they
23 // record UMA, Rappor, and experience sampling metrics.
24 class ChromeMetricsHelper
: public security_interstitials::MetricsHelper
{
27 content::WebContents
* web_contents
,
29 const security_interstitials::MetricsHelper::ReportDetails settings
,
30 const std::string
& sampling_event_name
);
31 ~ChromeMetricsHelper() override
;
34 // security_interstitials::MetricsHelper methods:
35 void RecordExtraUserDecisionMetrics(
36 security_interstitials::MetricsHelper::Decision decision
) override
;
37 void RecordExtraUserInteractionMetrics(
38 security_interstitials::MetricsHelper::Interaction interaction
) override
;
41 content::WebContents
* web_contents_
;
42 const GURL request_url_
;
43 const std::string sampling_event_name_
;
44 #if defined(ENABLE_EXTENSIONS)
45 scoped_ptr
<extensions::ExperienceSamplingEvent
> sampling_event_
;
48 DISALLOW_COPY_AND_ASSIGN(ChromeMetricsHelper
);
51 #endif // CHROME_BROWSER_INTERSTITIALS_CHROME_METRICS_HELPER_H_