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

Unified Diff: chrome/browser/safe_browsing/protocol_parser.cc

Issue 8417040: Measure how often downloaded executables match the download whitelist. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Address Brian's comment. Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/safe_browsing/protocol_parser.cc
diff --git a/chrome/browser/safe_browsing/protocol_parser.cc b/chrome/browser/safe_browsing/protocol_parser.cc
index c6edf116dffa596233a38555a666322e18d03210..f8ab1aa75e9dc10c77f9112c0146c23e2e9e4e20 100644
--- a/chrome/browser/safe_browsing/protocol_parser.cc
+++ b/chrome/browser/safe_browsing/protocol_parser.cc
@@ -335,8 +335,9 @@ bool SafeBrowsingProtocolParser::ParseAddChunk(const std::string& list_name,
SBEntry::Type type = hash_len == sizeof(SBPrefix) ?
SBEntry::ADD_PREFIX : SBEntry::ADD_FULL_HASH;
- if (list_name == safe_browsing_util::kBinHashList) {
- // kBinHashList only contains prefixes, no HOSTKEY and COUNT.
+ if (list_name == safe_browsing_util::kBinHashList ||
+ list_name == safe_browsing_util::kDownloadWhiteList) {
+ // These lists only contain prefixes, no HOSTKEY and COUNT.
DCHECK_EQ(0, remaining % hash_len);
prefix_count = remaining / hash_len;
SBChunkHost chunk_host;
« no previous file with comments | « chrome/browser/safe_browsing/protocol_manager.cc ('k') | chrome/browser/safe_browsing/protocol_parser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698