| OLD | NEW | 
|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 code. | 5 // Utilities for the SafeBrowsing code. | 
| 6 | 6 | 
| 7 #ifndef CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_UTIL_H_ | 7 #ifndef CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_UTIL_H_ | 
| 8 #define CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_UTIL_H_ | 8 #define CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_UTIL_H_ | 
| 9 | 9 | 
| 10 #include <cstring> | 10 #include <cstring> | 
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 159 extern const char kMalwareList[]; | 159 extern const char kMalwareList[]; | 
| 160 extern const char kPhishingList[]; | 160 extern const char kPhishingList[]; | 
| 161 // Binary Download list name. | 161 // Binary Download list name. | 
| 162 extern const char kBinUrlList[]; | 162 extern const char kBinUrlList[]; | 
| 163 // SafeBrowsing client-side detection whitelist list name. | 163 // SafeBrowsing client-side detection whitelist list name. | 
| 164 extern const char kCsdWhiteList[]; | 164 extern const char kCsdWhiteList[]; | 
| 165 // SafeBrowsing download whitelist list name. | 165 // SafeBrowsing download whitelist list name. | 
| 166 extern const char kDownloadWhiteList[]; | 166 extern const char kDownloadWhiteList[]; | 
| 167 // SafeBrowsing extension list name. | 167 // SafeBrowsing extension list name. | 
| 168 extern const char kExtensionBlacklist[]; | 168 extern const char kExtensionBlacklist[]; | 
| 169 // SafeBrowsing side-effect free whitelist name. |  | 
| 170 extern const char kSideEffectFreeWhitelist[]; |  | 
| 171 // SafeBrowsing csd malware IP blacklist name. | 169 // SafeBrowsing csd malware IP blacklist name. | 
| 172 extern const char kIPBlacklist[]; | 170 extern const char kIPBlacklist[]; | 
| 173 // SafeBrowsing unwanted URL list. | 171 // SafeBrowsing unwanted URL list. | 
| 174 extern const char kUnwantedUrlList[]; | 172 extern const char kUnwantedUrlList[]; | 
| 175 // SafeBrowsing off-domain inclusion whitelist list name. | 173 // SafeBrowsing off-domain inclusion whitelist list name. | 
| 176 extern const char kInclusionWhitelist[]; | 174 extern const char kInclusionWhitelist[]; | 
| 177 | 175 | 
| 178 // This array must contain all Safe Browsing lists. | 176 // This array must contain all Safe Browsing lists. | 
| 179 extern const char* kAllLists[10]; | 177 extern const char* kAllLists[9]; | 
| 180 | 178 | 
| 181 enum ListType { | 179 enum ListType { | 
| 182   INVALID = -1, | 180   INVALID = -1, | 
| 183   MALWARE = 0, | 181   MALWARE = 0, | 
| 184   PHISH = 1, | 182   PHISH = 1, | 
| 185   BINURL = 2, | 183   BINURL = 2, | 
| 186   // Obsolete BINHASH = 3, | 184   // Obsolete BINHASH = 3, | 
| 187   CSDWHITELIST = 4, | 185   CSDWHITELIST = 4, | 
| 188   // SafeBrowsing lists are stored in pairs.  Keep ListType 5 | 186   // SafeBrowsing lists are stored in pairs.  Keep ListType 5 | 
| 189   // available for a potential second list that we would store in the | 187   // available for a potential second list that we would store in the | 
| 190   // csd-whitelist store file. | 188   // csd-whitelist store file. | 
| 191   DOWNLOADWHITELIST = 6, | 189   DOWNLOADWHITELIST = 6, | 
| 192   // See above comment. Leave 7 available. | 190   // See above comment. Leave 7 available. | 
| 193   EXTENSIONBLACKLIST = 8, | 191   EXTENSIONBLACKLIST = 8, | 
| 194   // See above comment. Leave 9 available. | 192   // See above comment. Leave 9 available. | 
| 195   SIDEEFFECTFREEWHITELIST = 10, | 193   // Obsolete SIDEEFFECTFREEWHITELIST = 10, | 
| 196   // See above comment. Leave 11 available. | 194   // See above comment. Leave 11 available. | 
| 197   IPBLACKLIST = 12, | 195   IPBLACKLIST = 12, | 
| 198   // See above comment.  Leave 13 available. | 196   // See above comment.  Leave 13 available. | 
| 199   UNWANTEDURL = 14, | 197   UNWANTEDURL = 14, | 
| 200   // See above comment.  Leave 15 available. | 198   // See above comment.  Leave 15 available. | 
| 201   INCLUSIONWHITELIST = 16, | 199   INCLUSIONWHITELIST = 16, | 
| 202   // See above comment.  Leave 17 available. | 200   // See above comment.  Leave 17 available. | 
| 203 }; | 201 }; | 
| 204 | 202 | 
| 205 // M40 experimental flag controls rollout of the UwS warning. | 203 // M40 experimental flag controls rollout of the UwS warning. | 
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 238 | 236 | 
| 239 SBFullHash StringToSBFullHash(const std::string& hash_in); | 237 SBFullHash StringToSBFullHash(const std::string& hash_in); | 
| 240 std::string SBFullHashToString(const SBFullHash& hash_out); | 238 std::string SBFullHashToString(const SBFullHash& hash_out); | 
| 241 | 239 | 
| 242 // Look up the status of the UwS warning. The default is off. | 240 // Look up the status of the UwS warning. The default is off. | 
| 243 UnwantedStatus GetUnwantedTrialGroup(); | 241 UnwantedStatus GetUnwantedTrialGroup(); | 
| 244 | 242 | 
| 245 }  // namespace safe_browsing_util | 243 }  // namespace safe_browsing_util | 
| 246 | 244 | 
| 247 #endif  // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_UTIL_H_ | 245 #endif  // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_UTIL_H_ | 
| OLD | NEW | 
|---|