Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1337)

Side by Side Diff: components/safe_browsing_db/util.cc

Issue 1703413002: Move common PVer4 code into a V4ProtocolManagerUtil class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Pass config as pointer, instead of reference Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « components/safe_browsing_db/util.h ('k') | components/safe_browsing_db/v4_get_hash_protocol_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698