[safe-browsing] Cleanup tests and remove unnecessary prefix tracking.
commit4b01b5fcf45caaf83f1d8e818a2a53e812c09426
authorshess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 30 Apr 2014 11:20:43 +0000 (30 11:20 +0000)
committershess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 30 Apr 2014 11:20:43 +0000 (30 11:20 +0000)
treeade03824f091abf6ae5fd881ed32757e8dd89f32
parent1b21d1a85cec105b005afa903888201476fc9793
[safe-browsing] Cleanup tests and remove unnecessary prefix tracking.

Shift PrefixSet::GetPrefixes() into private:, and make test users
friends appropriately.  This moved some tests into namespace
safe_browsing, removed duplicate safe_browsing:: in the PrefixSet
tests.

Modify manual chunk-loading code to use BeginChunk/FinishChunk around
logical chunks, and to not mix prefixes and full hashes in the same
chunk.  Remove cases where the tests were loading full hashes and the
corrosponding prefix, which was not representative of actual chunks
received from the server.

Remove the part of SBProcessSubs() which deleted full hashes by their
prefix component.  Since prefixes and full hashes cannot mix in a chunk,
this case should not be possible in the first place.

Fixed SBProcessSubsDeleteChunk to test what it claimed to test.

BUG=none

Review URL: https://codereview.chromium.org/263493002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267178 0039d316-1c4b-4281-b951-d872f2087c98
chrome/browser/safe_browsing/prefix_set.h
chrome/browser/safe_browsing/prefix_set_unittest.cc
chrome/browser/safe_browsing/safe_browsing_store.cc
chrome/browser/safe_browsing/safe_browsing_store_file_unittest.cc
chrome/browser/safe_browsing/safe_browsing_store_unittest.cc
chrome/browser/safe_browsing/safe_browsing_util_unittest.cc