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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 // Caches individual response from GETHASH request. | 77 // Caches individual response from GETHASH request. |
78 struct SBCachedFullHashResult { | 78 struct SBCachedFullHashResult { |
79 SBCachedFullHashResult(); | 79 SBCachedFullHashResult(); |
80 explicit SBCachedFullHashResult(const base::Time& in_expire_after); | 80 explicit SBCachedFullHashResult(const base::Time& in_expire_after); |
81 ~SBCachedFullHashResult(); | 81 ~SBCachedFullHashResult(); |
82 | 82 |
83 base::Time expire_after; | 83 base::Time expire_after; |
84 std::vector<SBFullHashResult> full_hashes; | 84 std::vector<SBFullHashResult> full_hashes; |
85 }; | 85 }; |
86 | 86 |
87 // Safe Browsing V4 server URL prefix. | |
88 extern const char kSbV4UrlPrefix[]; | |
89 | |
90 // SafeBrowsing list names. | 87 // SafeBrowsing list names. |
91 extern const char kMalwareList[]; | 88 extern const char kMalwareList[]; |
92 extern const char kPhishingList[]; | 89 extern const char kPhishingList[]; |
93 // Binary Download list name. | 90 // Binary Download list name. |
94 extern const char kBinUrlList[]; | 91 extern const char kBinUrlList[]; |
95 // SafeBrowsing client-side detection whitelist list name. | 92 // SafeBrowsing client-side detection whitelist list name. |
96 extern const char kCsdWhiteList[]; | 93 extern const char kCsdWhiteList[]; |
97 // SafeBrowsing download whitelist list name. | 94 // SafeBrowsing download whitelist list name. |
98 extern const char kDownloadWhiteList[]; | 95 extern const char kDownloadWhiteList[]; |
99 // SafeBrowsing extension list name. | 96 // SafeBrowsing extension list name. |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 | 178 |
182 // Given a URL, returns all the paths we need to check. | 179 // Given a URL, returns all the paths we need to check. |
183 void GeneratePathsToCheck(const GURL& url, std::vector<std::string>* paths); | 180 void GeneratePathsToCheck(const GURL& url, std::vector<std::string>* paths); |
184 | 181 |
185 // Given a URL, returns all the patterns we need to check. | 182 // Given a URL, returns all the patterns we need to check. |
186 void GeneratePatternsToCheck(const GURL& url, std::vector<std::string>* urls); | 183 void GeneratePatternsToCheck(const GURL& url, std::vector<std::string>* urls); |
187 | 184 |
188 } // namespace safe_browsing | 185 } // namespace safe_browsing |
189 | 186 |
190 #endif // COMPONENTS_SAFE_BROWSING_DB_UTIL_H_ | 187 #endif // COMPONENTS_SAFE_BROWSING_DB_UTIL_H_ |
OLD | NEW |