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

Issue 2164523002: PVer4: V4Store: Check whether a hash prefix exists for a full hash (Closed)

Created:
4 years, 5 months ago by vakh (use Gerrit instead)
Modified:
4 years, 5 months ago
Reviewers:
Nathan Parker
CC:
chromium-reviews, palmer, noƩ, woz, Scott Hess - ex-Googler
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add method to check whether a hash prefix exists for a full hash in a V4Store Overall design document: https://goto.google.com/design-doc-v4store This CL does the following: 1. Get the full hash that needs to be checked. 2. Iterate over the hash prefix map: Key: prefix size (call it 'n'), Value: Concatenated list of sorted hash prefixes of size 'n' (call it 'l'). 3. Get the hash prefix of size 'n' from the full hash. 4. Binary search for this hash prefix in 'l'. BUG=543161 Committed: https://crrev.com/3f60e959d55033a90ed38f890a4fe17d092d7e5b Cr-Commit-Position: refs/heads/master@{#406508}

Patch Set 1 #

Patch Set 2 : Return matching hash prefix. Add comments. Lint. #

Patch Set 3 : Add comments. #

Patch Set 4 : s/ContainsFullHash/GetMatchingHashPrefix #

Total comments: 18

Patch Set 5 : nparker@ feedback: Remove some refs. Use std::string::compare. #

Total comments: 2

Patch Set 6 : Add comment about what happens if there are more than one hash prefixes that match a given full hash #

Unified diffs Side-by-side diffs Delta from patch set Stats (+154 lines, -2 lines) Patch
M components/safe_browsing_db/v4_store.h View 1 2 3 5 chunks +30 lines, -1 line 0 comments Download
M components/safe_browsing_db/v4_store.cc View 1 2 3 4 5 2 chunks +41 lines, -1 line 0 comments Download
M components/safe_browsing_db/v4_store_unittest.cc View 1 2 3 1 chunk +83 lines, -0 lines 0 comments Download

Messages

Total messages: 38 (24 generated)
vakh (use Gerrit instead)
4 years, 5 months ago (2016-07-19 07:22:22 UTC) #4
vakh (use Gerrit instead)
Return matching hash prefix. Add comments. Lint.
4 years, 5 months ago (2016-07-19 18:11:54 UTC) #7
vakh (use Gerrit instead)
Add comments.
4 years, 5 months ago (2016-07-19 18:26:05 UTC) #10
vakh (use Gerrit instead)
s/ContainsFullHash/GetMatchingHashPrefix
4 years, 5 months ago (2016-07-19 18:46:27 UTC) #13
Nathan Parker
https://codereview.chromium.org/2164523002/diff/60001/components/safe_browsing_db/v4_store.cc File components/safe_browsing_db/v4_store.cc (right): https://codereview.chromium.org/2164523002/diff/60001/components/safe_browsing_db/v4_store.cc#newcode433 components/safe_browsing_db/v4_store.cc:433: const HashPrefix& hash_prefix = full_hash.substr(0, prefix_size); This is a ...
4 years, 5 months ago (2016-07-19 23:01:31 UTC) #18
vakh (use Gerrit instead)
nparker@ feedback: Remove some refs. Use std::string::compare.
4 years, 5 months ago (2016-07-20 00:24:39 UTC) #19
vakh (use Gerrit instead)
https://codereview.chromium.org/2164523002/diff/60001/components/safe_browsing_db/v4_store.cc File components/safe_browsing_db/v4_store.cc (right): https://codereview.chromium.org/2164523002/diff/60001/components/safe_browsing_db/v4_store.cc#newcode433 components/safe_browsing_db/v4_store.cc:433: const HashPrefix& hash_prefix = full_hash.substr(0, prefix_size); On 2016/07/19 23:01:31, ...
4 years, 5 months ago (2016-07-20 00:24:52 UTC) #21
Nathan Parker
lgtm https://codereview.chromium.org/2164523002/diff/60001/components/safe_browsing_db/v4_store_unittest.cc File components/safe_browsing_db/v4_store_unittest.cc (right): https://codereview.chromium.org/2164523002/diff/60001/components/safe_browsing_db/v4_store_unittest.cc#newcode613 components/safe_browsing_db/v4_store_unittest.cc:613: EXPECT_TRUE(store.GetMatchingHashPrefix(full_hash).empty()); On 2016/07/20 00:24:52, vakh wrote: > On ...
4 years, 5 months ago (2016-07-20 00:36:47 UTC) #24
vakh (use Gerrit instead)
Add comment about what happens if there are more than one hash prefixes that match ...
4 years, 5 months ago (2016-07-20 06:10:45 UTC) #27
vakh (use Gerrit instead)
https://codereview.chromium.org/2164523002/diff/60001/components/safe_browsing_db/v4_store_unittest.cc File components/safe_browsing_db/v4_store_unittest.cc (right): https://codereview.chromium.org/2164523002/diff/60001/components/safe_browsing_db/v4_store_unittest.cc#newcode613 components/safe_browsing_db/v4_store_unittest.cc:613: EXPECT_TRUE(store.GetMatchingHashPrefix(full_hash).empty()); On 2016/07/20 00:36:47, Nathan Parker wrote: > On ...
4 years, 5 months ago (2016-07-20 06:12:04 UTC) #30
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/2164523002/100001
4 years, 5 months ago (2016-07-20 06:12:45 UTC) #33
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 5 months ago (2016-07-20 07:00:24 UTC) #35
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-20 07:00:28 UTC) #36
commit-bot: I haz the power
4 years, 5 months ago (2016-07-20 07:03:21 UTC) #38
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/3f60e959d55033a90ed38f890a4fe17d092d7e5b
Cr-Commit-Position: refs/heads/master@{#406508}

Powered by Google App Engine
This is Rietveld 408576698