| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_SAFE_BROWSING_DB_V4_PROTOCOL_MANAGER_UTIL_H_ | 5 #ifndef COMPONENTS_SAFE_BROWSING_DB_V4_PROTOCOL_MANAGER_UTIL_H_ |
| 6 #define COMPONENTS_SAFE_BROWSING_DB_V4_PROTOCOL_MANAGER_UTIL_H_ | 6 #define COMPONENTS_SAFE_BROWSING_DB_V4_PROTOCOL_MANAGER_UTIL_H_ |
| 7 | 7 |
| 8 // A class that implements the stateless methods used by the GetHashUpdate and | 8 // A class that implements the stateless methods used by the GetHashUpdate and |
| 9 // GetFullHash stubby calls made by Chrome using the SafeBrowsing V4 protocol. | 9 // GetFullHash stubby calls made by Chrome using the SafeBrowsing V4 protocol. |
| 10 | 10 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 // The URL is being used for phishing. | 86 // The URL is being used for phishing. |
| 87 SB_THREAT_TYPE_URL_PHISHING, | 87 SB_THREAT_TYPE_URL_PHISHING, |
| 88 | 88 |
| 89 // The URL hosts malware. | 89 // The URL hosts malware. |
| 90 SB_THREAT_TYPE_URL_MALWARE, | 90 SB_THREAT_TYPE_URL_MALWARE, |
| 91 | 91 |
| 92 // The URL hosts unwanted programs. | 92 // The URL hosts unwanted programs. |
| 93 SB_THREAT_TYPE_URL_UNWANTED, | 93 SB_THREAT_TYPE_URL_UNWANTED, |
| 94 | 94 |
| 95 // The download URL is malware. | 95 // The download URL is malware. |
| 96 SB_THREAT_TYPE_BINARY_MALWARE_URL, | 96 SB_THREAT_TYPE_URL_BINARY_MALWARE, |
| 97 | 97 |
| 98 // Url detected by the client-side phishing model. Note that unlike the | 98 // Url detected by the client-side phishing model. Note that unlike the |
| 99 // above values, this does not correspond to a downloaded list. | 99 // above values, this does not correspond to a downloaded list. |
| 100 SB_THREAT_TYPE_CLIENT_SIDE_PHISHING_URL, | 100 SB_THREAT_TYPE_URL_CLIENT_SIDE_PHISHING, |
| 101 | 101 |
| 102 // The Chrome extension or app (given by its ID) is malware. | 102 // The Chrome extension or app (given by its ID) is malware. |
| 103 SB_THREAT_TYPE_EXTENSION, | 103 SB_THREAT_TYPE_EXTENSION, |
| 104 | 104 |
| 105 // Url detected by the client-side malware IP list. This IP list is part | 105 // Url detected by the client-side malware IP list. This IP list is part |
| 106 // of the client side detection model. | 106 // of the client side detection model. |
| 107 SB_THREAT_TYPE_CLIENT_SIDE_MALWARE_URL, | 107 SB_THREAT_TYPE_URL_CLIENT_SIDE_MALWARE, |
| 108 | 108 |
| 109 // Url leads to a blacklisted resource script. Note that no warnings should be | 109 // Url leads to a blacklisted resource script. Note that no warnings should be |
| 110 // shown on this threat type, but an incident report might be sent. | 110 // shown on this threat type, but an incident report might be sent. |
| 111 SB_THREAT_TYPE_BLACKLISTED_RESOURCE, | 111 SB_THREAT_TYPE_BLACKLISTED_RESOURCE, |
| 112 | 112 |
| 113 // Url abuses a permission API. | 113 // Url abuses a permission API. |
| 114 SB_THREAT_TYPE_API_ABUSE, | 114 SB_THREAT_TYPE_API_ABUSE, |
| 115 | 115 |
| 116 // Activation patterns for the Subresource Filter. | 116 // Activation patterns for the Subresource Filter. |
| 117 SB_THREAT_TYPE_SUBRESOURCE_FILTER, | 117 SB_THREAT_TYPE_SUBRESOURCE_FILTER, |
| 118 | 118 |
| 119 // CSD Phishing whitelist. This "threat" means a URL matched the whitelist. | 119 // CSD Phishing whitelist. This "threat" means a URL matched the whitelist. |
| 120 SB_THREAT_TYPE_CSD_WHITELIST, | 120 SB_THREAT_TYPE_CSD_WHITELIST, |
| 121 | 121 |
| 122 // Url detected by password protection service. | 122 // Url detected by password protection service. |
| 123 SB_THREAT_TYPE_PASSWORD_PROTECTION_PHISHING_URL, | 123 SB_THREAT_TYPE_URL_PASSWORD_PROTECTION_PHISHING, |
| 124 }; | 124 }; |
| 125 | 125 |
| 126 // The information required to uniquely identify each list the client is | 126 // The information required to uniquely identify each list the client is |
| 127 // interested in maintaining and downloading from the SafeBrowsing servers. | 127 // interested in maintaining and downloading from the SafeBrowsing servers. |
| 128 // For example, for digests of Malware binaries on Windows: | 128 // For example, for digests of Malware binaries on Windows: |
| 129 // platform_type = WINDOWS, | 129 // platform_type = WINDOWS, |
| 130 // threat_entry_type = EXECUTABLE, | 130 // threat_entry_type = EXECUTABLE, |
| 131 // threat_type = MALWARE | 131 // threat_type = MALWARE |
| 132 class ListIdentifier { | 132 class ListIdentifier { |
| 133 public: | 133 public: |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 template <> | 374 template <> |
| 375 struct hash<safe_browsing::ListIdentifier> { | 375 struct hash<safe_browsing::ListIdentifier> { |
| 376 std::size_t operator()(const safe_browsing::ListIdentifier& id) const { | 376 std::size_t operator()(const safe_browsing::ListIdentifier& id) const { |
| 377 return id.hash(); | 377 return id.hash(); |
| 378 } | 378 } |
| 379 }; | 379 }; |
| 380 | 380 |
| 381 } // namespace std | 381 } // namespace std |
| 382 | 382 |
| 383 #endif // COMPONENTS_SAFE_BROWSING_DB_V4_PROTOCOL_MANAGER_UTIL_H_ | 383 #endif // COMPONENTS_SAFE_BROWSING_DB_V4_PROTOCOL_MANAGER_UTIL_H_ |
| OLD | NEW |