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 // Datastructures that hold details of a Safe Browsing hit for reporting. | 5 // Datastructures that hold details of a Safe Browsing hit for reporting. |
6 | 6 |
7 #ifndef COMPONENTS_SAFE_BROWSING_DB_HIT_REPORT_H_ | 7 #ifndef COMPONENTS_SAFE_BROWSING_DB_HIT_REPORT_H_ |
8 #define COMPONENTS_SAFE_BROWSING_DB_HIT_REPORT_H_ | 8 #define COMPONENTS_SAFE_BROWSING_DB_HIT_REPORT_H_ |
9 | 9 |
10 #include "components/safe_browsing/common/safe_browsing_prefs.h" | 10 #include "components/safe_browsing/common/safe_browsing_prefs.h" |
11 #include "components/safe_browsing_db/util.h" | 11 #include "components/safe_browsing_db/util.h" |
12 #include "url/gurl.h" | 12 #include "url/gurl.h" |
13 | 13 |
14 namespace safe_browsing { | 14 namespace safe_browsing { |
15 | 15 |
16 // What service classified this threat as unsafe. | 16 // What service classified this threat as unsafe. |
17 enum class ThreatSource { | 17 enum class ThreatSource { |
18 UNKNOWN, | 18 UNKNOWN, |
19 DATA_SAVER, // From the Data Reduction service. | 19 DATA_SAVER, // From the Data Reduction service. |
20 LOCAL_PVER3, // From LocalSafeBrowsingDatabaseManager, protocol v3 | 20 LOCAL_PVER3, // From LocalSafeBrowsingDatabaseManager, protocol v3 |
21 LOCAL_PVER4, // From V4LocalDatabaseManager, protocol v4 | 21 LOCAL_PVER4, // From V4LocalDatabaseManager, protocol v4 |
22 REMOTE, // From RemoteSafeBrowsingDatabaseManager | 22 REMOTE, // From RemoteSafeBrowsingDatabaseManager |
23 CLIENT_SIDE_DETECTION, // From ClientSideDetectionHost | 23 CLIENT_SIDE_DETECTION, // From ClientSideDetectionHost |
| 24 PASSWORD_PROTECTION_SERVICE, // From PasswordProtectionService |
24 }; | 25 }; |
25 | 26 |
26 // Data to report about the contents of a particular threat (malware, phishing, | 27 // Data to report about the contents of a particular threat (malware, phishing, |
27 // unsafe download URL). If post_data is non-empty, the request will be | 28 // unsafe download URL). If post_data is non-empty, the request will be |
28 // sent as a POST instead of a GET. | 29 // sent as a POST instead of a GET. |
29 struct HitReport { | 30 struct HitReport { |
30 HitReport(); | 31 HitReport(); |
31 HitReport(const HitReport& other); | 32 HitReport(const HitReport& other); |
32 ~HitReport(); | 33 ~HitReport(); |
33 | 34 |
(...skipping 10 matching lines...) Expand all Loading... |
44 | 45 |
45 ExtendedReportingLevel extended_reporting_level; | 46 ExtendedReportingLevel extended_reporting_level; |
46 bool is_metrics_reporting_active; | 47 bool is_metrics_reporting_active; |
47 | 48 |
48 std::string post_data; | 49 std::string post_data; |
49 }; | 50 }; |
50 | 51 |
51 } // namespace safe_browsing | 52 } // namespace safe_browsing |
52 | 53 |
53 #endif // COMPONENTS_SAFE_BROWSING_DB_HIT_REPORT_H_ | 54 #endif // COMPONENTS_SAFE_BROWSING_DB_HIT_REPORT_H_ |
OLD | NEW |