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

Issue 2228393003: PVer4: DecodeHashes needs to sort the output of the Rice decoder (Closed)

Created:
4 years, 4 months ago by vakh (use Gerrit instead)
Modified:
4 years, 4 months ago
CC:
chromium-reviews, noé, palmer, francois_mozilla.com
Base URL:
https://chromium.googlesource.com/chromium/src.git@01_checksum
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

PVer4: DecodeHashes needs to sort the output of the Rice decoder Also: 1. Add tests to validate the Rice-decoder implementation. 2. Also, make the code for the case where the requested number of bits is greater than those left in the current_word_ easier to understand by calling GetNextBits recursively twice. BUG=543161, 624567 Committed: https://crrev.com/1670eb02e8172d1750b70c50dbe3fb968e1f365f Cr-Commit-Position: refs/heads/master@{#413027}

Patch Set 1 : PVer4: DecodeHashes needs to sort the output of the Rice decoder #

Patch Set 2 : Fix the test to expect sorted list of hashes from DecodeBytes #

Total comments: 20

Patch Set 3 : Fix the corresponding test in v4_store_unittest.cc also #

Total comments: 16

Patch Set 4 : Remove DVLOGs. #include logging.h #

Patch Set 5 : Use a vector to decode and sort uint32_t values. re-interpret the memory of that vector as raw hash… #

Total comments: 4

Patch Set 6 : Use htonl/ntohl instead of FlipEndianness (but the effect is the same). Use GetBitsFromCurrentWord … #

Patch Set 7 : Use FlipEndianness instead of ntohl/htonl. #error for big endian #

Patch Set 8 : rebase #

Total comments: 13

Patch Set 9 : Use htonl. Return from GetBitsFromCurrentWord #

Total comments: 6

Patch Set 10 : DecodeBytes->DecodePrefixes. More detailed comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+254 lines, -134 lines) Patch
M components/safe_browsing_db/v4_rice.h View 1 2 3 4 5 6 7 8 9 6 chunks +21 lines, -8 lines 0 comments Download
M components/safe_browsing_db/v4_rice.cc View 1 2 3 4 5 6 7 8 9 6 chunks +63 lines, -52 lines 0 comments Download
M components/safe_browsing_db/v4_rice_unittest.cc View 1 2 3 4 5 6 7 8 9 4 chunks +129 lines, -51 lines 0 comments Download
M components/safe_browsing_db/v4_store.h View 1 2 3 4 1 chunk +11 lines, -3 lines 0 comments Download
M components/safe_browsing_db/v4_store.cc View 1 2 3 4 5 6 7 8 9 9 chunks +29 lines, -19 lines 0 comments Download
M components/safe_browsing_db/v4_store_unittest.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download

Dependent Patchsets:

Messages

Total messages: 87 (53 generated)
vakh (use Gerrit instead)
rebase
4 years, 4 months ago (2016-08-11 21:09:12 UTC) #5
vakh (use Gerrit instead)
Nit: s/DCHECK_EQ/EXPECT_EQ/
4 years, 4 months ago (2016-08-11 21:44:35 UTC) #10
vakh (use Gerrit instead)
PVer4: DecodeHashes needs to sort the output of the Rice decoder
4 years, 4 months ago (2016-08-12 21:53:06 UTC) #15
vakh (use Gerrit instead)
Fix the test to expect sorted list of hashes from DecodeBytes
4 years, 4 months ago (2016-08-12 21:58:37 UTC) #22
vakh (use Gerrit instead)
4 years, 4 months ago (2016-08-12 22:04:17 UTC) #26
vakh (use Gerrit instead)
Fix the corresponding test in v4_store_unittest.cc also
4 years, 4 months ago (2016-08-12 22:49:35 UTC) #29
Nathan Parker
https://codereview.chromium.org/2228393003/diff/80001/components/safe_browsing_db/v4_rice.cc File components/safe_browsing_db/v4_rice.cc (right): https://codereview.chromium.org/2228393003/diff/80001/components/safe_browsing_db/v4_rice.cc#newcode22 components/safe_browsing_db/v4_rice.cc:22: uint32_t FlipEndianness(uint32_t word) { This should be platform-specific. Maybe ...
4 years, 4 months ago (2016-08-12 23:01:49 UTC) #32
Scott Hess - ex-Googler
DVLOG! OK, I'll ignore it. https://codereview.chromium.org/2228393003/diff/100001/components/safe_browsing_db/v4_rice.cc File components/safe_browsing_db/v4_rice.cc (left): https://codereview.chromium.org/2228393003/diff/100001/components/safe_browsing_db/v4_rice.cc#oldcode5 components/safe_browsing_db/v4_rice.cc:5: #include "base/logging.h" I think ...
4 years, 4 months ago (2016-08-12 23:25:47 UTC) #34
vakh (use Gerrit instead)
Remove DVLOGs. #include logging.h
4 years, 4 months ago (2016-08-13 00:15:07 UTC) #35
vakh (use Gerrit instead)
Thanks for the review. PTAL. DVLOGs - removed. https://codereview.chromium.org/2228393003/diff/80001/components/safe_browsing_db/v4_rice.cc File components/safe_browsing_db/v4_rice.cc (right): https://codereview.chromium.org/2228393003/diff/80001/components/safe_browsing_db/v4_rice.cc#newcode22 components/safe_browsing_db/v4_rice.cc:22: uint32_t ...
4 years, 4 months ago (2016-08-13 00:15:14 UTC) #37
vakh (use Gerrit instead)
https://codereview.chromium.org/2228393003/diff/100001/components/safe_browsing_db/v4_rice_unittest.cc File components/safe_browsing_db/v4_rice_unittest.cc (right): https://codereview.chromium.org/2228393003/diff/100001/components/safe_browsing_db/v4_rice_unittest.cc#newcode142 components/safe_browsing_db/v4_rice_unittest.cc:142: VerifyRiceDecoding(it); On 2016/08/12 23:25:47, Scott Hess wrote: > In ...
4 years, 4 months ago (2016-08-13 00:17:16 UTC) #39
vakh (use Gerrit instead)
https://codereview.chromium.org/2228393003/diff/100001/components/safe_browsing_db/v4_rice_unittest.cc File components/safe_browsing_db/v4_rice_unittest.cc (right): https://codereview.chromium.org/2228393003/diff/100001/components/safe_browsing_db/v4_rice_unittest.cc#newcode39 components/safe_browsing_db/v4_rice_unittest.cc:39: } On 2016/08/12 23:25:47, Scott Hess wrote: > There's ...
4 years, 4 months ago (2016-08-13 00:19:44 UTC) #40
vakh (use Gerrit instead)
Use a vector to decode and sort uint32_t values. re-interpret the memory of that vector ...
4 years, 4 months ago (2016-08-15 20:52:34 UTC) #43
Scott Hess - ex-Googler
It feels like there is something being forced in the flippedness area, here. Rice encoding ...
4 years, 4 months ago (2016-08-15 21:18:15 UTC) #46
Scott Hess - ex-Googler
On 2016/08/15 21:18:15, Scott Hess wrote: > It feels like there is something being forced ...
4 years, 4 months ago (2016-08-15 21:19:38 UTC) #47
vakh (use Gerrit instead)
Use htonl/ntohl instead of FlipEndianness (but the effect is the same). Use GetBitsFromCurrentWord for lower
4 years, 4 months ago (2016-08-16 00:18:56 UTC) #50
vakh (use Gerrit instead)
On 2016/08/15 21:19:38, Scott Hess wrote: > On 2016/08/15 21:18:15, Scott Hess wrote: > > ...
4 years, 4 months ago (2016-08-16 00:21:53 UTC) #53
vakh (use Gerrit instead)
Out-of-order comments! This one should have gone out before: <quote> Yes, I agree it does ...
4 years, 4 months ago (2016-08-16 00:23:03 UTC) #54
Scott Hess - ex-Googler
On 2016/08/16 00:21:53, vakh wrote: > On 2016/08/15 21:19:38, Scott Hess wrote: > > On ...
4 years, 4 months ago (2016-08-16 00:36:13 UTC) #55
vakh (use Gerrit instead)
On 2016/08/16 at 00:36:13, shess wrote: > On 2016/08/16 00:21:53, vakh wrote: > > On ...
4 years, 4 months ago (2016-08-16 01:33:28 UTC) #58
vakh (use Gerrit instead)
On 2016/08/16 at 01:33:28, vakh wrote: > On 2016/08/16 at 00:36:13, shess wrote: > > ...
4 years, 4 months ago (2016-08-16 19:00:07 UTC) #59
vakh (use Gerrit instead)
Use FlipEndianness instead of ntohl/htonl. #error for big endian
4 years, 4 months ago (2016-08-17 00:41:00 UTC) #60
vakh (use Gerrit instead)
rebase
4 years, 4 months ago (2016-08-17 19:01:55 UTC) #65
Nathan Parker
https://codereview.chromium.org/2228393003/diff/200001/components/safe_browsing_db/v4_rice.cc File components/safe_browsing_db/v4_rice.cc (right): https://codereview.chromium.org/2228393003/diff/200001/components/safe_browsing_db/v4_rice.cc#newcode28 components/safe_browsing_db/v4_rice.cc:28: uint32_t FlipEndianness(uint32_t word) { I feel like there's no ...
4 years, 4 months ago (2016-08-17 20:57:27 UTC) #66
vakh (use Gerrit instead)
Use htonl. Return from GetBitsFromCurrentWord
4 years, 4 months ago (2016-08-17 22:10:36 UTC) #67
vakh (use Gerrit instead)
https://codereview.chromium.org/2228393003/diff/200001/components/safe_browsing_db/v4_rice.cc File components/safe_browsing_db/v4_rice.cc (right): https://codereview.chromium.org/2228393003/diff/200001/components/safe_browsing_db/v4_rice.cc#newcode28 components/safe_browsing_db/v4_rice.cc:28: uint32_t FlipEndianness(uint32_t word) { On 2016/08/17 at 20:57:27, Nathan ...
4 years, 4 months ago (2016-08-17 22:10:41 UTC) #68
Scott Hess - ex-Googler
I think I get the situation this is dealing with. I think it was an ...
4 years, 4 months ago (2016-08-17 22:42:27 UTC) #71
vakh (use Gerrit instead)
DecodeBytes->DecodePrefixes. More detailed comment.
4 years, 4 months ago (2016-08-17 23:30:18 UTC) #74
vakh (use Gerrit instead)
https://codereview.chromium.org/2228393003/diff/200001/components/safe_browsing_db/v4_rice.cc File components/safe_browsing_db/v4_rice.cc (right): https://codereview.chromium.org/2228393003/diff/200001/components/safe_browsing_db/v4_rice.cc#newcode28 components/safe_browsing_db/v4_rice.cc:28: uint32_t FlipEndianness(uint32_t word) { On 2016/08/17 at 22:42:26, Scott ...
4 years, 4 months ago (2016-08-17 23:40:08 UTC) #77
Nathan Parker
lgtm
4 years, 4 months ago (2016-08-18 22:41:16 UTC) #80
vakh (use Gerrit instead)
Since most of the major points have been addressed, I am going to commit this ...
4 years, 4 months ago (2016-08-19 00:36:16 UTC) #81
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2228393003/240001
4 years, 4 months ago (2016-08-19 00:37:11 UTC) #83
commit-bot: I haz the power
Committed patchset #10 (id:240001)
4 years, 4 months ago (2016-08-19 02:18:37 UTC) #85
commit-bot: I haz the power
4 years, 4 months ago (2016-08-19 02:20:34 UTC) #87
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/1670eb02e8172d1750b70c50dbe3fb968e1f365f
Cr-Commit-Position: refs/heads/master@{#413027}

Powered by Google App Engine
This is Rietveld 408576698