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 #include "components/safe_browsing_db/util.h" | 5 #include "components/safe_browsing_db/util.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 // SBCachedFullHashResult ------------------------------------------------------ | 32 // SBCachedFullHashResult ------------------------------------------------------ |
33 | 33 |
34 SBCachedFullHashResult::SBCachedFullHashResult() {} | 34 SBCachedFullHashResult::SBCachedFullHashResult() {} |
35 | 35 |
36 SBCachedFullHashResult::SBCachedFullHashResult( | 36 SBCachedFullHashResult::SBCachedFullHashResult( |
37 const base::Time& in_expire_after) | 37 const base::Time& in_expire_after) |
38 : expire_after(in_expire_after) {} | 38 : expire_after(in_expire_after) {} |
39 | 39 |
40 SBCachedFullHashResult::~SBCachedFullHashResult() {} | 40 SBCachedFullHashResult::~SBCachedFullHashResult() {} |
41 | 41 |
42 // The Safe Browsing V4 server URL prefix. | |
43 const char kSbV4UrlPrefix[] = "https://safebrowsing.googleapis.com/v4"; | |
44 | |
45 // Listnames that browser can process. | 42 // Listnames that browser can process. |
46 const char kMalwareList[] = "goog-malware-shavar"; | 43 const char kMalwareList[] = "goog-malware-shavar"; |
47 const char kPhishingList[] = "goog-phish-shavar"; | 44 const char kPhishingList[] = "goog-phish-shavar"; |
48 const char kBinUrlList[] = "goog-badbinurl-shavar"; | 45 const char kBinUrlList[] = "goog-badbinurl-shavar"; |
49 const char kCsdWhiteList[] = "goog-csdwhite-sha256"; | 46 const char kCsdWhiteList[] = "goog-csdwhite-sha256"; |
50 const char kDownloadWhiteList[] = "goog-downloadwhite-digest256"; | 47 const char kDownloadWhiteList[] = "goog-downloadwhite-digest256"; |
51 const char kExtensionBlacklist[] = "goog-badcrxids-digestvar"; | 48 const char kExtensionBlacklist[] = "goog-badcrxids-digestvar"; |
52 const char kIPBlacklist[] = "goog-badip-digest256"; | 49 const char kIPBlacklist[] = "goog-badip-digest256"; |
53 const char kUnwantedUrlList[] = "goog-unwanted-shavar"; | 50 const char kUnwantedUrlList[] = "goog-unwanted-shavar"; |
54 const char kInclusionWhitelist[] = "goog-csdinclusionwhite-sha256"; | 51 const char kInclusionWhitelist[] = "goog-csdinclusionwhite-sha256"; |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 GenerateHostsToCheck(url, &hosts); | 411 GenerateHostsToCheck(url, &hosts); |
415 GeneratePathsToCheck(url, &paths); | 412 GeneratePathsToCheck(url, &paths); |
416 for (size_t h = 0; h < hosts.size(); ++h) { | 413 for (size_t h = 0; h < hosts.size(); ++h) { |
417 for (size_t p = 0; p < paths.size(); ++p) { | 414 for (size_t p = 0; p < paths.size(); ++p) { |
418 urls->push_back(hosts[h] + paths[p]); | 415 urls->push_back(hosts[h] + paths[p]); |
419 } | 416 } |
420 } | 417 } |
421 } | 418 } |
422 | 419 |
423 } // namespace safe_browsing | 420 } // namespace safe_browsing |
OLD | NEW |