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

Unified Diff: components/safe_browsing_db/v4_store.h

Issue 2228393003: PVer4: DecodeHashes needs to sort the output of the Rice decoder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@01_checksum
Patch Set: rebase Created 4 years, 4 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: components/safe_browsing_db/v4_store.h
diff --git a/components/safe_browsing_db/v4_store.h b/components/safe_browsing_db/v4_store.h
index 48fb3e090e711d9c51d54bdfb8bcbf41ce0e6856..fc94642d31277f86f30d0684592178c693e331aa 100644
--- a/components/safe_browsing_db/v4_store.h
+++ b/components/safe_browsing_db/v4_store.h
@@ -252,9 +252,17 @@ class V4Store {
FRIEND_TEST_ALL_PREFIXES(V4StoreTest, TestMergeUpdatesFailsChecksum);
friend class V4StoreTest;
- // If |prefix_size| is within expected range, and |raw_hashes| is not invalid,
- // then it sets |raw_hashes| as the value at key |prefix_size| in
- // |additions_map|
+ // If |prefix_size| is within expected range, and |raw_hashes_length| is a
+ // multiple of prefix_size, then it sets the string of length
+ // |raw_hashes_length| starting at |raw_hashes_begin| as the value at key
+ // |prefix_size| in |additions_map|
+ static ApplyUpdateResult AddUnlumpedHashes(PrefixSize prefix_size,
+ const char* raw_hashes_begin,
+ const size_t raw_hashes_length,
+ HashPrefixMap* additions_map);
+
+ // An overloaded version of AddUnlumpedHashes that allows passing in a
+ // std::string object.
static ApplyUpdateResult AddUnlumpedHashes(PrefixSize prefix_size,
const std::string& raw_hashes,
HashPrefixMap* additions_map);

Powered by Google App Engine
This is Rietveld 408576698