| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 // Utilities for the SafeBrowsing DB code. | 5 // Utilities for the SafeBrowsing DB code. |
| 6 | 6 |
| 7 #ifndef COMPONENTS_SAFE_BROWSING_DB_UTIL_H_ | 7 #ifndef COMPONENTS_SAFE_BROWSING_DB_UTIL_H_ |
| 8 #define COMPONENTS_SAFE_BROWSING_DB_UTIL_H_ | 8 #define COMPONENTS_SAFE_BROWSING_DB_UTIL_H_ |
| 9 | 9 |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 // The Chrome extension or app (given by its ID) is malware. | 44 // The Chrome extension or app (given by its ID) is malware. |
| 45 SB_THREAT_TYPE_EXTENSION, | 45 SB_THREAT_TYPE_EXTENSION, |
| 46 | 46 |
| 47 // Url detected by the client-side malware IP list. This IP list is part | 47 // Url detected by the client-side malware IP list. This IP list is part |
| 48 // of the client side detection model. | 48 // of the client side detection model. |
| 49 SB_THREAT_TYPE_CLIENT_SIDE_MALWARE_URL, | 49 SB_THREAT_TYPE_CLIENT_SIDE_MALWARE_URL, |
| 50 | 50 |
| 51 // Url leads to a blacklisted resource script. Note that no warnings should be | 51 // Url leads to a blacklisted resource script. Note that no warnings should be |
| 52 // shown on this threat type, but an incident report might be sent. | 52 // shown on this threat type, but an incident report might be sent. |
| 53 SB_THREAT_TYPE_BLACKLISTED_RESOURCE, | 53 SB_THREAT_TYPE_BLACKLISTED_RESOURCE, |
| 54 |
| 55 // Url abuses a permission API. |
| 56 SB_THREAT_TYPE_API_ABUSE, |
| 54 }; | 57 }; |
| 55 | 58 |
| 56 // Metadata that indicates what kind of URL match this is. | 59 // Metadata that indicates what kind of URL match this is. |
| 57 enum class ThreatPatternType { | 60 enum class ThreatPatternType { |
| 58 NONE = 0, // Pattern type didn't appear in the metadata | 61 NONE = 0, // Pattern type didn't appear in the metadata |
| 59 MALWARE_LANDING = 1, // The match is a malware landing page | 62 MALWARE_LANDING = 1, // The match is a malware landing page |
| 60 MALWARE_DISTRIBUTION = 2, // The match is a malware distribution page | 63 MALWARE_DISTRIBUTION = 2, // The match is a malware distribution page |
| 61 SOCIAL_ENGINEERING_ADS = 3, // The match is a social engineering ads page | 64 SOCIAL_ENGINEERING_ADS = 3, // The match is a social engineering ads page |
| 62 SOCIAL_ENGINEERING_LANDING = 4, // The match is a social engineering landing | 65 SOCIAL_ENGINEERING_LANDING = 4, // The match is a social engineering landing |
| 63 // page | 66 // page |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 | 212 |
| 210 // Given a URL, returns all the paths we need to check. | 213 // Given a URL, returns all the paths we need to check. |
| 211 void GeneratePathsToCheck(const GURL& url, std::vector<std::string>* paths); | 214 void GeneratePathsToCheck(const GURL& url, std::vector<std::string>* paths); |
| 212 | 215 |
| 213 // Given a URL, returns all the patterns we need to check. | 216 // Given a URL, returns all the patterns we need to check. |
| 214 void GeneratePatternsToCheck(const GURL& url, std::vector<std::string>* urls); | 217 void GeneratePatternsToCheck(const GURL& url, std::vector<std::string>* urls); |
| 215 | 218 |
| 216 } // namespace safe_browsing | 219 } // namespace safe_browsing |
| 217 | 220 |
| 218 #endif // COMPONENTS_SAFE_BROWSING_DB_UTIL_H_ | 221 #endif // COMPONENTS_SAFE_BROWSING_DB_UTIL_H_ |
| OLD | NEW |