| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_INTERSTITIALS_CHROME_METRICS_HELPER_H_ | 5 #ifndef CHROME_BROWSER_INTERSTITIALS_CHROME_METRICS_HELPER_H_ |
| 6 #define CHROME_BROWSER_INTERSTITIALS_CHROME_METRICS_HELPER_H_ | 6 #define CHROME_BROWSER_INTERSTITIALS_CHROME_METRICS_HELPER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "chrome/common/features.h" |
| 11 #include "components/security_interstitials/core/metrics_helper.h" | 12 #include "components/security_interstitials/core/metrics_helper.h" |
| 12 #include "url/gurl.h" | 13 #include "url/gurl.h" |
| 13 | 14 |
| 14 namespace content { | 15 namespace content { |
| 15 class WebContents; | 16 class WebContents; |
| 16 } | 17 } |
| 17 | 18 |
| 18 namespace extensions { | 19 namespace extensions { |
| 19 class ExperienceSamplingEvent; | 20 class ExperienceSamplingEvent; |
| 20 } | 21 } |
| (...skipping 18 matching lines...) Expand all Loading... |
| 39 | 40 |
| 40 protected: | 41 protected: |
| 41 // security_interstitials::MetricsHelper methods: | 42 // security_interstitials::MetricsHelper methods: |
| 42 void RecordExtraUserDecisionMetrics( | 43 void RecordExtraUserDecisionMetrics( |
| 43 security_interstitials::MetricsHelper::Decision decision) override; | 44 security_interstitials::MetricsHelper::Decision decision) override; |
| 44 void RecordExtraUserInteractionMetrics( | 45 void RecordExtraUserInteractionMetrics( |
| 45 security_interstitials::MetricsHelper::Interaction interaction) override; | 46 security_interstitials::MetricsHelper::Interaction interaction) override; |
| 46 void RecordExtraShutdownMetrics() override; | 47 void RecordExtraShutdownMetrics() override; |
| 47 | 48 |
| 48 private: | 49 private: |
| 49 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) || defined(ENABLE_EXTENSIONS) | 50 #if BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION) || defined(ENABLE_EXTENSIONS) |
| 50 content::WebContents* web_contents_; | 51 content::WebContents* web_contents_; |
| 51 #endif | 52 #endif |
| 52 const GURL request_url_; | 53 const GURL request_url_; |
| 53 const std::string sampling_event_name_; | 54 const std::string sampling_event_name_; |
| 54 #if defined(ENABLE_EXTENSIONS) | 55 #if defined(ENABLE_EXTENSIONS) |
| 55 std::unique_ptr<extensions::ExperienceSamplingEvent> sampling_event_; | 56 std::unique_ptr<extensions::ExperienceSamplingEvent> sampling_event_; |
| 56 #endif | 57 #endif |
| 57 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) | 58 #if BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION) |
| 58 std::unique_ptr<CaptivePortalMetricsRecorder> captive_portal_recorder_; | 59 std::unique_ptr<CaptivePortalMetricsRecorder> captive_portal_recorder_; |
| 59 #endif | 60 #endif |
| 60 | 61 |
| 61 DISALLOW_COPY_AND_ASSIGN(ChromeMetricsHelper); | 62 DISALLOW_COPY_AND_ASSIGN(ChromeMetricsHelper); |
| 62 }; | 63 }; |
| 63 | 64 |
| 64 #endif // CHROME_BROWSER_INTERSTITIALS_CHROME_METRICS_HELPER_H_ | 65 #endif // CHROME_BROWSER_INTERSTITIALS_CHROME_METRICS_HELPER_H_ |
| OLD | NEW |