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 COMPONENTS_SECURITY_INTERSTITIALS_CORE_METRICS_HELPER_H_ | 5 #ifndef COMPONENTS_SECURITY_INTERSTITIALS_CORE_METRICS_HELPER_H_ |
6 #define COMPONENTS_SECURITY_INTERSTITIALS_CORE_METRICS_HELPER_H_ | 6 #define COMPONENTS_SECURITY_INTERSTITIALS_CORE_METRICS_HELPER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 // examples: "phishing", "ssl_overridable" | 60 // examples: "phishing", "ssl_overridable" |
61 // extra_suffix: If not-empty, will generate second set of metrics by | 61 // extra_suffix: If not-empty, will generate second set of metrics by |
62 // placing at the end of the metric name. Examples: | 62 // placing at the end of the metric name. Examples: |
63 // "from_datasaver", "from_device" | 63 // "from_datasaver", "from_device" |
64 // rappor_prefix: Metric prefix for Rappor. | 64 // rappor_prefix: Metric prefix for Rappor. |
65 // examples: "phishing", "ssl2" | 65 // examples: "phishing", "ssl2" |
66 // rappor_report_type: Used to differentiate UMA and Safe Browsing statistics. | 66 // rappor_report_type: Used to differentiate UMA and Safe Browsing statistics. |
67 // The rappor preferences can be left blank if rappor_service is not set. | 67 // The rappor preferences can be left blank if rappor_service is not set. |
68 struct ReportDetails { | 68 struct ReportDetails { |
69 ReportDetails(); | 69 ReportDetails(); |
| 70 ReportDetails(const ReportDetails& other); |
70 std::string metric_prefix; | 71 std::string metric_prefix; |
71 std::string extra_suffix; | 72 std::string extra_suffix; |
72 std::string rappor_prefix; | 73 std::string rappor_prefix; |
73 rappor::RapporType rappor_report_type; | 74 rappor::RapporType rappor_report_type; |
74 }; | 75 }; |
75 | 76 |
76 // Args: | 77 // Args: |
77 // url: URL of page that triggered the interstitial. Only origin is used. | 78 // url: URL of page that triggered the interstitial. Only origin is used. |
78 // history_service: Set this to record metrics based on whether the user | 79 // history_service: Set this to record metrics based on whether the user |
79 // has visited this hostname before. | 80 // has visited this hostname before. |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 rappor::RapporService* rappor_service_; | 118 rappor::RapporService* rappor_service_; |
118 int num_visits_; | 119 int num_visits_; |
119 base::CancelableTaskTracker request_tracker_; | 120 base::CancelableTaskTracker request_tracker_; |
120 | 121 |
121 DISALLOW_COPY_AND_ASSIGN(MetricsHelper); | 122 DISALLOW_COPY_AND_ASSIGN(MetricsHelper); |
122 }; | 123 }; |
123 | 124 |
124 } // namespace security_interstitials | 125 } // namespace security_interstitials |
125 | 126 |
126 #endif // COMPONENTS_SECURITY_INTERSTITIALS_CORE_METRICS_HELPER_H_ | 127 #endif // COMPONENTS_SECURITY_INTERSTITIALS_CORE_METRICS_HELPER_H_ |
OLD | NEW |